diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index 86f2d9dbcd751..574ac1f201c02 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -17,7 +17,7 @@ let a_test: bool = a; // CHECK:STDOUT: --- fail_bool_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: bool = bool_literal false [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -37,7 +37,7 @@ let a_test: bool = a; // CHECK:STDOUT: .a_test = @__global_init.%a_test // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14: bool = bool_literal false [template = constants.%.1] +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] // CHECK:STDOUT: %a: = bind_alias a, [template = ] // 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] diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index 90957397d3e57..62aabfe2fe076 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -22,10 +22,10 @@ alias b = bool; // CHECK:STDOUT: --- fail_builtins.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -46,8 +46,8 @@ alias b = bool; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %a: = bind_alias a, [template = ] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %b: = bind_alias b, [template = ] diff --git a/toolchain/check/testdata/alias/fail_control_flow.carbon b/toolchain/check/testdata/alias/fail_control_flow.carbon index 6c8f2c9d378cd..255617c000441 100644 --- a/toolchain/check/testdata/alias/fail_control_flow.carbon +++ b/toolchain/check/testdata/alias/fail_control_flow.carbon @@ -24,14 +24,14 @@ alias a = true or false; // CHECK:STDOUT: --- fail_control_flow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc22: bool = block_arg [template = constants.%.1] +// CHECK:STDOUT: %.loc22: bool = block_arg [template = constants.%true] // CHECK:STDOUT: %a: = bind_alias a, [template = ] // CHECK:STDOUT: } // 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 29e92c854ace1..21323fa89c396 100644 --- a/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon +++ b/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon @@ -18,9 +18,9 @@ let d: c = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,18 +42,18 @@ let d: c = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15_13.1: %empty_struct_type = 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.3: init %C = class_init (), %.loc15_13.2 [template = constants.%C.val] // 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 diff --git a/toolchain/check/testdata/alias/no_prelude/export_name.carbon b/toolchain/check/testdata/alias/no_prelude/export_name.carbon index 24497bf7aafc8..cb0bc76605f9e 100644 --- a/toolchain/check/testdata/alias/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/alias/no_prelude/export_name.carbon @@ -72,8 +72,8 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -87,25 +87,25 @@ var d: D* = &c; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//base, inst+1, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//base, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,14 +128,14 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref Main//base, inst+7, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -158,14 +158,14 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export, inst+10, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export, inst+9, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -188,9 +188,9 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc6_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_13.2: init %C = class_init (), file.%d.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_14: init %C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%d.var, %.loc6_14 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -198,7 +198,7 @@ var d: D* = &c; // CHECK:STDOUT: --- fail_orig_name_not_in_export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -218,7 +218,7 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: %.1 = struct_literal () +// CHECK:STDOUT: %.loc9: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -227,16 +227,16 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export, inst+10, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//export_orig, inst+10, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//export_orig, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//export_orig, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_orig, inst+9, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -252,9 +252,9 @@ var d: D* = &c; // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %d.var: ref %.4 = var d -// CHECK:STDOUT: %d: ref %.4 = bind_name d, %d.var +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %d.var: ref %ptr.2 = var d +// CHECK:STDOUT: %d: ref %ptr.2 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -265,13 +265,13 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc7_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_13.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_14: init %C = converted %.loc7_13.1, %.loc7_13.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_14 // 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: %addr: %ptr.2 = addr_of %c.ref +// CHECK:STDOUT: assign file.%d.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 7b3ce9c9ddefc..8d476ab00115a 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 @@ -23,10 +23,10 @@ let c_var: c = d; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %struct: %D = struct_value () [template] +// CHECK:STDOUT: %D.val: %D = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,26 +48,26 @@ let c_var: c = d; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc15_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_13.2: init %D = class_init (), file.%d.var [template = constants.%D.val] +// CHECK:STDOUT: %.loc15_14: init %D = converted %.loc15_13.1, %.loc15_13.2 [template = constants.%D.val] // CHECK:STDOUT: assign file.%d.var, %.loc15_14 // CHECK:STDOUT: %d.ref: ref %D = name_ref d, file.%d // CHECK:STDOUT: %.loc20: %C = converted %d.ref, [template = ] 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 676cb76387f69..62fb86951c3bd 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 @@ -29,7 +29,7 @@ fn F() -> {} { // CHECK:STDOUT: --- fail_local_in_namespace.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -41,19 +41,19 @@ fn F() -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: %NS: = namespace [template] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc13_12.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_12.2: type = converted %.loc13_12.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_17: %.1 = struct_literal () +// CHECK:STDOUT: %.loc22_17: %empty_struct_type = 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_modifiers.carbon b/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon index e19ad43b6f300..7d0821edd1617 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon @@ -52,8 +52,8 @@ extern alias C = Class; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -73,10 +73,10 @@ extern alias C = Class; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon index 2f9ad7adb6e29..606438ed28455 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon @@ -33,9 +33,9 @@ alias b = C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -58,22 +58,22 @@ alias b = C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc21_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc21_13.2: init %C = class_init (), file.%a.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc21_14: init %C = converted %.loc21_13.1, %.loc21_13.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%a.var, %.loc21_14 -// 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: %.loc23_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc23_13.2: init %C = class_init (), file.%b.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc23_14: init %C = converted %.loc23_13.1, %.loc23_13.2 [template = constants.%C.val] // 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 47f34ee6bbb77..c7dcd8eea151c 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -24,7 +24,7 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type %empty_tuple.type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %empty_tuple.type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,15 +45,15 @@ fn F() { // CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc12_17 // CHECK:STDOUT: %.loc13_11: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_12.1: type = converted %.loc13_11, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc13_12.2: type = ptr_type %empty_tuple.type [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %.loc13_12: type = converted %.loc13_11, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %ptr: type = ptr_type %empty_tuple.type [template = constants.%ptr] +// CHECK:STDOUT: %b.var: ref %ptr = var b +// CHECK:STDOUT: %b: ref %ptr = bind_name b, %b.var // CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a -// CHECK:STDOUT: %.loc13_16: %.1 = addr_of %a.ref -// CHECK:STDOUT: assign %b.var, %.loc13_16 -// CHECK:STDOUT: %b.ref: ref %.1 = name_ref b, %b -// CHECK:STDOUT: %.loc17_14: %.1 = bind_value %b.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %a.ref +// CHECK:STDOUT: assign %b.var, %addr +// CHECK:STDOUT: %b.ref: ref %ptr = name_ref b, %b +// CHECK:STDOUT: %.loc17_14: %ptr = bind_value %b.ref // CHECK:STDOUT: %.loc17_13: ref %empty_tuple.type = deref %.loc17_14 // CHECK:STDOUT: %c: = bind_alias c, [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon index df8f05884a3a5..3644ec33c5b6f 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: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,7 +29,7 @@ alias A(T:! type) = T*; // CHECK:STDOUT: .A = %A // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc18: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = constants.%ptr] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: %A: = bind_alias A, [template = ] diff --git a/toolchain/check/testdata/alias/no_prelude/import.carbon b/toolchain/check/testdata/alias/no_prelude/import.carbon index 1a2cc89b63785..56cddf908f8bc 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -70,9 +70,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,33 +85,33 @@ 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.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] +// CHECK:STDOUT: %a.var: ref %ptr = var a +// CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- class2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//class1, inst+1, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//class1, inst+7, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.3 = import_ref Main//class1, inst+12, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref Main//class1, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//class1, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//class1, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -127,9 +127,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %c_alias.ref.loc6: type = name_ref c_alias, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c_alias_alias: type = bind_alias c_alias_alias, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c_alias.ref.loc8: type = name_ref c_alias, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %b.var: ref %.3 = var b -// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] +// CHECK:STDOUT: %b.var: ref %ptr = var b +// CHECK:STDOUT: %b: ref %ptr = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -142,15 +142,15 @@ var c: () = a_alias_alias; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//class2, inst+12, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref Main//class2, inst+17, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref Main//class2, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//class2, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//class2, inst+10, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,9 +162,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %c_alias_alias.ref: type = name_ref c_alias_alias, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc6: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] +// CHECK:STDOUT: %c.var: ref %ptr = var c +// CHECK:STDOUT: %c: ref %ptr = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/alias/no_prelude/import_access.carbon b/toolchain/check/testdata/alias/no_prelude/import_access.carbon index f3a2c909df1e2..3f0626d2bab9d 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_access.carbon @@ -56,8 +56,8 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,26 +71,26 @@ var inst: Test.A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Test//def, inst+1, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Test//def, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Test//def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Test//def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Test//def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -115,9 +115,9 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_16.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_16.2: init %C = class_init (), file.%inst.var [template = constants.%struct] -// CHECK:STDOUT: %.loc4_17: init %C = converted %.loc4_16.1, %.loc4_16.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc4_16.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_16.2: init %C = class_init (), file.%inst.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc4_17: init %C = converted %.loc4_16.1, %.loc4_16.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%inst.var, %.loc4_17 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -125,7 +125,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -145,7 +145,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: %.1 = struct_literal () +// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%inst.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -153,7 +153,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -176,7 +176,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: %.1 = struct_literal () +// CHECK:STDOUT: %.loc9: %empty_struct_type = 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 058cd27a713f6..9ee76ed2d6be2 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_order.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_order.carbon @@ -35,9 +35,9 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -62,13 +62,13 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc4_19.2: type = converted %.loc4_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc4_16: %.1 = field_decl v, element0 [template] -// CHECK:STDOUT: %.loc4_22: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_16: %C.elem = field_decl v, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .v = %.loc4_16 -// CHECK:STDOUT: complete_type_witness = %.loc4_22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon @@ -76,11 +76,11 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,9 +89,9 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+14, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//a, inst+16, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.5: type = import_ref Main//a, inst+18, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: = import_ref Main//a, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//a, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.7 = import_ref Main//a, inst+2, unloaded -// CHECK:STDOUT: %import_ref.8: %.4 = import_ref Main//a, inst+7, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.8: %C.elem = import_ref Main//a, inst+7, loaded [template = %.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -131,42 +131,42 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_23.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_24.1: %.1 = struct_literal (%.loc7_23.1) +// CHECK:STDOUT: %.loc7_24.1: %struct_type.v = struct_literal (%.loc7_23.1) // CHECK:STDOUT: %.loc7_24.2: ref %empty_tuple.type = class_element_access file.%d_val.var, element0 // CHECK:STDOUT: %.loc7_23.2: init %empty_tuple.type = tuple_init () to %.loc7_24.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_24.3: init %empty_tuple.type = converted %.loc7_23.1, %.loc7_23.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_24.4: init %C = class_init (%.loc7_24.3), file.%d_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_25: init %C = converted %.loc7_24.1, %.loc7_24.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_24.4: init %C = class_init (%.loc7_24.3), file.%d_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_25: init %C = converted %.loc7_24.1, %.loc7_24.4 [template = constants.%C.val] // 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: %.4 = name_ref v, imports.%import_ref.8 [template = imports.%.1] +// CHECK:STDOUT: %v.ref.loc8: %C.elem = name_ref v, imports.%import_ref.8 [template = imports.%.1] // CHECK:STDOUT: %.loc8_27.1: ref %empty_tuple.type = class_element_access %d_val.ref, element0 -// CHECK:STDOUT: %.loc8_29.1: %.1 = struct_literal (%.loc8_27.1) +// CHECK:STDOUT: %.loc8_29.1: %struct_type.v = struct_literal (%.loc8_27.1) // CHECK:STDOUT: %.loc8_29.2: ref %empty_tuple.type = class_element_access file.%c_val.var, element0 // CHECK:STDOUT: %.loc8_27.2: init %empty_tuple.type = tuple_init () to %.loc8_29.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_29.3: init %empty_tuple.type = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_29.4: init %C = class_init (%.loc8_29.3), file.%c_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc8_30: init %C = converted %.loc8_29.1, %.loc8_29.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc8_29.4: init %C = class_init (%.loc8_29.3), file.%c_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc8_30: init %C = converted %.loc8_29.1, %.loc8_29.4 [template = constants.%C.val] // 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: %.4 = name_ref v, imports.%import_ref.8 [template = imports.%.1] +// CHECK:STDOUT: %v.ref.loc9: %C.elem = name_ref v, imports.%import_ref.8 [template = imports.%.1] // CHECK:STDOUT: %.loc9_27.1: ref %empty_tuple.type = class_element_access %c_val.ref, element0 -// CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal (%.loc9_27.1) +// CHECK:STDOUT: %.loc9_29.1: %struct_type.v = struct_literal (%.loc9_27.1) // CHECK:STDOUT: %.loc9_29.2: ref %empty_tuple.type = class_element_access file.%b_val.var, element0 // CHECK:STDOUT: %.loc9_27.2: init %empty_tuple.type = tuple_init () to %.loc9_29.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_29.3: init %empty_tuple.type = converted %.loc9_27.1, %.loc9_27.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_29.4: init %C = class_init (%.loc9_29.3), file.%b_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30: init %C = converted %.loc9_29.1, %.loc9_29.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc9_29.4: init %C = class_init (%.loc9_29.3), file.%b_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc9_30: init %C = converted %.loc9_29.1, %.loc9_29.4 [template = constants.%C.val] // 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: %.4 = name_ref v, imports.%import_ref.8 [template = imports.%.1] +// CHECK:STDOUT: %v.ref.loc10: %C.elem = name_ref v, imports.%import_ref.8 [template = imports.%.1] // CHECK:STDOUT: %.loc10_27.1: ref %empty_tuple.type = class_element_access %b_val.ref, element0 -// CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal (%.loc10_27.1) +// CHECK:STDOUT: %.loc10_29.1: %struct_type.v = struct_literal (%.loc10_27.1) // CHECK:STDOUT: %.loc10_29.2: ref %empty_tuple.type = class_element_access file.%a_val.var, element0 // CHECK:STDOUT: %.loc10_27.2: init %empty_tuple.type = tuple_init () to %.loc10_29.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_29.3: init %empty_tuple.type = converted %.loc10_27.1, %.loc10_27.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_29.4: init %C = class_init (%.loc10_29.3), file.%a_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30: init %C = converted %.loc10_29.1, %.loc10_29.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc10_29.4: init %C = class_init (%.loc10_29.3), file.%a_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc10_30: init %C = converted %.loc10_29.1, %.loc10_29.4 [template = constants.%C.val] // 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 94a6009d1c018..b87a40c4f35bc 100644 --- a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon @@ -24,11 +24,11 @@ fn F() -> NS.a { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -62,36 +62,36 @@ fn F() -> NS.a { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_19.2: type = converted %.loc11_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_16: %.1 = field_decl v, element0 [template] -// CHECK:STDOUT: %.loc11_22: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_16: %C.elem = field_decl v, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .v = %.loc11_16 -// CHECK:STDOUT: complete_type_witness = %.loc11_22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_18.1: %.2 = struct_literal (%.loc19_17.1) +// CHECK:STDOUT: %.loc19_18.1: %struct_type.v = struct_literal (%.loc19_17.1) // CHECK:STDOUT: %.loc19_18.2: ref %empty_tuple.type = class_element_access %return, element0 // CHECK:STDOUT: %.loc19_17.2: init %empty_tuple.type = tuple_init () to %.loc19_18.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc19_18.3: init %empty_tuple.type = converted %.loc19_17.1, %.loc19_17.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc19_18.4: init %C = class_init (%.loc19_18.3), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_19: init %C = converted %.loc19_18.1, %.loc19_18.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_18.4: init %C = class_init (%.loc19_18.3), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_19: init %C = converted %.loc19_18.1, %.loc19_18.4 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_19 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_22.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_23.1: %.2 = struct_literal (%.loc16_22.1) +// CHECK:STDOUT: %.loc16_23.1: %struct_type.v = struct_literal (%.loc16_22.1) // CHECK:STDOUT: %.loc16_23.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc16_23.3: ref %empty_tuple.type = class_element_access %.loc16_23.2, element0 // CHECK:STDOUT: %.loc16_22.2: init %empty_tuple.type = tuple_init () to %.loc16_23.3 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_23.4: init %empty_tuple.type = converted %.loc16_22.1, %.loc16_22.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_23.5: init %C = class_init (%.loc16_23.4), %.loc16_23.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc16_23.5: init %C = class_init (%.loc16_23.4), %.loc16_23.2 [template = constants.%C.val] // 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 diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index 837dd6fc2ac07..5db589b566ee6 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -17,21 +17,21 @@ fn G() { // CHECK:STDOUT: --- array_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %tuple.type.2 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.2, %tuple.type.2) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,12 +53,12 @@ fn G() { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%.loc11_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] @@ -77,14 +77,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%.loc14_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%.loc14_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%int_32.loc14_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%int_32.loc14_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_12, %int.make_type_signed.loc14_17, %int.make_type_signed.loc14_22) -// CHECK:STDOUT: %.loc14_28: Core.IntLiteral = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed.loc14_12 [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed.loc14_12, %.loc14_25.2 [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.4: type = value_of_initializer %int.make_type_signed.loc14_17 [template = constants.%i32] @@ -92,24 +92,24 @@ fn G() { // CHECK:STDOUT: %.loc14_25.6: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.7: type = converted %int.make_type_signed.loc14_22, %.loc14_25.6 [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.8: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_29: type = array_type %.loc14_28, %tuple.type.2 [template = constants.%.3] -// CHECK:STDOUT: %v.var: ref %.3 = var v -// CHECK:STDOUT: %v: ref %.3 = bind_name v, %v.var +// CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.2 [template = constants.%array_type] +// CHECK:STDOUT: %v.var: ref %array_type = var v +// CHECK:STDOUT: %v: ref %array_type = 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 %tuple.type.2 = splice_block %.loc14_42.2 { -// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_42.2: ref %tuple.type.2 = array_index %v.var, %.loc14_42.1 +// CHECK:STDOUT: %.loc14_42.2: ref %tuple.type.2 = splice_block %.loc14_42.1 { +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc14_42.1: ref %tuple.type.2 = array_index %v.var, %int_0 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_36: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3 +// CHECK:STDOUT: %F.call.loc14_36: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.2 // CHECK:STDOUT: %F.ref.loc14_39: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_42.6: ref %tuple.type.2 = splice_block %.loc14_42.5 { -// CHECK:STDOUT: %.loc14_42.4: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc14_42.5: ref %tuple.type.2 = array_index %v.var, %.loc14_42.4 +// CHECK:STDOUT: %.loc14_42.4: ref %tuple.type.2 = splice_block %.loc14_42.3 { +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc14_42.3: ref %tuple.type.2 = array_index %v.var, %int_1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_41: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6 -// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_36, %F.call.loc14_41) -// CHECK:STDOUT: %.loc14_42.8: init %.3 = array_init (%F.call.loc14_36, %F.call.loc14_41) to %v.var -// CHECK:STDOUT: %.loc14_43: init %.3 = converted %.loc14_42.7, %.loc14_42.8 +// CHECK:STDOUT: %F.call.loc14_41: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.4 +// CHECK:STDOUT: %.loc14_42.5: %tuple.type.3 = tuple_literal (%F.call.loc14_36, %F.call.loc14_41) +// CHECK:STDOUT: %.loc14_42.6: init %array_type = array_init (%F.call.loc14_36, %F.call.loc14_41) to %v.var +// CHECK:STDOUT: %.loc14_43: init %array_type = converted %.loc14_42.5, %.loc14_42.6 // 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 f3b0d6b18d858..a86251521fdea 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -19,33 +19,33 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32, %i32) [template] -// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,51 +68,51 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed.loc13, %.loc13_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17: type = array_type %.loc13_16, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc13_22: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_28: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28) -// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_22, %.loc13_29.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %.loc13_29.4(%.loc13_22) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_29.5: init %i32 = converted %.loc13_22, %int.convert_checked.loc13_29.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_29.7: ref %i32 = array_index %a.var, %.loc13_29.6 -// CHECK:STDOUT: %.loc13_29.8: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.10: = bound_method %.loc13_25, %.loc13_29.9 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_29.11: = specific_function %.loc13_29.10, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %.loc13_29.11(%.loc13_25) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_29.12: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_29.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_29.14: ref %i32 = array_index %a.var, %.loc13_29.13 -// CHECK:STDOUT: %.loc13_29.15: init %i32 = initialize_from %.loc13_29.12 to %.loc13_29.14 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.17: = bound_method %.loc13_28, %.loc13_29.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_29.18: = specific_function %.loc13_29.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %.loc13_29.18(%.loc13_28) [template = constants.%.40] -// CHECK:STDOUT: %.loc13_29.19: init %i32 = converted %.loc13_28, %int.convert_checked.loc13_29.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_29.21: ref %i32 = array_index %a.var, %.loc13_29.20 -// CHECK:STDOUT: %.loc13_29.22: init %i32 = initialize_from %.loc13_29.19 to %.loc13_29.21 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_29.23: init %.3 = array_init (%.loc13_29.8, %.loc13_29.15, %.loc13_29.22) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_30: init %.3 = converted %.loc13_29.1, %.loc13_29.23 [template = constants.%array] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc13_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed.loc13, %.loc13_11.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3.loc13_16, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_1.loc13_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc13_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%int_1.loc13_22, %int_2.loc13_25, %int_3.loc13_28) +// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_29.1: = bound_method %int_1.loc13_22, %impl.elem0.loc13_29.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_29.1: = specific_function %Convert.bound.loc13_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %Convert.specific_fn.loc13_29.1(%int_1.loc13_22) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_29.2: init %i32 = converted %int_1.loc13_22, %int.convert_checked.loc13_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc13_29.3: ref %i32 = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc13_29.4: init %i32 = initialize_from %.loc13_29.2 to %.loc13_29.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_29.2: = bound_method %int_2.loc13_25, %impl.elem0.loc13_29.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_29.2: = specific_function %Convert.bound.loc13_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %Convert.specific_fn.loc13_29.2(%int_2.loc13_25) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_29.5: init %i32 = converted %int_2.loc13_25, %int.convert_checked.loc13_29.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc13_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc13_29.6: ref %i32 = array_index %a.var, %int_1.loc13_29 +// CHECK:STDOUT: %.loc13_29.7: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_29.3: = bound_method %int_3.loc13_28, %impl.elem0.loc13_29.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_29.3: = specific_function %Convert.bound.loc13_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %Convert.specific_fn.loc13_29.3(%int_3.loc13_28) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_29.8: init %i32 = converted %int_3.loc13_28, %int.convert_checked.loc13_29.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc13_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc13_29.9: ref %i32 = array_index %a.var, %int_2.loc13_29 +// CHECK:STDOUT: %.loc13_29.10: init %i32 = initialize_from %.loc13_29.8 to %.loc13_29.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_29.11: init %array_type = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_30: init %array_type = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_30 -// CHECK:STDOUT: %.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%.loc14_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%.loc14_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] // CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21) // CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] // CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_11, %.loc14_24.2 [template = constants.%i32] @@ -123,33 +123,33 @@ fn G() { // CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %b.var: ref %tuple.type.3 = var b // CHECK:STDOUT: %b: ref %tuple.type.3 = bind_name b, %b.var -// CHECK:STDOUT: %.loc14_29: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_32: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_35: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35) -// CHECK:STDOUT: %.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.3: = bound_method %.loc14_29, %.loc14_36.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_36.4: = specific_function %.loc14_36.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %.loc14_36.4(%.loc14_29) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_36.5: init %i32 = converted %.loc14_29, %int.convert_checked.loc14_36.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_36.6: ref %i32 = tuple_access %b.var, element0 -// CHECK:STDOUT: %.loc14_36.7: init %i32 = initialize_from %.loc14_36.5 to %.loc14_36.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_36.8: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.9: = bound_method %.loc14_32, %.loc14_36.8 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_36.10: = specific_function %.loc14_36.9, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %.loc14_36.10(%.loc14_32) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_36.11: init %i32 = converted %.loc14_32, %int.convert_checked.loc14_36.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_36.12: ref %i32 = tuple_access %b.var, element1 -// CHECK:STDOUT: %.loc14_36.13: init %i32 = initialize_from %.loc14_36.11 to %.loc14_36.12 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_36.14: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.15: = bound_method %.loc14_35, %.loc14_36.14 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_36.16: = specific_function %.loc14_36.15, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %.loc14_36.16(%.loc14_35) [template = constants.%.40] -// CHECK:STDOUT: %.loc14_36.17: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_36.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_36.18: ref %i32 = tuple_access %b.var, element2 -// CHECK:STDOUT: %.loc14_36.19: init %i32 = initialize_from %.loc14_36.17 to %.loc14_36.18 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_36.20: init %tuple.type.3 = tuple_init (%.loc14_36.7, %.loc14_36.13, %.loc14_36.19) to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_37: init %tuple.type.3 = converted %.loc14_36.1, %.loc14_36.20 [template = constants.%tuple] +// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%int_1.loc14, %int_2.loc14, %int_3.loc14) +// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_36.1: = bound_method %int_1.loc14, %impl.elem0.loc14_36.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_36.1: = specific_function %Convert.bound.loc14_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %Convert.specific_fn.loc14_36.1(%int_1.loc14) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_36.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_36.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %b.var, element0 +// CHECK:STDOUT: %.loc14_36.3: init %i32 = initialize_from %.loc14_36.2 to %tuple.elem0 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_36.2: = bound_method %int_2.loc14, %impl.elem0.loc14_36.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_36.2: = specific_function %Convert.bound.loc14_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %Convert.specific_fn.loc14_36.2(%int_2.loc14) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_36.4: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_36.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %b.var, element1 +// CHECK:STDOUT: %.loc14_36.5: init %i32 = initialize_from %.loc14_36.4 to %tuple.elem1 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_36.3: = bound_method %int_3.loc14, %impl.elem0.loc14_36.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc14_36.3: = specific_function %Convert.bound.loc14_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %Convert.specific_fn.loc14_36.3(%int_3.loc14) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_36.6: init %i32 = converted %int_3.loc14, %int.convert_checked.loc14_36.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %b.var, element2 +// CHECK:STDOUT: %.loc14_36.7: init %i32 = initialize_from %.loc14_36.6 to %tuple.elem2 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_36.8: init %tuple.type.3 = tuple_init (%.loc14_36.3, %.loc14_36.5, %.loc14_36.7) to %b.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_37: init %tuple.type.3 = 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 d9c805c4b4538..8d75c49cdef79 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -17,28 +17,28 @@ fn Run() { // CHECK:STDOUT: --- assign_return_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: type = array_type %.30, %i32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,8 +61,8 @@ fn Run() { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) // CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32] @@ -75,40 +75,40 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.6) [template = constants.%tuple] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_30.2: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_30.3: %i32 = converted %int_0, %.loc11_30.2 [template = constants.%int_0.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.3) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_31: %tuple.type.2 = converted %.loc11_30.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc11_31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed, %.loc14_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, %i32 [template = constants.%.31] -// CHECK:STDOUT: %t.var: ref %.31 = var t -// CHECK:STDOUT: %t: ref %.31 = bind_name t, %t.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %t.var: ref %array_type = var t +// CHECK:STDOUT: %t: ref %array_type = 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 %tuple.type.2 = call %F.ref() // CHECK:STDOUT: %.loc14_23.1: ref %tuple.type.2 = temporary_storage // CHECK:STDOUT: %.loc14_23.2: ref %tuple.type.2 = temporary %.loc14_23.1, %F.call -// CHECK:STDOUT: %.loc14_23.3: ref %i32 = tuple_access %.loc14_23.2, element0 -// CHECK:STDOUT: %.loc14_23.4: %i32 = bind_value %.loc14_23.3 -// CHECK:STDOUT: %.loc14_23.5: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_23.6: ref %i32 = array_index %t.var, %.loc14_23.5 -// CHECK:STDOUT: %.loc14_23.7: init %i32 = initialize_from %.loc14_23.4 to %.loc14_23.6 -// CHECK:STDOUT: %.loc14_23.8: init %.31 = array_init (%.loc14_23.7) to %t.var -// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_23.8 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc14_23.2, element0 +// CHECK:STDOUT: %.loc14_23.3: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc14_23.4: ref %i32 = array_index %t.var, %int_0 +// CHECK:STDOUT: %.loc14_23.5: init %i32 = initialize_from %.loc14_23.3 to %.loc14_23.4 +// CHECK:STDOUT: %.loc14_23.6: init %array_type = array_init (%.loc14_23.5) to %t.var +// CHECK:STDOUT: %.loc14_24: init %array_type = converted %F.call, %.loc14_23.6 // 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 9f4a12659887b..d92779d5dd3a9 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -14,32 +14,32 @@ var b: [i32; 3] = a; // CHECK:STDOUT: --- assign_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.36: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.32, %.35, %.38) [template] -// CHECK:STDOUT: %.39: type = array_type %.5, %i32 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,12 +58,12 @@ var b: [i32; 3] = a; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] // CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14, %int.make_type_signed.loc11_19) // CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11_9, %.loc11_22.2 [template = constants.%i32] @@ -74,64 +74,64 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.3: type = converted %int.make_type_signed.loc12, %.loc12_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, %i32 [template = constants.%.39] -// CHECK:STDOUT: %b.var: ref %.39 = var b -// CHECK:STDOUT: %b: ref %.39 = bind_name b, %b.var +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_signed.loc12, %.loc12_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %b.var: ref %array_type = var b +// CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_30: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%.loc11_27, %.loc11_30, %.loc11_33) -// CHECK:STDOUT: %.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.3: = bound_method %.loc11_27, %.loc11_34.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_34.4: = specific_function %.loc11_34.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %.loc11_34.4(%.loc11_27) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_34.5: init %i32 = converted %.loc11_27, %int.convert_checked.loc11_34.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_34.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_34.7: init %i32 = initialize_from %.loc11_34.5 to %.loc11_34.6 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_34.8: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.9: = bound_method %.loc11_30, %.loc11_34.8 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_34.10: = specific_function %.loc11_34.9, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %.loc11_34.10(%.loc11_30) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_34.11: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_34.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_34.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_34.13: init %i32 = initialize_from %.loc11_34.11 to %.loc11_34.12 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_34.14: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.15: = bound_method %.loc11_33, %.loc11_34.14 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_34.16: = specific_function %.loc11_34.15, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %.loc11_34.16(%.loc11_33) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_34.17: init %i32 = converted %.loc11_33, %int.convert_checked.loc11_34.3 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_34.18: ref %i32 = tuple_access file.%a.var, element2 -// CHECK:STDOUT: %.loc11_34.19: init %i32 = initialize_from %.loc11_34.17 to %.loc11_34.18 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_34.20: init %tuple.type.2 = tuple_init (%.loc11_34.7, %.loc11_34.13, %.loc11_34.19) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_35: init %tuple.type.2 = converted %.loc11_34.1, %.loc11_34.20 [template = constants.%tuple] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11, %int_3) +// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_34.1: = bound_method %int_1.loc11, %impl.elem0.loc11_34.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_34.1: = specific_function %Convert.bound.loc11_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %Convert.specific_fn.loc11_34.1(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_34.2: init %i32 = converted %int_1.loc11, %int.convert_checked.loc11_34.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc11: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_34.3: init %i32 = initialize_from %.loc11_34.2 to %tuple.elem0.loc11 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_34.2: = bound_method %int_2.loc11, %impl.elem0.loc11_34.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_34.2: = specific_function %Convert.bound.loc11_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %Convert.specific_fn.loc11_34.2(%int_2.loc11) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_34.4: init %i32 = converted %int_2.loc11, %int.convert_checked.loc11_34.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_34.5: init %i32 = initialize_from %.loc11_34.4 to %tuple.elem1.loc11 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_34.3: = bound_method %int_3, %impl.elem0.loc11_34.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_34.3: = specific_function %Convert.bound.loc11_34.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %Convert.specific_fn.loc11_34.3(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_34.6: init %i32 = converted %int_3, %int.convert_checked.loc11_34.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %tuple.elem2.loc11: ref %i32 = tuple_access file.%a.var, element2 +// CHECK:STDOUT: %.loc11_34.7: init %i32 = initialize_from %.loc11_34.6 to %tuple.elem2.loc11 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_34.8: init %tuple.type.2 = tuple_init (%.loc11_34.3, %.loc11_34.5, %.loc11_34.7) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_35: init %tuple.type.2 = converted %.loc11_34.1, %.loc11_34.8 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_35 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_19.1: ref %i32 = tuple_access %a.ref, element0 -// CHECK:STDOUT: %.loc12_19.2: %i32 = bind_value %.loc12_19.1 -// CHECK:STDOUT: %.loc12_19.3: Core.IntLiteral = int_value 0 [template = constants.%.41] -// CHECK:STDOUT: %.loc12_19.4: ref %i32 = array_index file.%b.var, %.loc12_19.3 -// CHECK:STDOUT: %.loc12_19.5: init %i32 = initialize_from %.loc12_19.2 to %.loc12_19.4 -// CHECK:STDOUT: %.loc12_19.6: ref %i32 = tuple_access %a.ref, element1 -// CHECK:STDOUT: %.loc12_19.7: %i32 = bind_value %.loc12_19.6 -// CHECK:STDOUT: %.loc12_19.8: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_19.9: ref %i32 = array_index file.%b.var, %.loc12_19.8 -// CHECK:STDOUT: %.loc12_19.10: init %i32 = initialize_from %.loc12_19.7 to %.loc12_19.9 -// CHECK:STDOUT: %.loc12_19.11: ref %i32 = tuple_access %a.ref, element2 -// CHECK:STDOUT: %.loc12_19.12: %i32 = bind_value %.loc12_19.11 -// CHECK:STDOUT: %.loc12_19.13: Core.IntLiteral = int_value 2 [template = constants.%.4] -// 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 %.39 = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var -// CHECK:STDOUT: %.loc12_20: init %.39 = converted %a.ref, %.loc12_19.16 +// CHECK:STDOUT: %tuple.elem0.loc12: ref %i32 = tuple_access %a.ref, element0 +// CHECK:STDOUT: %.loc12_19.1: %i32 = bind_value %tuple.elem0.loc12 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_19.2: ref %i32 = array_index file.%b.var, %int_0 +// CHECK:STDOUT: %.loc12_19.3: init %i32 = initialize_from %.loc12_19.1 to %.loc12_19.2 +// CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %a.ref, element1 +// CHECK:STDOUT: %.loc12_19.4: %i32 = bind_value %tuple.elem1.loc12 +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_19.5: ref %i32 = array_index file.%b.var, %int_1.loc12 +// CHECK:STDOUT: %.loc12_19.6: init %i32 = initialize_from %.loc12_19.4 to %.loc12_19.5 +// CHECK:STDOUT: %tuple.elem2.loc12: ref %i32 = tuple_access %a.ref, element2 +// CHECK:STDOUT: %.loc12_19.7: %i32 = bind_value %tuple.elem2.loc12 +// CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc12_19.8: ref %i32 = array_index file.%b.var, %int_2.loc12 +// CHECK:STDOUT: %.loc12_19.9: init %i32 = initialize_from %.loc12_19.7 to %.loc12_19.8 +// CHECK:STDOUT: %.loc12_19.10: init %array_type = array_init (%.loc12_19.3, %.loc12_19.6, %.loc12_19.9) to file.%b.var +// CHECK:STDOUT: %.loc12_20: init %array_type = converted %a.ref, %.loc12_19.10 // 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 bcfb6ec140151..c398b4bf4dc82 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -15,39 +15,39 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.32) [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_1.2) [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, f64 [template] -// CHECK:STDOUT: %.37: f64 = float_literal 11.100000000000001 [template] -// CHECK:STDOUT: %.38: f64 = float_literal 2.2000000000000002 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_2, f64 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 11.100000000000001 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2.2000000000000002 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64) [template] -// CHECK:STDOUT: %array.2: %.35 = tuple_value (%.37, %.38) [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.40: type = array_type %.39, %empty_tuple.type [template] +// CHECK:STDOUT: %array.2: %array_type.2 = tuple_value (%float.1, %float.2) [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %array_type.3: type = array_type %int_5, %empty_tuple.type [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %array.3: %.40 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %array.3: %array_type.3 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,56 +68,56 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.33] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 2 [template = constants.%.34] -// 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.%.35] -// CHECK:STDOUT: %b.var: ref %.35 = var b -// CHECK:STDOUT: %b: ref %.35 = bind_name b, %b.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc11: type = array_type %int_1, %i32 [template = constants.%array_type.1] +// CHECK:STDOUT: %a.var: ref %array_type.1 = var a +// CHECK:STDOUT: %a: ref %array_type.1 = bind_name a, %a.var +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc12_9.2: type = converted %float.make_type, %.loc12_9.1 [template = f64] +// CHECK:STDOUT: %array_type.loc12: type = array_type %int_2, f64 [template = constants.%array_type.2] +// CHECK:STDOUT: %b.var: ref %array_type.2 = var b +// CHECK:STDOUT: %b: ref %array_type.2 = bind_name b, %b.var // CHECK:STDOUT: %.loc13_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_13: Core.IntLiteral = int_value 5 [template = constants.%.39] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] // CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc13_14: type = array_type %.loc13_13, %empty_tuple.type [template = constants.%.40] -// CHECK:STDOUT: %c.var: ref %.40 = var c -// CHECK:STDOUT: %c: ref %.40 = bind_name c, %c.var +// CHECK:STDOUT: %array_type.loc13: type = array_type %int_5, %empty_tuple.type [template = constants.%array_type.3] +// CHECK:STDOUT: %c.var: ref %array_type.3 = var c +// CHECK:STDOUT: %c: ref %array_type.3 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_20, %.loc11_22.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.4(%.loc11_20) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_22.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc11_22.6: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_22.7: ref %i32 = array_index file.%a.var, %.loc11_22.6 -// CHECK:STDOUT: %.loc11_22.8: init %i32 = initialize_from %.loc11_22.5 to %.loc11_22.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_22.9: init %.3 = array_init (%.loc11_22.8) to file.%a.var [template = constants.%array.1] -// CHECK:STDOUT: %.loc11_23: init %.3 = converted %.loc11_22.1, %.loc11_22.9 [template = constants.%array.1] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int_1.loc11) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc11, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_22.2: init %i32 = converted %int_1.loc11, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_22.3: ref %i32 = array_index file.%a.var, %int_0.loc11 +// CHECK:STDOUT: %.loc11_22.4: init %i32 = initialize_from %.loc11_22.2 to %.loc11_22.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_22.5: init %array_type.1 = array_init (%.loc11_22.4) to file.%a.var [template = constants.%array.1] +// CHECK:STDOUT: %.loc11_23: init %array_type.1 = 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.%.37] -// CHECK:STDOUT: %.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_30.1: %tuple.type.2 = tuple_literal (%.loc12_20, %.loc12_26) -// CHECK:STDOUT: %.loc12_30.2: Core.IntLiteral = int_value 0 [template = constants.%.5] -// 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.%.37] -// CHECK:STDOUT: %.loc12_30.5: Core.IntLiteral = int_value 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.%.38] -// CHECK:STDOUT: %.loc12_30.8: init %.35 = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2] -// CHECK:STDOUT: %.loc12_31: init %.35 = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2] +// CHECK:STDOUT: %float.loc12_20: f64 = float_literal 11.100000000000001 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%float.2] +// CHECK:STDOUT: %.loc12_30.1: %tuple.type.2 = tuple_literal (%float.loc12_20, %float.loc12_26) +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_30.2: ref f64 = array_index file.%b.var, %int_0.loc12 +// CHECK:STDOUT: %.loc12_30.3: init f64 = initialize_from %float.loc12_20 to %.loc12_30.2 [template = constants.%float.1] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_30.4: ref f64 = array_index file.%b.var, %int_1.loc12 +// CHECK:STDOUT: %.loc12_30.5: init f64 = initialize_from %float.loc12_26 to %.loc12_30.4 [template = constants.%float.2] +// CHECK:STDOUT: %.loc12_30.6: init %array_type.2 = array_init (%.loc12_30.3, %.loc12_30.5) to file.%b.var [template = constants.%array.2] +// CHECK:STDOUT: %.loc12_31: init %array_type.2 = converted %.loc12_30.1, %.loc12_30.6 [template = constants.%array.2] // CHECK:STDOUT: assign file.%b.var, %.loc12_31 // CHECK:STDOUT: %.loc13_20.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_24.1: %empty_tuple.type = tuple_literal () @@ -125,28 +125,28 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc13_32.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_36.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_38.1: %tuple.type.3 = tuple_literal (%.loc13_20.1, %.loc13_24.1, %.loc13_28.1, %.loc13_32.1, %.loc13_36.1) -// CHECK:STDOUT: %.loc13_38.2: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_38.3: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.2 -// CHECK:STDOUT: %.loc13_20.2: init %empty_tuple.type = tuple_init () to %.loc13_38.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.4: init %empty_tuple.type = converted %.loc13_20.1, %.loc13_20.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.5: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_38.6: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.5 -// CHECK:STDOUT: %.loc13_24.2: init %empty_tuple.type = tuple_init () to %.loc13_38.6 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.7: init %empty_tuple.type = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.8: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_38.9: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.8 -// CHECK:STDOUT: %.loc13_28.2: init %empty_tuple.type = tuple_init () to %.loc13_38.9 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.10: init %empty_tuple.type = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.11: Core.IntLiteral = int_value 3 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_38.12: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.11 -// CHECK:STDOUT: %.loc13_32.2: init %empty_tuple.type = tuple_init () to %.loc13_38.12 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.13: init %empty_tuple.type = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.14: Core.IntLiteral = int_value 4 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_38.15: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.14 -// CHECK:STDOUT: %.loc13_36.2: init %empty_tuple.type = tuple_init () to %.loc13_38.15 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.16: init %empty_tuple.type = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.17: init %.40 = 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 %.40 = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc13_38.2: ref %empty_tuple.type = array_index file.%c.var, %int_0.loc13 +// CHECK:STDOUT: %.loc13_20.2: init %empty_tuple.type = tuple_init () to %.loc13_38.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.3: init %empty_tuple.type = converted %.loc13_20.1, %.loc13_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc13_38.4: ref %empty_tuple.type = array_index file.%c.var, %int_1.loc13 +// CHECK:STDOUT: %.loc13_24.2: init %empty_tuple.type = tuple_init () to %.loc13_38.4 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.5: init %empty_tuple.type = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc13_38.6: ref %empty_tuple.type = array_index file.%c.var, %int_2 +// CHECK:STDOUT: %.loc13_28.2: init %empty_tuple.type = tuple_init () to %.loc13_38.6 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.7: init %empty_tuple.type = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc13_38.8: ref %empty_tuple.type = array_index file.%c.var, %int_3 +// CHECK:STDOUT: %.loc13_32.2: init %empty_tuple.type = tuple_init () to %.loc13_38.8 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.9: init %empty_tuple.type = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc13_38.10: ref %empty_tuple.type = array_index file.%c.var, %int_4 +// CHECK:STDOUT: %.loc13_36.2: init %empty_tuple.type = tuple_init () to %.loc13_38.10 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.11: init %empty_tuple.type = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_38.12: init %array_type.3 = array_init (%.loc13_38.3, %.loc13_38.5, %.loc13_38.7, %.loc13_38.9, %.loc13_38.11) to file.%c.var [template = constants.%array.3] +// CHECK:STDOUT: %.loc13_39: init %array_type.3 = converted %.loc13_38.1, %.loc13_38.12 [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 791e6bd2bbb28..77c5ea3a44267 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -18,50 +18,50 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: --- canonicalize_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %ConvertToU32.type: type = fn_type @ConvertToU32 [template] // CHECK:STDOUT: %ConvertToU32: %ConvertToU32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.42: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %array: %.39 = tuple_value (%.30, %.33, %.34) [template] -// CHECK:STDOUT: %.44: %u32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.5, @impl.4(%.1) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template] +// CHECK:STDOUT: %int_3.3: %u32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.5, @impl.4(%int_32) [template] // CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %.45: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %.46: = bound_method %.44, %Convert.16 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.5(%.1) [template] +// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.16) [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.3, %Convert.16 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.5(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,18 +92,18 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%.loc11_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_signed.loc11_27, %.loc11_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -117,80 +117,80 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.3: type = converted %int.make_type_signed, %.loc12_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc12_28.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc12_28.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc12_28.3: type = converted %int.make_type_unsigned, %.loc12_28.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed, %.loc12_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc12_28) [template = constants.%u32] +// CHECK:STDOUT: %.loc12_28.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc12_28.2: type = converted %int.make_type_unsigned, %.loc12_28.1 [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_9.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc14_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_21.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_18.3: = bound_method %.loc14_18.1, %.loc14_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_18.4: = specific_function %.loc14_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %.loc14_18.4(%.loc14_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_18.5: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_18.6: %i32 = converted %.loc14_18.1, %.loc14_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_21.3: = bound_method %.loc14_21.1, %.loc14_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_21.4: = specific_function %.loc14_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %.loc14_21.4(%.loc14_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_21.5: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_21.6: %i32 = converted %.loc14_21.1, %.loc14_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.6, %.loc14_21.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed.loc14, %.loc14_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_22.2: = bound_method %int.sadd, %.loc14_22.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_22.3: = specific_function %.loc14_22.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_22.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc14_22.5: %i32 = converted %int.sadd, %.loc14_22.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %.loc14_22.3(%.loc14_22.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc14_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_22 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_22.7: Core.IntLiteral = converted %int.sadd, %.loc14_22.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_22.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %a.var: ref %.39 = var a -// CHECK:STDOUT: %a: ref %.39 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 3 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_9.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.3: type = converted %int.make_type_signed.loc15, %.loc15_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc15_16: type = ptr_type %.39 [template = constants.%.40] -// CHECK:STDOUT: %.loc16_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_9.1) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc14_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_18: = bound_method %int_1, %impl.elem0.loc14_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_18: = specific_function %Convert.bound.loc14_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %Convert.specific_fn.loc14_18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_18.1: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_18.2: %i32 = converted %int_1, %.loc14_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_21: = bound_method %int_2, %impl.elem0.loc14_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_21: = specific_function %Convert.bound.loc14_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %Convert.specific_fn.loc14_21(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_21.1: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_21.2: %i32 = converted %int_2, %.loc14_21.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.2, %.loc14_21.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed.loc14, %.loc14_9.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc14_22: = bound_method %int.sadd, %impl.elem0.loc14_22 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc14_22: = specific_function %Convert.bound.loc14_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc14_22.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_22.2: %i32 = converted %int.sadd, %.loc14_22.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %Convert.specific_fn.loc14_22(%.loc14_22.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_22 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_22.4: Core.IntLiteral = converted %int.sadd, %.loc14_22.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type.loc14: type = array_type %.loc14_22.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed.loc15, %.loc15_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc15: type = array_type %int_3.loc15, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type [template = constants.%ptr] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] // CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [template = constants.%ConvertToU32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 3 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_27.3: = bound_method %.loc16_27.1, %.loc16_27.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc16_27.4: = specific_function %.loc16_27.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %.loc16_27.4(%.loc16_27.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_27.5: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_27.6: %i32 = converted %.loc16_27.1, %.loc16_27.5 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed.loc16, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_28.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %.loc16_28.2: = bound_method %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc16_28.3: = specific_function %.loc16_28.2, @Convert.5(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %.loc16_28.4: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%.44] -// CHECK:STDOUT: %.loc16_28.5: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.4 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %.loc16_28.3(%.loc16_28.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc16_28.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_28.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_28.7: Core.IntLiteral = converted %int.convert_checked.loc16_28.1, %.loc16_28.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_28.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc16_30: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_27: = bound_method %int_3.loc16, %impl.elem0.loc16_27 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc16_27: = specific_function %Convert.bound.loc16_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %Convert.specific_fn.loc16_27(%int_3.loc16) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc16_27.1: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc16_27.2: %i32 = converted %int_3.loc16, %.loc16_27.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.2) [template = constants.%int_3.3] +// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed.loc16, %.loc16_9.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.6 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %Convert.bound.loc16_28: = bound_method %int.convert_checked.loc16_28.1, %impl.elem0.loc16_28 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc16_28: = specific_function %Convert.bound.loc16_28, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %.loc16_28.1: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%int_3.3] +// CHECK:STDOUT: %.loc16_28.2: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%int_3.3] +// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_28(%.loc16_28.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc16_28.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_28.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc16_28.4: Core.IntLiteral = converted %int.convert_checked.loc16_28.1, %.loc16_28.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type.loc16: type = array_type %.loc16_28.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr.loc16: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; @@ -199,43 +199,43 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_28: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 3 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%.loc14_28, %.loc14_31, %.loc14_34) -// CHECK:STDOUT: %.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.3: = bound_method %.loc14_28, %.loc14_35.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_35.4: = specific_function %.loc14_35.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %.loc14_35.4(%.loc14_28) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_35.5: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_35.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_35.6: Core.IntLiteral = int_value 0 [template = constants.%.41] -// CHECK:STDOUT: %.loc14_35.7: ref %i32 = array_index file.%a.var, %.loc14_35.6 -// CHECK:STDOUT: %.loc14_35.8: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_35.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.10: = bound_method %.loc14_31, %.loc14_35.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_35.11: = specific_function %.loc14_35.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %.loc14_35.11(%.loc14_31) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_35.12: init %i32 = converted %.loc14_31, %int.convert_checked.loc14_35.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_35.13: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_35.14: ref %i32 = array_index file.%a.var, %.loc14_35.13 -// CHECK:STDOUT: %.loc14_35.15: init %i32 = initialize_from %.loc14_35.12 to %.loc14_35.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_35.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.17: = bound_method %.loc14_34, %.loc14_35.16 [template = constants.%.42] -// CHECK:STDOUT: %.loc14_35.18: = specific_function %.loc14_35.17, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %.loc14_35.18(%.loc14_34) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_35.19: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35.3 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_35.20: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_35.21: ref %i32 = array_index file.%a.var, %.loc14_35.20 -// CHECK:STDOUT: %.loc14_35.22: init %i32 = initialize_from %.loc14_35.19 to %.loc14_35.21 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_35.23: init %.39 = array_init (%.loc14_35.8, %.loc14_35.15, %.loc14_35.22) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc14_36: init %.39 = converted %.loc14_35.1, %.loc14_35.23 [template = constants.%array] +// CHECK:STDOUT: %int_1.loc14_28: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%int_1.loc14_28, %int_2.loc14_31, %int_3) +// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_35.1: = bound_method %int_1.loc14_28, %impl.elem0.loc14_35.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_35.1: = specific_function %Convert.bound.loc14_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %Convert.specific_fn.loc14_35.1(%int_1.loc14_28) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_35.2: init %i32 = converted %int_1.loc14_28, %int.convert_checked.loc14_35.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc14_35.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc14_35.4: init %i32 = initialize_from %.loc14_35.2 to %.loc14_35.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_35.2: = bound_method %int_2.loc14_31, %impl.elem0.loc14_35.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_35.2: = specific_function %Convert.bound.loc14_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %Convert.specific_fn.loc14_35.2(%int_2.loc14_31) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_35.5: init %i32 = converted %int_2.loc14_31, %int.convert_checked.loc14_35.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc14_35.6: ref %i32 = array_index file.%a.var, %int_1.loc14_35 +// CHECK:STDOUT: %.loc14_35.7: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_35.3: = bound_method %int_3, %impl.elem0.loc14_35.3 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc14_35.3: = specific_function %Convert.bound.loc14_35.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %Convert.specific_fn.loc14_35.3(%int_3) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_35.8: init %i32 = converted %int_3, %int.convert_checked.loc14_35.3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2.loc14_35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc14_35.9: ref %i32 = array_index file.%a.var, %int_2.loc14_35 +// CHECK:STDOUT: %.loc14_35.10: init %i32 = initialize_from %.loc14_35.8 to %.loc14_35.9 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_35.11: init %array_type = array_init (%.loc14_35.4, %.loc14_35.7, %.loc14_35.10) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc14_36: init %array_type = converted %.loc14_35.1, %.loc14_35.11 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc14_36 -// CHECK:STDOUT: %a.ref.loc15: ref %.39 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: %.40 = addr_of %a.ref.loc15 -// CHECK:STDOUT: %b: %.40 = bind_name b, %.loc15 -// CHECK:STDOUT: %a.ref.loc16: ref %.39 = name_ref a, file.%a -// CHECK:STDOUT: %.loc16: %.40 = addr_of %a.ref.loc16 -// CHECK:STDOUT: %c: %.40 = bind_name c, %.loc16 +// CHECK:STDOUT: %a.ref.loc15: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %addr.loc15: %ptr = addr_of %a.ref.loc15 +// CHECK:STDOUT: %b: %ptr = bind_name b, %addr.loc15 +// CHECK:STDOUT: %a.ref.loc16: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %addr.loc16: %ptr = addr_of %a.ref.loc16 +// CHECK:STDOUT: %c: %ptr = bind_name c, %addr.loc16 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 8f6b69f36f281..800b5a21b4624 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -18,28 +18,28 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: --- fail_bound_negative.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,41 +64,41 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed.loc11_14, %.loc11_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%.loc11_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11_22, %.loc11_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_14, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11_22, %.loc11_22.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_9.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc16_21.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc16_22.2: = bound_method %int.snegate, %.loc16_22.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_22.3: = specific_function %.loc16_22.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc16_22.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc16_22.5: %i32 = converted %int.snegate, %.loc16_22.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %.loc16_22.3(%.loc16_22.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_22 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_22.7: Core.IntLiteral = converted %int.snegate, %.loc16_22.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_22.7, %i32 [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_21: = bound_method %int_1, %impl.elem0.loc16_21 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc16_21: = specific_function %Convert.bound.loc16_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %Convert.specific_fn.loc16_21(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_1, %.loc16_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed, %.loc16_9.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc16_22: = bound_method %int.snegate, %impl.elem0.loc16_22 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16_22: = specific_function %Convert.bound.loc16_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc16_22.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc16_22.2: %i32 = converted %int.snegate, %.loc16_22.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %Convert.specific_fn.loc16_22(%.loc16_22.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc16_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_22 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc16_22.4: Core.IntLiteral = converted %int.snegate, %.loc16_22.3 [template = constants.%int_-1.2] +// CHECK:STDOUT: %array_type: type = array_type %.loc16_22.4, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 690ad9fa43eb6..c52f0c50ba635 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -25,12 +25,12 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: --- fail_bound_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 39999999999999999993 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,18 +49,18 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.3: type = converted %int.make_type_signed, %.loc15_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34: type = array_type %.loc15_14, %i32 [template = ] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_39999999999999999993.loc15: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993] +// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed, %.loc15_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc15: type = array_type %int_39999999999999999993.loc15, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %.loc23_9.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_12: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_9.2: type = converted %.loc23_9.1, [template = ] -// CHECK:STDOUT: %.loc23_32: type = array_type %.loc23_12, [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_39999999999999999993.loc23: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993] +// CHECK:STDOUT: %.loc23: type = converted %int_1, [template = ] +// CHECK:STDOUT: %array_type.loc23: type = array_type %int_39999999999999999993.loc23, [template = ] // CHECK:STDOUT: %b.var: ref = var b // CHECK:STDOUT: %b: ref = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_incomplete_element.carbon b/toolchain/check/testdata/array/fail_incomplete_element.carbon index 99dcf0d3b8acd..1d71e7496c870 100644 --- a/toolchain/check/testdata/array/fail_incomplete_element.carbon +++ b/toolchain/check/testdata/array/fail_incomplete_element.carbon @@ -24,10 +24,10 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.2: type = array_type %.1, %Incomplete [template] -// CHECK:STDOUT: %.3: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %Incomplete [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,14 +47,14 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: %Core.import = import Core // 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: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_22: type = array_type %.loc19_21, %Incomplete [template = constants.%.2] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %Incomplete [template = constants.%array_type] // 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 %.3 = var p -// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] +// CHECK:STDOUT: %p.var: ref %ptr = var p +// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; @@ -62,8 +62,8 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: ref = name_ref a, file.%a -// CHECK:STDOUT: %.loc21_25: Core.IntLiteral = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc21_22: = addr_of [template = ] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %addr: = addr_of [template = ] // CHECK:STDOUT: assign file.%p.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 4903f905f5d29..0da5e35b5dda6 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -19,7 +19,7 @@ var a: [1; 1]; // CHECK:STDOUT: --- fail_invalid_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -36,10 +36,10 @@ var a: [1; 1]; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_9.1: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_12: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_9.2: type = converted %.loc17_9.1, [template = ] -// CHECK:STDOUT: %.loc17_13: type = array_type %.loc17_12, [template = ] +// CHECK:STDOUT: %int_1.loc17_9: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_1.loc17_12: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc17: type = converted %int_1.loc17_9, [template = ] +// CHECK:STDOUT: %array_type: type = array_type %int_1.loc17_12, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index cfaf01267d34d..6ee019eca07a6 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -16,14 +16,14 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: --- fail_out_of_bound.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -41,22 +41,22 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed, %.loc14_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15: type = array_type %.loc14_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed, %.loc14_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_20: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_23: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_26: Core.IntLiteral = int_value 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_27: %tuple.type = tuple_literal (%.loc14_20, %.loc14_23, %.loc14_26) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc14: %tuple.type = tuple_literal (%int_1, %int_2, %int_3) // 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 0ab5ef9bf7567..d4c2f23e3de33 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 @@ -17,32 +17,32 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: --- fail_out_of_bound_non_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] -// CHECK:STDOUT: %.41: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.41 = struct_value (%.2) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %struct_type.index: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_3.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,74 +61,74 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_27.7: ref %i32 = array_index file.%a.var, %.loc11_27.6 -// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.14: ref %i32 = array_index file.%a.var, %.loc11_27.13 -// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.21: ref %i32 = array_index file.%a.var, %.loc11_27.20 -// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.23: init %.3 = array_init (%.loc11_27.8, %.loc11_27.15, %.loc11_27.22) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.23 [template = constants.%array] +// CHECK:STDOUT: %int_1.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc11: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_1.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %int_2.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3.loc11, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3.loc11) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_27.8: init %i32 = converted %int_3.loc11, %int.convert_checked.loc11_27.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc11_27: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_27.9: ref %i32 = array_index file.%a.var, %int_2.loc11_27 +// CHECK:STDOUT: %.loc11_27.10: init %i32 = initialize_from %.loc11_27.8 to %.loc11_27.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_27.11: init %array_type = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_28: init %array_type = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_26: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_27.1: %.41 = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: %.41 = struct_value (%.loc15_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_27.2: %.41 = converted %.loc15_27.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.3: type = converted %int.make_type_signed, %.loc15_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_28.1, %.loc15_28.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_28.4(%.loc15_28.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc15_28.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_28.6: %i32 = converted %.loc15_28.1, %.loc15_28.5 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_34.4: ref %i32 = array_index %a.ref, %.loc15_28.6 [template = ] -// CHECK:STDOUT: %.loc15_34.5: %i32 = bind_value %.loc15_34.4 -// CHECK:STDOUT: assign file.%b.var, %.loc15_34.5 +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc15_27.1: %struct_type.index = struct_literal (%int_3.loc15) +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_3.loc15) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.2: %struct_type.index = converted %.loc15_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_34.2: type = converted %int.make_type_signed, %.loc15_34.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %.loc15_28.1, %impl.elem0.loc15 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%.loc15_28.1) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_28.2: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_28.3: %i32 = converted %.loc15_28.1, %.loc15_28.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_34.3: ref %i32 = array_index %a.ref, %.loc15_28.3 [template = ] +// CHECK:STDOUT: %.loc15_34.4: %i32 = bind_value %.loc15_34.3 +// CHECK:STDOUT: assign file.%b.var, %.loc15_34.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 30d99b380c729..fd3aefda10a89 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -42,27 +42,27 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: String = string_literal "Hello" [template] -// CHECK:STDOUT: %.8: String = string_literal "World" [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %str.1: String = string_literal "Hello" [template] +// CHECK:STDOUT: %str.2: String = string_literal "World" [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, String, String) [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, String, String) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %i32) [template] @@ -88,42 +88,42 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc18_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_9.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_9.3: type = converted %int.make_type_signed.loc18, %.loc18_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15: type = array_type %.loc18_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc20_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc18: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_signed.loc18, %.loc18_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc18: type = array_type %int_3.loc18, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] // CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc20, String, String) // CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] // CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_signed.loc20, %.loc20_29.2 [template = constants.%i32] // CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %t1.var: ref %tuple.type.3 = var t1 // CHECK:STDOUT: %t1: ref %tuple.type.3 = bind_name t1, %t1.var -// CHECK:STDOUT: %.loc28_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%.loc28_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc28_9.2: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_9.3: type = converted %int.make_type_signed.loc28, %.loc28_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_15: type = array_type %.loc28_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %b.var: ref %.3 = var b -// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var -// CHECK:STDOUT: %.loc34_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc34_9.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_9.3: type = converted %int.make_type_signed.loc34, %.loc34_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_15: type = array_type %.loc34_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var -// CHECK:STDOUT: %.loc36_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc36_10: init type = call constants.%Int(%.loc36_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc36_15: init type = call constants.%Int(%.loc36_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc28: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc28_9.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] +// CHECK:STDOUT: %.loc28_9.2: type = converted %int.make_type_signed.loc28, %.loc28_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc28: type = array_type %int_3.loc28, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %b.var: ref %array_type = var b +// CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc34: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc34_9.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_9.2: type = converted %int.make_type_signed.loc34, %.loc34_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc34: type = array_type %int_3.loc34, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %c.var: ref %array_type = var c +// CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc36_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc36_10: init type = call constants.%Int(%int_32.loc36_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc36_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc36_15: init type = call constants.%Int(%int_32.loc36_15) [template = constants.%i32] // CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%int.make_type_signed.loc36_10, %int.make_type_signed.loc36_15) // CHECK:STDOUT: %.loc36_18.2: type = value_of_initializer %int.make_type_signed.loc36_10 [template = constants.%i32] // CHECK:STDOUT: %.loc36_18.3: type = converted %int.make_type_signed.loc36_10, %.loc36_18.2 [template = constants.%i32] @@ -132,44 +132,44 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %t2.var: ref %tuple.type.7 = var t2 // CHECK:STDOUT: %t2: ref %tuple.type.7 = bind_name t2, %t2.var -// CHECK:STDOUT: %.loc40_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%.loc40_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc40_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc40_9.2: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_9.3: type = converted %int.make_type_signed.loc40, %.loc40_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15: type = array_type %.loc40_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %d.var: ref %.3 = var d -// CHECK:STDOUT: %d: ref %.3 = bind_name d, %d.var +// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%int_32.loc40) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc40: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc40_9.1: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] +// CHECK:STDOUT: %.loc40_9.2: type = converted %int.make_type_signed.loc40, %.loc40_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc40: type = array_type %int_3.loc40, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %d.var: ref %array_type = var d +// CHECK:STDOUT: %d: ref %array_type = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_23: String = string_literal "Hello" [template = constants.%.7] -// CHECK:STDOUT: %.loc18_32: String = string_literal "World" [template = constants.%.8] -// CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%.loc18_20, %.loc18_23, %.loc18_32) -// CHECK:STDOUT: %.loc18_39.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_39.3: = bound_method %.loc18_20, %.loc18_39.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_39.4: = specific_function %.loc18_39.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_39.4(%.loc18_20) [template = constants.%.36] -// CHECK:STDOUT: %.loc18_39.5: init %i32 = converted %.loc18_20, %int.convert_checked [template = constants.%.36] -// CHECK:STDOUT: %.loc18_39.6: Core.IntLiteral = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_39.7: ref %i32 = array_index file.%a.var, %.loc18_39.6 -// CHECK:STDOUT: %.loc18_39.8: init %i32 = initialize_from %.loc18_39.5 to %.loc18_39.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_39.9: %i32 = converted %.loc18_23, [template = ] +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %str.loc18_23: String = string_literal "Hello" [template = constants.%str.1] +// CHECK:STDOUT: %str.loc18_32: String = string_literal "World" [template = constants.%str.2] +// CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%int_1.loc18, %str.loc18_23, %str.loc18_32) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc18, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc18) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_39.2: init %i32 = converted %int_1.loc18, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc18_39.3: ref %i32 = array_index file.%a.var, %int_0.loc18 +// CHECK:STDOUT: %.loc18_39.4: init %i32 = initialize_from %.loc18_39.2 to %.loc18_39.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_39.5: %i32 = converted %str.loc18_23, [template = ] // CHECK:STDOUT: assign file.%a.var, // CHECK:STDOUT: %t1.ref: ref %tuple.type.3 = name_ref t1, file.%t1 -// CHECK:STDOUT: %.loc28_19.1: ref %i32 = tuple_access %t1.ref, element0 -// CHECK:STDOUT: %.loc28_19.2: %i32 = bind_value %.loc28_19.1 -// CHECK:STDOUT: %.loc28_19.3: Core.IntLiteral = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc28_19.4: ref %i32 = array_index file.%b.var, %.loc28_19.3 -// CHECK:STDOUT: %.loc28_19.5: init %i32 = initialize_from %.loc28_19.2 to %.loc28_19.4 -// CHECK:STDOUT: %.loc28_19.6: ref String = tuple_access %t1.ref, element1 -// CHECK:STDOUT: %.loc28_19.7: %i32 = converted %.loc28_19.6, [template = ] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %t1.ref, element0 +// CHECK:STDOUT: %.loc28_19.1: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc28_19.2: ref %i32 = array_index file.%b.var, %int_0.loc28 +// CHECK:STDOUT: %.loc28_19.3: init %i32 = initialize_from %.loc28_19.1 to %.loc28_19.2 +// CHECK:STDOUT: %tuple.elem1: ref String = tuple_access %t1.ref, element1 +// CHECK:STDOUT: %.loc28_19.4: %i32 = converted %tuple.elem1, [template = ] // CHECK:STDOUT: assign file.%b.var, -// CHECK:STDOUT: %.loc34_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc34_23: Core.IntLiteral = int_value 2 [template = constants.%.38] -// CHECK:STDOUT: %.loc34_24: %tuple.type.5 = tuple_literal (%.loc34_20, %.loc34_23) +// CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc34: %tuple.type.5 = tuple_literal (%int_1.loc34, %int_2) // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %t2.ref: ref %tuple.type.7 = name_ref t2, file.%t2 // CHECK:STDOUT: assign file.%d.var, diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 3049993447d0b..6c6857b429966 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -19,34 +19,34 @@ fn G() -> i32 { // CHECK:STDOUT: --- function_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,29 +66,29 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %arr.patt: %.3 = binding_pattern arr -// CHECK:STDOUT: %arr.param_patt: %.3 = value_param_pattern %arr.patt, runtime_param0 +// CHECK:STDOUT: %arr.patt: %array_type = binding_pattern arr +// CHECK:STDOUT: %arr.param_patt: %array_type = value_param_pattern %arr.patt, runtime_param0 // CHECK:STDOUT: %i.patt: %i32 = binding_pattern i // CHECK:STDOUT: %i.param_patt: %i32 = value_param_pattern %i.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_12.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.3: type = converted %int.make_type_signed.loc11_12, %.loc11_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, %i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_24: init type = call constants.%Int(%.loc11_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %int.make_type_signed.loc11_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.3: type = converted %int.make_type_signed.loc11_24, %.loc11_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_32: init type = call constants.%Int(%.loc11_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_32.2: type = value_of_initializer %int.make_type_signed.loc11_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_32.3: type = converted %int.make_type_signed.loc11_32, %.loc11_32.2 [template = constants.%i32] -// CHECK:STDOUT: %arr.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %arr: %.3 = bind_name arr, %arr.param +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed.loc11_12, %.loc11_12.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_24: init type = call constants.%Int(%int_32.loc11_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed.loc11_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed.loc11_24, %.loc11_24.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_32: init type = call constants.%Int(%int_32.loc11_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_signed.loc11_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_signed.loc11_32, %.loc11_32.1 [template = constants.%i32] +// CHECK:STDOUT: %arr.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %arr: %array_type = bind_name arr, %arr.param // CHECK:STDOUT: %i.param: %i32 = value_param runtime_param1 // CHECK:STDOUT: %i: %i32 = bind_name i, %i.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 @@ -98,73 +98,73 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_11.3: type = converted %int.make_type_signed, %.loc15_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_11.2: type = converted %int.make_type_signed, %.loc15_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%arr.param_patt: %.3, %i.param_patt: %i32) -> %i32 { +// CHECK:STDOUT: fn @F(%arr.param_patt: %array_type, %i.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: %.3 = name_ref arr, %arr +// CHECK:STDOUT: %arr.ref: %array_type = name_ref arr, %arr // CHECK:STDOUT: %i.ref: %i32 = name_ref i, %i -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed.loc12, %.loc12_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.4: ref %.3 = value_as_ref %arr.ref -// CHECK:STDOUT: %.loc12_15.5: ref %i32 = array_index %.loc12_15.4, %i.ref -// CHECK:STDOUT: %.loc12_15.6: %i32 = bind_value %.loc12_15.5 -// CHECK:STDOUT: return %.loc12_15.6 +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12, %.loc12_15.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.3: ref %array_type = value_as_ref %arr.ref +// CHECK:STDOUT: %.loc12_15.4: ref %i32 = array_index %.loc12_15.3, %i.ref +// CHECK:STDOUT: %.loc12_15.5: %i32 = bind_value %.loc12_15.4 +// CHECK:STDOUT: return %.loc12_15.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc16_13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_16: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc16_19: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19) -// CHECK:STDOUT: %.loc16_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.3: = bound_method %.loc16_13, %.loc16_20.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_20.4: = specific_function %.loc16_20.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %.loc16_20.4(%.loc16_13) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.5: init %i32 = converted %.loc16_13, %int.convert_checked.loc16_20.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.6: ref %.3 = temporary_storage -// CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc16_20.8: ref %i32 = array_index %.loc16_20.6, %.loc16_20.7 -// CHECK:STDOUT: %.loc16_20.9: init %i32 = initialize_from %.loc16_20.5 to %.loc16_20.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.10: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.11: = bound_method %.loc16_16, %.loc16_20.10 [template = constants.%.35] -// CHECK:STDOUT: %.loc16_20.12: = specific_function %.loc16_20.11, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %.loc16_20.12(%.loc16_16) [template = constants.%.37] -// CHECK:STDOUT: %.loc16_20.13: init %i32 = converted %.loc16_16, %int.convert_checked.loc16_20.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc16_20.14: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_20.15: ref %i32 = array_index %.loc16_20.6, %.loc16_20.14 -// CHECK:STDOUT: %.loc16_20.16: init %i32 = initialize_from %.loc16_20.13 to %.loc16_20.15 [template = constants.%.37] -// CHECK:STDOUT: %.loc16_20.17: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.18: = bound_method %.loc16_19, %.loc16_20.17 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_20.19: = specific_function %.loc16_20.18, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %.loc16_20.19(%.loc16_19) [template = constants.%.40] -// CHECK:STDOUT: %.loc16_20.20: init %i32 = converted %.loc16_19, %int.convert_checked.loc16_20.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc16_20.21: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc16_20.22: ref %i32 = array_index %.loc16_20.6, %.loc16_20.21 -// CHECK:STDOUT: %.loc16_20.23: init %i32 = initialize_from %.loc16_20.20 to %.loc16_20.22 [template = constants.%.40] -// CHECK:STDOUT: %.loc16_20.24: init %.3 = array_init (%.loc16_20.9, %.loc16_20.16, %.loc16_20.23) to %.loc16_20.6 [template = constants.%array] -// CHECK:STDOUT: %.loc16_20.25: init %.3 = converted %.loc16_20.1, %.loc16_20.24 [template = constants.%array] -// CHECK:STDOUT: %.loc16_20.26: ref %.3 = temporary %.loc16_20.6, %.loc16_20.25 -// CHECK:STDOUT: %.loc16_20.27: %.3 = bind_value %.loc16_20.26 -// CHECK:STDOUT: %.loc16_23.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_23.3: = bound_method %.loc16_23.1, %.loc16_23.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_23.4: = specific_function %.loc16_23.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %.loc16_23.4(%.loc16_23.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_23.5: %i32 = value_of_initializer %int.convert_checked.loc16_23 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_23.6: %i32 = converted %.loc16_23.1, %.loc16_23.5 [template = constants.%.34] -// CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc16_20.27, %.loc16_23.6) +// CHECK:STDOUT: %int_1.loc16_13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc16_16: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%int_1.loc16_13, %int_2.loc16_16, %int_3) +// CHECK:STDOUT: %int_1.loc16_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_20.1: = bound_method %int_1.loc16_13, %impl.elem0.loc16_20.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc16_20.1: = specific_function %Convert.bound.loc16_20.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %Convert.specific_fn.loc16_20.1(%int_1.loc16_13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_20.2: init %i32 = converted %int_1.loc16_13, %int.convert_checked.loc16_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_20.3: ref %array_type = temporary_storage +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc16_20.4: ref %i32 = array_index %.loc16_20.3, %int_0 +// CHECK:STDOUT: %.loc16_20.5: init %i32 = initialize_from %.loc16_20.2 to %.loc16_20.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_20.2: = bound_method %int_2.loc16_16, %impl.elem0.loc16_20.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16_20.2: = specific_function %Convert.bound.loc16_20.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %Convert.specific_fn.loc16_20.2(%int_2.loc16_16) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_20.6: init %i32 = converted %int_2.loc16_16, %int.convert_checked.loc16_20.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc16_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc16_20.7: ref %i32 = array_index %.loc16_20.3, %int_1.loc16_20 +// CHECK:STDOUT: %.loc16_20.8: init %i32 = initialize_from %.loc16_20.6 to %.loc16_20.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_20.3: = bound_method %int_3, %impl.elem0.loc16_20.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc16_20.3: = specific_function %Convert.bound.loc16_20.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %Convert.specific_fn.loc16_20.3(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc16_20.9: init %i32 = converted %int_3, %int.convert_checked.loc16_20.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc16_20: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc16_20.10: ref %i32 = array_index %.loc16_20.3, %int_2.loc16_20 +// CHECK:STDOUT: %.loc16_20.11: init %i32 = initialize_from %.loc16_20.9 to %.loc16_20.10 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc16_20.12: init %array_type = array_init (%.loc16_20.5, %.loc16_20.8, %.loc16_20.11) to %.loc16_20.3 [template = constants.%array] +// CHECK:STDOUT: %.loc16_20.13: init %array_type = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array] +// CHECK:STDOUT: %.loc16_20.14: ref %array_type = temporary %.loc16_20.3, %.loc16_20.13 +// CHECK:STDOUT: %.loc16_20.15: %array_type = bind_value %.loc16_20.14 +// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_23: = bound_method %int_1.loc16_23, %impl.elem0.loc16_23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc16_23: = specific_function %Convert.bound.loc16_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %Convert.specific_fn.loc16_23(%int_1.loc16_23) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_23.1: %i32 = value_of_initializer %int.convert_checked.loc16_23 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_23.2: %i32 = converted %int_1.loc16_23, %.loc16_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc16_20.15, %.loc16_23.2) // CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc16_25.2: %i32 = converted %F.call, %.loc16_25.1 // CHECK:STDOUT: return %.loc16_25.2 diff --git a/toolchain/check/testdata/array/generic_empty.carbon b/toolchain/check/testdata/array/generic_empty.carbon index b55f8cc84947d..a2843f9ba2341 100644 --- a/toolchain/check/testdata/array/generic_empty.carbon +++ b/toolchain/check/testdata/array/generic_empty.carbon @@ -21,9 +21,9 @@ fn G(T:! type) { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.2: type = array_type %.1, %T [symbolic] -// CHECK:STDOUT: %array: %.2 = tuple_value () [symbolic] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_0, %T [symbolic] +// CHECK:STDOUT: %array: %array_type = tuple_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,19 +53,19 @@ fn G(T:! type) { // CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_17.2: type = array_type constants.%.1, @G.%T.loc11_6.2 (%T) [symbolic = %.loc13_17.2 (constants.%.2)] -// CHECK:STDOUT: %array: @G.%.loc13_17.2 (%.2) = tuple_value () [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %array_type.loc13_17.2: type = array_type constants.%int_0, @G.%T.loc11_6.2 (%T) [symbolic = %array_type.loc13_17.2 (constants.%array_type)] +// CHECK:STDOUT: %array: @G.%array_type.loc13_17.2 (%array_type) = tuple_value () [symbolic = %array (constants.%array)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_16: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_17.1: type = array_type %.loc13_16, %T [symbolic = %.loc13_17.2 (constants.%.2)] -// CHECK:STDOUT: %arr.var: ref @G.%.loc13_17.2 (%.2) = var arr -// CHECK:STDOUT: %arr: ref @G.%.loc13_17.2 (%.2) = bind_name arr, %arr.var +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %array_type.loc13_17.1: type = array_type %int_0, %T [symbolic = %array_type.loc13_17.2 (constants.%array_type)] +// CHECK:STDOUT: %arr.var: ref @G.%array_type.loc13_17.2 (%array_type) = var arr +// CHECK:STDOUT: %arr: ref @G.%array_type.loc13_17.2 (%array_type) = bind_name arr, %arr.var // CHECK:STDOUT: %.loc13_22.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_22.2: init @G.%.loc13_17.2 (%.2) = array_init () to %arr.var [symbolic = %array (constants.%array)] -// CHECK:STDOUT: %.loc13_23: init @G.%.loc13_17.2 (%.2) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %.loc13_22.2: init @G.%array_type.loc13_17.2 (%array_type) = array_init () to %arr.var [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %.loc13_23: init @G.%array_type.loc13_17.2 (%array_type) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)] // CHECK:STDOUT: assign %arr.var, %.loc13_23 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 3b757e3136ac7..02dcf910bcc20 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -14,32 +14,32 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: --- index_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] -// CHECK:STDOUT: %.41: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.41 = struct_value (%.6) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %struct_type.index: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,74 +58,74 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_27.7: ref %i32 = array_index file.%a.var, %.loc11_27.6 -// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.14: ref %i32 = array_index file.%a.var, %.loc11_27.13 -// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.21: ref %i32 = array_index file.%a.var, %.loc11_27.20 -// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_27.23: init %.3 = array_init (%.loc11_27.8, %.loc11_27.15, %.loc11_27.22) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.23 [template = constants.%array] +// CHECK:STDOUT: %int_1.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_1.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %int_2.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_27.8: init %i32 = converted %int_3, %int.convert_checked.loc11_27.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc11_27: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_27.9: ref %i32 = array_index file.%a.var, %int_2.loc11_27 +// CHECK:STDOUT: %.loc11_27.10: init %i32 = initialize_from %.loc11_27.8 to %.loc11_27.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_27.11: init %array_type = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_28: init %array_type = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_26: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_27.1: %.41 = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: %.41 = struct_value (%.loc12_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_27.2: %.41 = converted %.loc12_27.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.3: type = converted %int.make_type_signed, %.loc12_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_34.4: ref %i32 = array_index %a.ref, %.loc12_28.6 -// CHECK:STDOUT: %.loc12_34.5: %i32 = bind_value %.loc12_34.4 -// CHECK:STDOUT: assign file.%b.var, %.loc12_34.5 +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc12_27.1: %struct_type.index = struct_literal (%int_2.loc12) +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2.loc12) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.2: %struct_type.index = converted %.loc12_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_signed, %.loc12_34.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %.loc12_28.1, %impl.elem0.loc12 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%.loc12_28.1) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_28.2: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_28.3: %i32 = converted %.loc12_28.1, %.loc12_28.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_34.3: ref %i32 = array_index %a.ref, %.loc12_28.3 +// CHECK:STDOUT: %.loc12_34.4: %i32 = bind_value %.loc12_34.3 +// CHECK:STDOUT: assign file.%b.var, %.loc12_34.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 1ec23cbb59cba..bc6485d89df44 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -13,54 +13,54 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: --- nine_elements.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_9.1, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %int_8.1: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.13: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.38: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.41: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.44: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.46: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.47: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.49: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.50: = bound_method %.9, %Convert.14 [template] -// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.52: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.53: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.55: %i32 = int_value 6 [template] -// CHECK:STDOUT: %.56: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.57: = specific_function %.56, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.58: %i32 = int_value 7 [template] -// CHECK:STDOUT: %.59: = bound_method %.12, %Convert.14 [template] -// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.61: %i32 = int_value 8 [template] -// CHECK:STDOUT: %.62: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.63: = specific_function %.62, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.64: %i32 = int_value 9 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.40, %.43, %.46, %.49, %.52, %.55, %.58, %.61, %.64) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_8.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] +// CHECK:STDOUT: %Convert.bound.9: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.9: = specific_function %Convert.bound.9, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2, %int_4.2, %int_5.2, %int_6.2, %int_7.2, %int_8.2, %int_9.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,102 +78,102 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 9 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_9, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_29: Core.IntLiteral = int_value 4 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_32: Core.IntLiteral = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_35: Core.IntLiteral = int_value 6 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_38: Core.IntLiteral = int_value 7 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%.12] -// CHECK:STDOUT: %.loc11_44: Core.IntLiteral = int_value 9 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26, %.loc11_29, %.loc11_32, %.loc11_35, %.loc11_38, %.loc11_41, %.loc11_44) -// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_20, %.loc11_45.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %.loc11_45.4(%.loc11_20) [template = constants.%.40] -// CHECK:STDOUT: %.loc11_45.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_45.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_45.6: Core.IntLiteral = int_value 0 [template = constants.%.13] -// CHECK:STDOUT: %.loc11_45.7: ref %i32 = array_index file.%a.var, %.loc11_45.6 -// CHECK:STDOUT: %.loc11_45.8: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.7 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.10: = bound_method %.loc11_23, %.loc11_45.9 [template = constants.%.41] -// CHECK:STDOUT: %.loc11_45.11: = specific_function %.loc11_45.10, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %.loc11_45.11(%.loc11_23) [template = constants.%.43] -// CHECK:STDOUT: %.loc11_45.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_45.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc11_45.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_45.14: ref %i32 = array_index file.%a.var, %.loc11_45.13 -// CHECK:STDOUT: %.loc11_45.15: init %i32 = initialize_from %.loc11_45.12 to %.loc11_45.14 [template = constants.%.43] -// CHECK:STDOUT: %.loc11_45.16: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.17: = bound_method %.loc11_26, %.loc11_45.16 [template = constants.%.44] -// CHECK:STDOUT: %.loc11_45.18: = specific_function %.loc11_45.17, @Convert.2(constants.%.1) [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %.loc11_45.18(%.loc11_26) [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_45.3 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %.loc11_45.20 -// CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.19 to %.loc11_45.21 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.23: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.24: = bound_method %.loc11_29, %.loc11_45.23 [template = constants.%.47] -// CHECK:STDOUT: %.loc11_45.25: = specific_function %.loc11_45.24, @Convert.2(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %.loc11_45.25(%.loc11_29) [template = constants.%.49] -// CHECK:STDOUT: %.loc11_45.26: init %i32 = converted %.loc11_29, %int.convert_checked.loc11_45.4 [template = constants.%.49] -// CHECK:STDOUT: %.loc11_45.27: Core.IntLiteral = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_45.28: ref %i32 = array_index file.%a.var, %.loc11_45.27 -// CHECK:STDOUT: %.loc11_45.29: init %i32 = initialize_from %.loc11_45.26 to %.loc11_45.28 [template = constants.%.49] -// CHECK:STDOUT: %.loc11_45.30: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.31: = bound_method %.loc11_32, %.loc11_45.30 [template = constants.%.50] -// CHECK:STDOUT: %.loc11_45.32: = specific_function %.loc11_45.31, @Convert.2(constants.%.1) [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %.loc11_45.32(%.loc11_32) [template = constants.%.52] -// CHECK:STDOUT: %.loc11_45.33: init %i32 = converted %.loc11_32, %int.convert_checked.loc11_45.5 [template = constants.%.52] -// CHECK:STDOUT: %.loc11_45.34: Core.IntLiteral = int_value 4 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_45.35: ref %i32 = array_index file.%a.var, %.loc11_45.34 -// CHECK:STDOUT: %.loc11_45.36: init %i32 = initialize_from %.loc11_45.33 to %.loc11_45.35 [template = constants.%.52] -// CHECK:STDOUT: %.loc11_45.37: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.38: = bound_method %.loc11_35, %.loc11_45.37 [template = constants.%.53] -// CHECK:STDOUT: %.loc11_45.39: = specific_function %.loc11_45.38, @Convert.2(constants.%.1) [template = constants.%.54] -// CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %.loc11_45.39(%.loc11_35) [template = constants.%.55] -// CHECK:STDOUT: %.loc11_45.40: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_45.6 [template = constants.%.55] -// CHECK:STDOUT: %.loc11_45.41: Core.IntLiteral = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_45.42: ref %i32 = array_index file.%a.var, %.loc11_45.41 -// CHECK:STDOUT: %.loc11_45.43: init %i32 = initialize_from %.loc11_45.40 to %.loc11_45.42 [template = constants.%.55] -// CHECK:STDOUT: %.loc11_45.44: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.45: = bound_method %.loc11_38, %.loc11_45.44 [template = constants.%.56] -// CHECK:STDOUT: %.loc11_45.46: = specific_function %.loc11_45.45, @Convert.2(constants.%.1) [template = constants.%.57] -// CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %.loc11_45.46(%.loc11_38) [template = constants.%.58] -// CHECK:STDOUT: %.loc11_45.47: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_45.7 [template = constants.%.58] -// CHECK:STDOUT: %.loc11_45.48: Core.IntLiteral = int_value 6 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_45.49: ref %i32 = array_index file.%a.var, %.loc11_45.48 -// CHECK:STDOUT: %.loc11_45.50: init %i32 = initialize_from %.loc11_45.47 to %.loc11_45.49 [template = constants.%.58] -// CHECK:STDOUT: %.loc11_45.51: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.52: = bound_method %.loc11_41, %.loc11_45.51 [template = constants.%.59] -// CHECK:STDOUT: %.loc11_45.53: = specific_function %.loc11_45.52, @Convert.2(constants.%.1) [template = constants.%.60] -// CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %.loc11_45.53(%.loc11_41) [template = constants.%.61] -// CHECK:STDOUT: %.loc11_45.54: init %i32 = converted %.loc11_41, %int.convert_checked.loc11_45.8 [template = constants.%.61] -// CHECK:STDOUT: %.loc11_45.55: Core.IntLiteral = int_value 7 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_45.56: ref %i32 = array_index file.%a.var, %.loc11_45.55 -// CHECK:STDOUT: %.loc11_45.57: init %i32 = initialize_from %.loc11_45.54 to %.loc11_45.56 [template = constants.%.61] -// CHECK:STDOUT: %.loc11_45.58: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.59: = bound_method %.loc11_44, %.loc11_45.58 [template = constants.%.62] -// CHECK:STDOUT: %.loc11_45.60: = specific_function %.loc11_45.59, @Convert.2(constants.%.1) [template = constants.%.63] -// CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %.loc11_45.60(%.loc11_44) [template = constants.%.64] -// CHECK:STDOUT: %.loc11_45.61: init %i32 = converted %.loc11_44, %int.convert_checked.loc11_45.9 [template = constants.%.64] -// CHECK:STDOUT: %.loc11_45.62: Core.IntLiteral = int_value 8 [template = constants.%.12] -// CHECK:STDOUT: %.loc11_45.63: ref %i32 = array_index file.%a.var, %.loc11_45.62 -// CHECK:STDOUT: %.loc11_45.64: init %i32 = initialize_from %.loc11_45.61 to %.loc11_45.63 [template = constants.%.64] -// CHECK:STDOUT: %.loc11_45.65: init %.3 = array_init (%.loc11_45.8, %.loc11_45.15, %.loc11_45.22, %.loc11_45.29, %.loc11_45.36, %.loc11_45.43, %.loc11_45.50, %.loc11_45.57, %.loc11_45.64) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_46: init %.3 = converted %.loc11_45.1, %.loc11_45.65 [template = constants.%array] +// CHECK:STDOUT: %int_1.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4.loc11_29: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_5.loc11_32: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_6.loc11_35: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %int_7.loc11_38: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] +// CHECK:STDOUT: %int_8.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] +// CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11_26, %int_4.loc11_29, %int_5.loc11_32, %int_6.loc11_35, %int_7.loc11_38, %int_8.loc11_41, %int_9) +// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_45.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.1: = specific_function %Convert.bound.loc11_45.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %Convert.specific_fn.loc11_45.1(%int_1.loc11_20) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_45.2: init %i32 = converted %int_1.loc11_20, %int.convert_checked.loc11_45.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_45.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_45.4: init %i32 = initialize_from %.loc11_45.2 to %.loc11_45.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_45.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.2: = specific_function %Convert.bound.loc11_45.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %Convert.specific_fn.loc11_45.2(%int_2.loc11_23) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_45.5: init %i32 = converted %int_2.loc11_23, %int.convert_checked.loc11_45.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc11_45: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_45.6: ref %i32 = array_index file.%a.var, %int_1.loc11_45 +// CHECK:STDOUT: %.loc11_45.7: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.3: = bound_method %int_3.loc11_26, %impl.elem0.loc11_45.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.3: = specific_function %Convert.bound.loc11_45.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %Convert.specific_fn.loc11_45.3(%int_3.loc11_26) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_45.8: init %i32 = converted %int_3.loc11_26, %int.convert_checked.loc11_45.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc11_45: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_45.9: ref %i32 = array_index file.%a.var, %int_2.loc11_45 +// CHECK:STDOUT: %.loc11_45.10: init %i32 = initialize_from %.loc11_45.8 to %.loc11_45.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.4: = bound_method %int_4.loc11_29, %impl.elem0.loc11_45.4 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.4: = specific_function %Convert.bound.loc11_45.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %Convert.specific_fn.loc11_45.4(%int_4.loc11_29) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_45.11: init %i32 = converted %int_4.loc11_29, %int.convert_checked.loc11_45.4 [template = constants.%int_4.2] +// CHECK:STDOUT: %int_3.loc11_45: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_45.12: ref %i32 = array_index file.%a.var, %int_3.loc11_45 +// CHECK:STDOUT: %.loc11_45.13: init %i32 = initialize_from %.loc11_45.11 to %.loc11_45.12 [template = constants.%int_4.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.5: = bound_method %int_5.loc11_32, %impl.elem0.loc11_45.5 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.5: = specific_function %Convert.bound.loc11_45.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %Convert.specific_fn.loc11_45.5(%int_5.loc11_32) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc11_45.14: init %i32 = converted %int_5.loc11_32, %int.convert_checked.loc11_45.5 [template = constants.%int_5.2] +// CHECK:STDOUT: %int_4.loc11_45: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc11_45.15: ref %i32 = array_index file.%a.var, %int_4.loc11_45 +// CHECK:STDOUT: %.loc11_45.16: init %i32 = initialize_from %.loc11_45.14 to %.loc11_45.15 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.6: = bound_method %int_6.loc11_35, %impl.elem0.loc11_45.6 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.6: = specific_function %Convert.bound.loc11_45.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] +// CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %Convert.specific_fn.loc11_45.6(%int_6.loc11_35) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_45.17: init %i32 = converted %int_6.loc11_35, %int.convert_checked.loc11_45.6 [template = constants.%int_6.2] +// CHECK:STDOUT: %int_5.loc11_45: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc11_45.18: ref %i32 = array_index file.%a.var, %int_5.loc11_45 +// CHECK:STDOUT: %.loc11_45.19: init %i32 = initialize_from %.loc11_45.17 to %.loc11_45.18 [template = constants.%int_6.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.7: = bound_method %int_7.loc11_38, %impl.elem0.loc11_45.7 [template = constants.%Convert.bound.7] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.7: = specific_function %Convert.bound.loc11_45.7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] +// CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %Convert.specific_fn.loc11_45.7(%int_7.loc11_38) [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc11_45.20: init %i32 = converted %int_7.loc11_38, %int.convert_checked.loc11_45.7 [template = constants.%int_7.2] +// CHECK:STDOUT: %int_6.loc11_45: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %int_6.loc11_45 +// CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.20 to %.loc11_45.21 [template = constants.%int_7.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.8: = bound_method %int_8.loc11_41, %impl.elem0.loc11_45.8 [template = constants.%Convert.bound.8] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.8: = specific_function %Convert.bound.loc11_45.8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] +// CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %Convert.specific_fn.loc11_45.8(%int_8.loc11_41) [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc11_45.23: init %i32 = converted %int_8.loc11_41, %int.convert_checked.loc11_45.8 [template = constants.%int_8.2] +// CHECK:STDOUT: %int_7.loc11_45: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc11_45.24: ref %i32 = array_index file.%a.var, %int_7.loc11_45 +// CHECK:STDOUT: %.loc11_45.25: init %i32 = initialize_from %.loc11_45.23 to %.loc11_45.24 [template = constants.%int_8.2] +// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45.9: = bound_method %int_9, %impl.elem0.loc11_45.9 [template = constants.%Convert.bound.9] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45.9: = specific_function %Convert.bound.loc11_45.9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9] +// CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %Convert.specific_fn.loc11_45.9(%int_9) [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc11_45.26: init %i32 = converted %int_9, %int.convert_checked.loc11_45.9 [template = constants.%int_9.2] +// CHECK:STDOUT: %int_8.loc11_45: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] +// CHECK:STDOUT: %.loc11_45.27: ref %i32 = array_index file.%a.var, %int_8.loc11_45 +// CHECK:STDOUT: %.loc11_45.28: init %i32 = initialize_from %.loc11_45.26 to %.loc11_45.27 [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc11_45.29: init %array_type = 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 %array_type = 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 9561654e841f3..e235554a8c39f 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -109,31 +109,31 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %i32, .y: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.39: type = ptr_type %B [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -165,23 +165,23 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %A.ref.loc18: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc21: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc22: type = ptr_type %B [template = constants.%.39] +// CHECK:STDOUT: %ptr: type = ptr_type %B [template = constants.%ptr.2] // 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: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %A.elem = field_decl y, element1 [template] // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %A = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %A = out_param_pattern %return.patt, runtime_param0 @@ -190,71 +190,71 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %return.param: ref %A = out_param runtime_param0 // CHECK:STDOUT: %return: ref %A = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x = %.loc5_8 // CHECK:STDOUT: .y = %.loc6_8 // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %A { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_26: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_27.1: %.8 = struct_literal (%.loc9_18, %.loc9_26) -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_18, %.loc9_27.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %.loc9_27.4(%.loc9_18) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_27.5: init %i32 = converted %.loc9_18, %int.convert_checked.loc9_27.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_27.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_27.7: init %i32 = initialize_from %.loc9_27.5 to %.loc9_27.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_27.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.9: = bound_method %.loc9_26, %.loc9_27.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_27.10: = specific_function %.loc9_27.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %.loc9_27.10(%.loc9_26) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_27.11: init %i32 = converted %.loc9_26, %int.convert_checked.loc9_27.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_27.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc9_27.13: init %i32 = initialize_from %.loc9_27.11 to %.loc9_27.12 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_27.14: init %A = class_init (%.loc9_27.7, %.loc9_27.13), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc9_28: init %A = converted %.loc9_27.1, %.loc9_27.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc9_27.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc9_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_27.1: = bound_method %int_1, %impl.elem0.loc9_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_27.1: = specific_function %Convert.bound.loc9_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %Convert.specific_fn.loc9_27.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_27.2: init %i32 = converted %int_1, %int.convert_checked.loc9_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_27.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc9_27.4: init %i32 = initialize_from %.loc9_27.2 to %.loc9_27.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_27.2: = bound_method %int_2, %impl.elem0.loc9_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_27.2: = specific_function %Convert.bound.loc9_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %Convert.specific_fn.loc9_27.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_27.5: init %i32 = converted %int_2, %int.convert_checked.loc9_27.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_27.6: ref %i32 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc9_27.7: init %i32 = initialize_from %.loc9_27.5 to %.loc9_27.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_27.8: init %A = class_init (%.loc9_27.4, %.loc9_27.7), %return [template = constants.%A.val] +// CHECK:STDOUT: %.loc9_28: init %A = converted %.loc9_27.1, %.loc9_27.8 [template = constants.%A.val] // CHECK:STDOUT: return %.loc9_28 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_22: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_30: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_31.1: %.8 = struct_literal (%.loc17_22, %.loc17_30) -// CHECK:STDOUT: %.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_31.3: = bound_method %.loc17_22, %.loc17_31.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_31.4: = specific_function %.loc17_31.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %.loc17_31.4(%.loc17_22) [template = constants.%.35] -// CHECK:STDOUT: %.loc17_31.5: init %i32 = converted %.loc17_22, %int.convert_checked.loc17_31.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_31.6: ref %i32 = class_element_access file.%a_ref.var, element0 -// CHECK:STDOUT: %.loc17_31.7: init %i32 = initialize_from %.loc17_31.5 to %.loc17_31.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_31.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_31.9: = bound_method %.loc17_30, %.loc17_31.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc17_31.10: = specific_function %.loc17_31.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %.loc17_31.10(%.loc17_30) [template = constants.%.38] -// CHECK:STDOUT: %.loc17_31.11: init %i32 = converted %.loc17_30, %int.convert_checked.loc17_31.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_31.12: ref %i32 = class_element_access file.%a_ref.var, element1 -// CHECK:STDOUT: %.loc17_31.13: init %i32 = initialize_from %.loc17_31.11 to %.loc17_31.12 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_31.14: init %A = class_init (%.loc17_31.7, %.loc17_31.13), file.%a_ref.var [template = constants.%struct] -// CHECK:STDOUT: %.loc17_32: init %A = converted %.loc17_31.1, %.loc17_31.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc17_31.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc17_31.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_31.1: = bound_method %int_1, %impl.elem0.loc17_31.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc17_31.1: = specific_function %Convert.bound.loc17_31.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %Convert.specific_fn.loc17_31.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_31.2: init %i32 = converted %int_1, %int.convert_checked.loc17_31.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_31.3: ref %i32 = class_element_access file.%a_ref.var, element0 +// CHECK:STDOUT: %.loc17_31.4: init %i32 = initialize_from %.loc17_31.2 to %.loc17_31.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_31.2: = bound_method %int_2, %impl.elem0.loc17_31.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_31.2: = specific_function %Convert.bound.loc17_31.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %Convert.specific_fn.loc17_31.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_31.5: init %i32 = converted %int_2, %int.convert_checked.loc17_31.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_31.6: ref %i32 = class_element_access file.%a_ref.var, element1 +// CHECK:STDOUT: %.loc17_31.7: init %i32 = initialize_from %.loc17_31.5 to %.loc17_31.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_31.8: init %A = class_init (%.loc17_31.4, %.loc17_31.7), file.%a_ref.var [template = constants.%A.val] +// CHECK:STDOUT: %.loc17_32: init %A = converted %.loc17_31.1, %.loc17_31.8 [template = constants.%A.val] // CHECK:STDOUT: assign file.%a_ref.var, %.loc17_32 // CHECK:STDOUT: %a_ref.ref.loc18: ref %A = name_ref a_ref, file.%a_ref // CHECK:STDOUT: %.loc18: %A = bind_value %a_ref.ref.loc18 @@ -268,8 +268,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc22_25.1: ref %B = as_compatible %a_ref.ref.loc22 // CHECK:STDOUT: %.loc22_25.2: ref %B = converted %a_ref.ref.loc22, %.loc22_25.1 -// CHECK:STDOUT: %.loc22_17: %.39 = addr_of %.loc22_25.2 -// CHECK:STDOUT: %b_ptr: %.39 = bind_name b_ptr, %.loc22_17 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc22_25.2 +// CHECK:STDOUT: %b_ptr: %ptr.2 = bind_name b_ptr, %addr // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, @A.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_5: ref %B = splice_block file.%b_factory.var {} @@ -285,19 +285,19 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: = complete_type_witness %i32 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -319,47 +319,47 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Core.import = import Core // 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: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed, %.loc9_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed, %.loc9_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc5_12.2: type = converted %int.make_type_signed, %.loc5_12.1 [template = constants.%i32] // CHECK:STDOUT: adapt_decl %.loc5_12.2 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %i32 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_13: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.3: type = converted %int.make_type_signed.loc8, %.loc8_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_15.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_15.2: = bound_method %.loc8_13, %.loc8_15.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_15.3: = specific_function %.loc8_15.2, @Convert.7(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_15.3(%.loc8_13) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc8_15.5: %i32 = converted %.loc8_13, %.loc8_15.4 [template = constants.%.30] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_signed.loc8, %.loc8_18.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_15.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_15.2: %i32 = converted %int_1, %.loc8_15.1 [template = constants.%int_1.2] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_15.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_15.5, %.loc8_23.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_15.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_15.2, %.loc8_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %a: %A = bind_name a, %.loc8_23.2 // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_signed.loc9, %.loc9_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9, %.loc9_19.1 [template = constants.%i32] // CHECK:STDOUT: %.loc9_16.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc9_16.2: %i32 = converted %a.ref, %.loc9_16.1 // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc9_16.2 @@ -370,12 +370,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -403,53 +403,53 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc4_18: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_19: type = converted %.loc4_18, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_18: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_19: type = converted %.loc4_18, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: adapt_decl %.loc4_19 [template] -// CHECK:STDOUT: %.loc4_21: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc4_21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_13: %.1 = struct_literal () +// CHECK:STDOUT: %.loc9_13: %empty_struct_type = struct_literal () // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// 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: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_15.1: %D = as_compatible %empty_struct [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_15.2: %D = converted %.loc9_13, %.loc9_15.1 [template = constants.%empty_struct] // CHECK:STDOUT: %d: %D = bind_name d, %.loc9_15.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -458,28 +458,28 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %i32, .y: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -509,86 +509,86 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %A.elem = field_decl y, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x = %.loc5_8 // CHECK:STDOUT: .y = %.loc6_8 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_25: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_34.1: %.8 = struct_literal (%.loc13_25, %.loc13_33) +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc13_34.1: %struct_type.x.y.2 = struct_literal (%int_1.loc13, %int_2.loc13) // CHECK:STDOUT: %A.ref.loc13: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_25, %.loc13_34.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %.loc13_34.4(%.loc13_25) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_34.5: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_34.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_34.6: ref %A = temporary_storage -// CHECK:STDOUT: %.loc13_34.7: ref %i32 = class_element_access %.loc13_34.6, element0 -// CHECK:STDOUT: %.loc13_34.8: init %i32 = initialize_from %.loc13_34.5 to %.loc13_34.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_34.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.10: = bound_method %.loc13_33, %.loc13_34.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_34.11: = specific_function %.loc13_34.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %.loc13_34.11(%.loc13_33) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_34.12: init %i32 = converted %.loc13_33, %int.convert_checked.loc13_34.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_34.13: ref %i32 = class_element_access %.loc13_34.6, element1 -// CHECK:STDOUT: %.loc13_34.14: init %i32 = initialize_from %.loc13_34.12 to %.loc13_34.13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_34.15: init %A = class_init (%.loc13_34.8, %.loc13_34.14), %.loc13_34.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_34.16: ref %A = temporary %.loc13_34.6, %.loc13_34.15 -// CHECK:STDOUT: %.loc13_36: ref %A = converted %.loc13_34.1, %.loc13_34.16 +// CHECK:STDOUT: %impl.elem0.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_34.1: = bound_method %int_1.loc13, %impl.elem0.loc13_34.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_34.1: = specific_function %Convert.bound.loc13_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %Convert.specific_fn.loc13_34.1(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.2: init %i32 = converted %int_1.loc13, %int.convert_checked.loc13_34.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.3: ref %A = temporary_storage +// CHECK:STDOUT: %.loc13_34.4: ref %i32 = class_element_access %.loc13_34.3, element0 +// CHECK:STDOUT: %.loc13_34.5: init %i32 = initialize_from %.loc13_34.2 to %.loc13_34.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_34.2: = bound_method %int_2.loc13, %impl.elem0.loc13_34.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_34.2: = specific_function %Convert.bound.loc13_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %Convert.specific_fn.loc13_34.2(%int_2.loc13) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_34.6: init %i32 = converted %int_2.loc13, %int.convert_checked.loc13_34.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_34.7: ref %i32 = class_element_access %.loc13_34.3, element1 +// CHECK:STDOUT: %.loc13_34.8: init %i32 = initialize_from %.loc13_34.6 to %.loc13_34.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_34.9: init %A = class_init (%.loc13_34.5, %.loc13_34.8), %.loc13_34.3 [template = constants.%A.val] +// CHECK:STDOUT: %.loc13_34.10: ref %A = temporary %.loc13_34.3, %.loc13_34.9 +// CHECK:STDOUT: %.loc13_36: ref %A = converted %.loc13_34.1, %.loc13_34.10 // CHECK:STDOUT: %B.ref.loc13: type = name_ref B, file.%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: %.loc24_24: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_32: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc24_33.1: %.8 = struct_literal (%.loc24_24, %.loc24_32) +// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc24: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc24_33.1: %struct_type.x.y.2 = struct_literal (%int_1.loc24, %int_2.loc24) // CHECK:STDOUT: %A.ref.loc24: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_33.3: = bound_method %.loc24_24, %.loc24_33.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc24_33.4: = specific_function %.loc24_33.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %.loc24_33.4(%.loc24_24) [template = constants.%.35] -// CHECK:STDOUT: %.loc24_33.5: init %i32 = converted %.loc24_24, %int.convert_checked.loc24_33.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc24_33.6: ref %A = temporary_storage -// CHECK:STDOUT: %.loc24_33.7: ref %i32 = class_element_access %.loc24_33.6, element0 -// CHECK:STDOUT: %.loc24_33.8: init %i32 = initialize_from %.loc24_33.5 to %.loc24_33.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc24_33.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_33.10: = bound_method %.loc24_32, %.loc24_33.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc24_33.11: = specific_function %.loc24_33.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %.loc24_33.11(%.loc24_32) [template = constants.%.38] -// CHECK:STDOUT: %.loc24_33.12: init %i32 = converted %.loc24_32, %int.convert_checked.loc24_33.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc24_33.13: ref %i32 = class_element_access %.loc24_33.6, element1 -// CHECK:STDOUT: %.loc24_33.14: init %i32 = initialize_from %.loc24_33.12 to %.loc24_33.13 [template = constants.%.38] -// CHECK:STDOUT: %.loc24_33.15: init %A = class_init (%.loc24_33.8, %.loc24_33.14), %.loc24_33.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc24_33.16: ref %A = temporary %.loc24_33.6, %.loc24_33.15 -// CHECK:STDOUT: %.loc24_35: ref %A = converted %.loc24_33.1, %.loc24_33.16 +// CHECK:STDOUT: %impl.elem0.loc24_33.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_33.1: = bound_method %int_1.loc24, %impl.elem0.loc24_33.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc24_33.1: = specific_function %Convert.bound.loc24_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %Convert.specific_fn.loc24_33.1(%int_1.loc24) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_33.2: init %i32 = converted %int_1.loc24, %int.convert_checked.loc24_33.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_33.3: ref %A = temporary_storage +// CHECK:STDOUT: %.loc24_33.4: ref %i32 = class_element_access %.loc24_33.3, element0 +// CHECK:STDOUT: %.loc24_33.5: init %i32 = initialize_from %.loc24_33.2 to %.loc24_33.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_33.2: = bound_method %int_2.loc24, %impl.elem0.loc24_33.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc24_33.2: = specific_function %Convert.bound.loc24_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %Convert.specific_fn.loc24_33.2(%int_2.loc24) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc24_33.6: init %i32 = converted %int_2.loc24, %int.convert_checked.loc24_33.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc24_33.7: ref %i32 = class_element_access %.loc24_33.3, element1 +// CHECK:STDOUT: %.loc24_33.8: init %i32 = initialize_from %.loc24_33.6 to %.loc24_33.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc24_33.9: init %A = class_init (%.loc24_33.5, %.loc24_33.8), %.loc24_33.3 [template = constants.%A.val] +// CHECK:STDOUT: %.loc24_33.10: ref %A = temporary %.loc24_33.3, %.loc24_33.9 +// CHECK:STDOUT: %.loc24_35: ref %A = converted %.loc24_33.1, %.loc24_33.10 // CHECK:STDOUT: %B.ref.loc24: 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 @@ -601,16 +601,16 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: type = struct_type {.x: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -638,33 +638,33 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_18: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc21_19: %.7 = struct_literal (%.loc21_18) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc21_19: %struct_type.x.2 = struct_literal (%int_1) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc21_21: %B = converted %.loc21_19, [template = ] // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/as/as_type.carbon b/toolchain/check/testdata/as/as_type.carbon index 7a49263858abd..b1a35bcd670d5 100644 --- a/toolchain/check/testdata/as/as_type.carbon +++ b/toolchain/check/testdata/as/as_type.carbon @@ -13,10 +13,10 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: --- as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: } @@ -39,10 +39,10 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%.loc11_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%.loc11_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%int_32.loc11_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] // CHECK:STDOUT: %.loc11_24: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_16, %int.make_type_signed.loc11_21) // CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_signed.loc11_16 [template = constants.%i32] // CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_signed.loc11_16, %.loc11_26.1 [template = constants.%i32] diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index 4a302e96c6fe8..ec86080656be1 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -15,20 +15,20 @@ fn Main() -> i32 { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,10 +50,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed.loc11, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -61,17 +61,17 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed.loc12, %.loc12_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_12.2: = bound_method %.loc12_10, %.loc12_12.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_12.3: = specific_function %.loc12_12.2, @Convert.7(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_12.3(%.loc12_10) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_12.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_12.5: %i32 = converted %.loc12_10, %.loc12_12.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc12_12.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12, %.loc12_15.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_12.2: %i32 = converted %int_1, %.loc12_12.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc12_12.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index ed8a1dc4411ba..4892372605c2e 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -19,13 +19,13 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: --- fail_no_conversion.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,10 +43,10 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: .n = @__global_init.%n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%.loc17_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%.loc17_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%int_32.loc17_14) [template = constants.%i32] // CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_9, %int.make_type_signed.loc17_14) // CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] // CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17_9, %.loc17_17.2 [template = constants.%i32] @@ -57,19 +57,19 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_21: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%.loc17_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%.loc17_32) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%int_32.loc17_27) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%int_32.loc17_32) [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_27, %int.make_type_signed.loc17_32) // CHECK:STDOUT: %.loc17_35.2: type = value_of_initializer %int.make_type_signed.loc17_27 [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.3: type = converted %int.make_type_signed.loc17_27, %.loc17_35.2 [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_signed.loc17_32 [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_signed.loc17_32, %.loc17_35.4 [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc17_23.1: %tuple.type.2 = converted %.loc17_21, [template = ] -// CHECK:STDOUT: %.loc17_23.2: %i32 = tuple_access %.loc17_23.1, element0 [template = ] +// CHECK:STDOUT: %.loc17_23: %tuple.type.2 = converted %int_1, [template = ] +// CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %.loc17_23, element0 [template = ] // CHECK:STDOUT: %n: %tuple.type.2 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 8a8db8a999f4b..7d8c42261c6c5 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -19,12 +19,12 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: --- fail_not_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -42,17 +42,17 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: .n = @__global_init.%n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.3: type = converted %int.make_type_signed, %.loc17_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed, %.loc17_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_19.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_19.2: type = converted %.loc17_19.1, [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc17: type = converted %int_2, [template = ] // CHECK:STDOUT: %n: %i32 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index 445c754ad6a0e..c7d63cca4baaa 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -32,11 +32,11 @@ fn Initializing() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Value.type: type = fn_type @Value [template] // CHECK:STDOUT: %Value: %Value.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %X [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %X [template] // CHECK:STDOUT: %Reference.type: type = fn_type @Reference [template] // CHECK:STDOUT: %Reference: %Reference.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] @@ -72,13 +72,13 @@ fn Initializing() { // CHECK:STDOUT: %n: %X = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %Reference.decl: %Reference.type = fn_decl @Reference [template = constants.%Reference] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref.loc21: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc21: type = ptr_type %X [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %ptr.loc21: type = ptr_type %X [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %X = return_slot_pattern @@ -92,11 +92,11 @@ fn Initializing() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Value(%n.param_patt: %X) { @@ -108,15 +108,15 @@ fn Initializing() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Reference(%p.param_patt: %.4) { +// CHECK:STDOUT: fn @Reference(%p.param_patt: %ptr.2) { // 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: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc22_17: ref %X = deref %p.ref +// CHECK:STDOUT: %ptr.loc22: type = ptr_type %X [template = constants.%ptr.2] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %.loc22: 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: %.4 = addr_of %.loc22_17 -// CHECK:STDOUT: %q: %.4 = bind_name q, %.loc22_15 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc22 +// CHECK:STDOUT: %q: %ptr.2 = bind_name q, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index 81adc049530a2..f905622985bb5 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -28,8 +28,8 @@ fn Var() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %Let.type: type = fn_type @Let [template] @@ -61,11 +61,11 @@ fn Var() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %X; @@ -106,18 +106,18 @@ fn Var() { // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %Make.ref.loc24_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc24_34.1: ref %X = tuple_access %b.var, element0 -// CHECK:STDOUT: %Make.call.loc24_25: init %X = call %Make.ref.loc24_20() to %.loc24_34.1 +// CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %b.var, element0 +// CHECK:STDOUT: %Make.call.loc24_25: init %X = call %Make.ref.loc24_20() to %tuple.elem0 // 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_33: init %X = call %Make.ref.loc24_28() to %.loc24_34.2 -// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_25, %Make.call.loc24_33) +// CHECK:STDOUT: %tuple.elem1: ref %X = tuple_access %b.var, element1 +// CHECK:STDOUT: %Make.call.loc24_33: init %X = call %Make.ref.loc24_28() to %tuple.elem1 +// CHECK:STDOUT: %.loc24_34.1: %tuple.type.2 = tuple_literal (%Make.call.loc24_25, %Make.call.loc24_33) // 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: %tuple.type.1 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) // CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_25, %Make.call.loc24_33) to %b.var -// CHECK:STDOUT: %.loc24_45: init %tuple.type.2 = converted %.loc24_34.3, %.loc24_34.4 +// CHECK:STDOUT: %.loc24_34.2: init %tuple.type.2 = tuple_init (%Make.call.loc24_25, %Make.call.loc24_33) to %b.var +// CHECK:STDOUT: %.loc24_45: init %tuple.type.2 = converted %.loc24_34.1, %.loc24_34.2 // CHECK:STDOUT: assign %b.var, %.loc24_45 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index a8800ab0dbf38..5bda007a124db 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -26,33 +26,33 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %X, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %X.elem: type = unbound_element_type %X, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] -// CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] +// CHECK:STDOUT: %As.generic: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%X)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @As(%X) [template] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.18: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.9, @impl.7(%.1) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.9, @impl.7(%int_32) [template] // CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %.36: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %.37: = bound_method %.18, %Convert.17 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.9(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.2 [template] +// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.17) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.17 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.1, @Convert.9(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.2, %Convert.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,7 +62,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+13, loaded [template = constants.%As] +// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+13, loaded [template = constants.%As.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -74,53 +74,53 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%X)> [template = constants.%As.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As] -// CHECK:STDOUT: %.loc19_19: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_19) [template = constants.%i32] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed, %.loc19_22.1 [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.4] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.3: type = converted %int.make_type_signed, %.loc23_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed, %.loc23_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.3 as %As.type { +// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %As.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %X = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.3: type = converted %int.make_type_signed, %.loc16_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_signed, %.loc16_20.1 [template = constants.%i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.12] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc15_24 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %X.ref as %As.type { @@ -131,40 +131,40 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc20_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc20_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.3: type = converted %int.make_type_signed, %.loc20_28.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_signed, %.loc20_28.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %X = value_param runtime_param0 // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.17] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc19_24 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %X.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: .n = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: %i32]() -> %return: %X { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %i32 = name_ref self, %self -// CHECK:STDOUT: %.loc16_51.1: %.3 = struct_literal (%self.ref) +// CHECK:STDOUT: %.loc16_51.1: %struct_type.n = struct_literal (%self.ref) // CHECK:STDOUT: %.loc16_51.2: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc16_51.3: init %i32 = initialize_from %self.ref to %.loc16_51.2 // CHECK:STDOUT: %.loc16_51.4: init %X = class_init (%.loc16_51.3), %return @@ -175,7 +175,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] // CHECK:STDOUT: %.loc20_45.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: %i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -183,35 +183,35 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_16: Core.IntLiteral = int_value 4 [template = constants.%.18] -// CHECK:STDOUT: %.loc23_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_21: init type = call constants.%Int(%.loc23_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.2: type = value_of_initializer %int.make_type_signed.loc23_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.3: type = converted %int.make_type_signed.loc23_21, %.loc23_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.1: %Convert.type.5 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.17] -// CHECK:STDOUT: %.loc23_18.2: = bound_method %.loc23_16, %.loc23_18.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc23_18.3: = specific_function %.loc23_18.2, @Convert.9(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_18.3(%.loc23_16) [template = constants.%.39] -// CHECK:STDOUT: %.loc23_18.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] -// CHECK:STDOUT: %.loc23_18.5: %i32 = converted %.loc23_16, %.loc23_18.4 [template = constants.%.39] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_32.loc23_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_21: init type = call constants.%Int(%int_32.loc23_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_signed.loc23_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_signed.loc23_21, %.loc23_21.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc23_18: %Convert.type.5 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %Convert.bound.loc23_18: = bound_method %int_4, %impl.elem0.loc23_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.loc23_18, @Convert.9(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc23_18.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc23_18.2: %i32 = converted %int_4, %.loc23_18.1 [template = constants.%int_4.2] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc23_26.1: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc23_26.2: = bound_method %.loc23_18.5, %.loc23_26.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc23_26.3: ref %X = temporary_storage -// CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %.loc23_26.2(%.loc23_18.5) to %.loc23_26.3 -// CHECK:STDOUT: %.loc23_26.4: init %X = converted %.loc23_18.5, %Convert.call.loc23_26 -// CHECK:STDOUT: %.loc23_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_35: init type = call constants.%Int(%.loc23_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.2: type = value_of_initializer %int.make_type_signed.loc23_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.3: type = converted %int.make_type_signed.loc23_35, %.loc23_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_32.1: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] -// CHECK:STDOUT: %.loc23_32.2: = bound_method %.loc23_26.4, %.loc23_32.1 -// CHECK:STDOUT: %.loc23_26.5: ref %X = temporary %.loc23_26.3, %.loc23_26.4 -// CHECK:STDOUT: %.loc23_26.6: %X = bind_value %.loc23_26.5 -// CHECK:STDOUT: %Convert.call.loc23_32: init %i32 = call %.loc23_32.2(%.loc23_26.6) -// CHECK:STDOUT: %.loc23_32.3: %i32 = value_of_initializer %Convert.call.loc23_32 -// CHECK:STDOUT: %.loc23_32.4: %i32 = converted %.loc23_26.4, %.loc23_32.3 -// CHECK:STDOUT: %n: %i32 = bind_name n, %.loc23_32.4 +// CHECK:STDOUT: %impl.elem0.loc23_26: %Convert.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %Convert.bound.loc23_26: = bound_method %.loc23_18.2, %impl.elem0.loc23_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %.loc23_26.1: ref %X = temporary_storage +// CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %Convert.bound.loc23_26(%.loc23_18.2) to %.loc23_26.1 +// CHECK:STDOUT: %.loc23_26.2: init %X = converted %.loc23_18.2, %Convert.call.loc23_26 +// CHECK:STDOUT: %int_32.loc23_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_35: init type = call constants.%Int(%int_32.loc23_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_signed.loc23_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_signed.loc23_35, %.loc23_35.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc23_32: %Convert.type.5 = interface_witness_access constants.%interface.2, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %Convert.bound.loc23_32: = bound_method %.loc23_26.2, %impl.elem0.loc23_32 +// CHECK:STDOUT: %.loc23_26.3: ref %X = temporary %.loc23_26.1, %.loc23_26.2 +// CHECK:STDOUT: %.loc23_26.4: %X = bind_value %.loc23_26.3 +// CHECK:STDOUT: %Convert.call.loc23_32: init %i32 = call %Convert.bound.loc23_32(%.loc23_26.4) +// CHECK:STDOUT: %.loc23_32.1: %i32 = value_of_initializer %Convert.call.loc23_32 +// CHECK:STDOUT: %.loc23_32.2: %i32 = converted %.loc23_26.2, %.loc23_32.1 +// CHECK:STDOUT: %n: %i32 = bind_name n, %.loc23_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 2fdfe56e9b268..9dca841351c0a 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -16,23 +16,23 @@ var test_type: type = i32; // CHECK:STDOUT: --- builtin_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.31: f64 = float_literal 0.10000000000000001 [template] -// CHECK:STDOUT: %.33: String = string_literal "Test" [template] +// CHECK:STDOUT: %float: f64 = float_literal 0.10000000000000001 [template] +// CHECK:STDOUT: %str: String = string_literal "Test" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,16 +54,16 @@ var test_type: type = i32; // CHECK:STDOUT: .test_type = %test_type // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.3: type = converted %int.make_type_signed, %.loc11_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed, %.loc11_15.1 [template = constants.%i32] // CHECK:STDOUT: %test_i32.var: ref %i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref %i32 = bind_name test_i32, %test_i32.var -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 64 [template = constants.%.30] -// 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] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc12_15.2: type = converted %float.make_type, %.loc12_15.1 [template = f64] // CHECK:STDOUT: %test_f64.var: ref f64 = var test_f64 // CHECK:STDOUT: %test_f64: ref f64 = bind_name test_f64, %test_f64.var // CHECK:STDOUT: %test_type.var: ref type = var test_type @@ -72,19 +72,19 @@ var test_type: type = i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_21: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.2: = bound_method %.loc11_21, %.loc11_22.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_22.3: = specific_function %.loc11_22.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.3(%.loc11_21) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_22.4: init %i32 = converted %.loc11_21, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%test_i32.var, %.loc11_22.4 -// CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.31] -// CHECK:STDOUT: assign file.%test_f64.var, %.loc12 -// CHECK:STDOUT: %.loc13: String = string_literal "Test" [template = constants.%.33] -// CHECK:STDOUT: %test_str: String = bind_name test_str, %.loc13 -// CHECK:STDOUT: %.loc14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14) [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%test_i32.var, %.loc11 +// CHECK:STDOUT: %float: f64 = float_literal 0.10000000000000001 [template = constants.%float] +// CHECK:STDOUT: assign file.%test_f64.var, %float +// CHECK:STDOUT: %str: String = string_literal "Test" [template = constants.%str] +// CHECK:STDOUT: %test_str: String = bind_name test_str, %str +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: assign file.%test_type.var, %int.make_type_signed // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_bad_run.carbon b/toolchain/check/testdata/basics/fail_bad_run.carbon index a8948568c243c..3787f7a2971d1 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -22,10 +22,10 @@ fn Run() -> String {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,10 +49,10 @@ fn Run() -> String {} // CHECK:STDOUT: %return.param: ref String = out_param runtime_param0 // CHECK:STDOUT: %return: ref String = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.3: type = converted %int.make_type_signed, %.loc18_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_signed, %.loc18_20.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %return: String { diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index 7e763ef838f2a..1c4a0bb8a9da3 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -16,10 +16,10 @@ fn Run(n: i32) {} // CHECK:STDOUT: --- fail_bad_run_2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -42,10 +42,10 @@ fn Run(n: i32) {} // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed, %.loc14_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index 822ffe0b89818..8b69c739b9dfc 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -19,7 +19,7 @@ var x: type = 42; // CHECK:STDOUT: --- fail_non_type_as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -42,8 +42,8 @@ var x: type = 42; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_15: Core.IntLiteral = int_value 42 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_17: type = converted %.loc17_15, [template = ] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] +// CHECK:STDOUT: %.loc17: type = converted %int_42, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index c21bdd09ad45e..34ab40a7b460e 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -40,23 +40,23 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: --- fail_numeric_literal_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 39999999999999999993 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_39999999999999999993.1: Core.IntLiteral = int_value 39999999999999999993 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 39999999999999999993 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2147483648 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2147483648 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_39999999999999999993.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_39999999999999999993.2: %i32 = int_value 39999999999999999993 [template] +// CHECK:STDOUT: %int_2147483648.1: Core.IntLiteral = int_value 2147483648 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483648.2: %i32 = int_value 2147483648 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } @@ -81,54 +81,54 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: .e = @__global_init.%e // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.3: type = converted %int.make_type_signed.loc21, %.loc21_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8.3: type = converted %int.make_type_signed.loc27, %.loc27_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_8.1: Core.IntLiteral = int_value 64 [template = constants.%.34] -// CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%.loc33_8.1) [template = f64] -// CHECK:STDOUT: %.loc33_8.2: type = value_of_initializer %float.make_type.loc33 [template = f64] -// CHECK:STDOUT: %.loc33_8.3: type = converted %float.make_type.loc33, %.loc33_8.2 [template = f64] -// CHECK:STDOUT: %.loc38_8.1: Core.IntLiteral = int_value 64 [template = constants.%.34] -// 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] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_signed.loc21, %.loc21_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_8.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_8.2: type = converted %int.make_type_signed.loc27, %.loc27_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64.loc33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%int_64.loc33) [template = f64] +// CHECK:STDOUT: %.loc33_8.1: type = value_of_initializer %float.make_type.loc33 [template = f64] +// CHECK:STDOUT: %.loc33_8.2: type = converted %float.make_type.loc33, %.loc33_8.1 [template = f64] +// CHECK:STDOUT: %int_64.loc38: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%int_64.loc38) [template = f64] +// CHECK:STDOUT: %.loc38_8.1: type = value_of_initializer %float.make_type.loc38 [template = f64] +// CHECK:STDOUT: %.loc38_8.2: type = converted %float.make_type.loc38, %.loc38_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_34.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_34.2: = bound_method %.loc15_14, %.loc15_34.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_34.3: = specific_function %.loc15_34.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_34.3(%.loc15_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_34.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_34.5: %i32 = converted %.loc15_14, %.loc15_34.4 [template = constants.%.29] -// CHECK:STDOUT: %a: %i32 = bind_name a, %.loc15_34.5 -// CHECK:STDOUT: %.loc21_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.30] -// CHECK:STDOUT: %.loc21_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_27.2: = bound_method %.loc21_14, %.loc21_27.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_27.3: = specific_function %.loc21_27.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_27.3(%.loc21_14) [template = constants.%.33] -// CHECK:STDOUT: %.loc21_27.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_27.5: %i32 = converted %.loc21_14, %.loc21_27.4 [template = constants.%.33] -// CHECK:STDOUT: %b: %i32 = bind_name b, %.loc21_27.5 -// CHECK:STDOUT: %.loc27_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.30] -// CHECK:STDOUT: %.loc27_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_25.2: = bound_method %.loc27_14, %.loc27_25.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc27_25.3: = specific_function %.loc27_25.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_25.3(%.loc27_14) [template = constants.%.33] -// CHECK:STDOUT: %.loc27_25.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.33] -// CHECK:STDOUT: %.loc27_25.5: %i32 = converted %.loc27_14, %.loc27_25.4 [template = constants.%.33] -// CHECK:STDOUT: %c: %i32 = bind_name c, %.loc27_25.5 +// CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_39999999999999999993, %impl.elem0.loc15 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_39999999999999999993) [template = constants.%int_39999999999999999993.2] +// CHECK:STDOUT: %.loc15_34.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_39999999999999999993.2] +// CHECK:STDOUT: %.loc15_34.2: %i32 = converted %int_39999999999999999993, %.loc15_34.1 [template = constants.%int_39999999999999999993.2] +// CHECK:STDOUT: %a: %i32 = bind_name a, %.loc15_34.2 +// CHECK:STDOUT: %int_2147483648.loc21: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_2147483648.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_2147483648.loc21) [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc21_27.1: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc21_27.2: %i32 = converted %int_2147483648.loc21, %.loc21_27.1 [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %b: %i32 = bind_name b, %.loc21_27.2 +// CHECK:STDOUT: %int_2147483648.loc27: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_2147483648.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_2147483648.loc27) [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc27_25.1: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc27_25.2: %i32 = converted %int_2147483648.loc27, %.loc27_25.1 [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %c: %i32 = bind_name c, %.loc27_25.2 // CHECK:STDOUT: %d: f64 = bind_name d, // CHECK:STDOUT: %e: f64 = bind_name e, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon index efe35c4059f31..cb33d82e36314 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -17,10 +17,10 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_qualifier_unsupported.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -38,16 +38,16 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index 68f24f74910d3..b55036859b7e6 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 @@ -206,14 +206,14 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n // CHECK:STDOUT: %.loc16_15.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_16.1: %tuple.type = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref %empty_tuple.type = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %.loc16_16.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.4: ref %empty_tuple.type = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %.loc16_16.4 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.5: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.6: init %tuple.type = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple] +// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %tuple.elem0 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.2: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %tuple.elem1 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.4: init %tuple.type = tuple_init (%.loc16_16.2, %.loc16_16.3) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.4 [template = constants.%tuple] // CHECK:STDOUT: return %.loc16_17 to %return // 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 f8d153b6035f7..4ec884bc096c2 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -57,14 +57,14 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n // CHECK:STDOUT: %.loc16_15.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_16.1: %tuple.type = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref %empty_tuple.type = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %.loc16_16.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.4: ref %empty_tuple.type = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %.loc16_16.4 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.5: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_16.6: init %tuple.type = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple] +// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %tuple.elem0 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.2: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %tuple.elem1 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.4: init %tuple.type = tuple_init (%.loc16_16.2, %.loc16_16.3) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.4 [template = constants.%tuple] // CHECK:STDOUT: return %.loc16_17 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 14788de7e749b..8cc57993a5395 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -34,48 +34,48 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_6, %i32 [template] +// CHECK:STDOUT: %int_8.1: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 8 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.37: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 9 [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.43: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.35, %.39, %.35, %.35, %.45, %.45) [template] -// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_8.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_8.2, %int_9.2, %int_8.2, %int_8.2, %int_2147483647.2, %int_2147483647.2) [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.48: type = array_type %.2, f64 [template] -// CHECK:STDOUT: %.50: f64 = float_literal 0.90000000000000002 [template] -// CHECK:STDOUT: %.51: f64 = float_literal 8 [template] -// CHECK:STDOUT: %.52: f64 = float_literal 80 [template] -// CHECK:STDOUT: %.53: f64 = float_literal 1.0E+7 [template] -// CHECK:STDOUT: %.54: f64 = float_literal 1.0E+8 [template] -// CHECK:STDOUT: %.55: f64 = float_literal 1.0E-8 [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_6, f64 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 0.90000000000000002 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 8 [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 80 [template] +// CHECK:STDOUT: %float.4: f64 = float_literal 1.0E+7 [template] +// CHECK:STDOUT: %float.5: f64 = float_literal 1.0E+8 [template] +// CHECK:STDOUT: %float.6: f64 = float_literal 1.0E-8 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64, f64, f64, f64, f64) [template] -// CHECK:STDOUT: %array.2: %.48 = tuple_value (%.50, %.51, %.52, %.53, %.54, %.55) [template] +// CHECK:STDOUT: %array.2: %array_type.2 = tuple_value (%float.1, %float.2, %float.3, %float.4, %float.5, %float.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,107 +99,107 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19: Core.IntLiteral = int_value 6 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.3: type = converted %int.make_type_signed, %.loc14_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_20: type = array_type %.loc14_19, %i32 [template = constants.%.3] -// CHECK:STDOUT: %ints.var: ref %.3 = var ints -// CHECK:STDOUT: %ints: ref %.3 = bind_name ints, %ints.var -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc16: Core.IntLiteral = int_value 9 [template = constants.%.6] -// CHECK:STDOUT: %.loc17: Core.IntLiteral = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc18: Core.IntLiteral = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%.7] -// CHECK:STDOUT: %.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) -// CHECK:STDOUT: %.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.3: = bound_method %.loc15, %.loc21_3.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_3.4: = specific_function %.loc21_3.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %.loc21_3.4(%.loc15) [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.5: init %i32 = converted %.loc15, %int.convert_checked.loc21_3.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.6: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc21_3.7: ref %i32 = array_index %ints.var, %.loc21_3.6 -// CHECK:STDOUT: %.loc21_3.8: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.10: = bound_method %.loc16, %.loc21_3.9 [template = constants.%.37] -// CHECK:STDOUT: %.loc21_3.11: = specific_function %.loc21_3.10, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %.loc21_3.11(%.loc16) [template = constants.%.39] -// CHECK:STDOUT: %.loc21_3.12: init %i32 = converted %.loc16, %int.convert_checked.loc21_3.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc21_3.13: Core.IntLiteral = int_value 1 [template = constants.%.36] -// CHECK:STDOUT: %.loc21_3.14: ref %i32 = array_index %ints.var, %.loc21_3.13 -// CHECK:STDOUT: %.loc21_3.15: init %i32 = initialize_from %.loc21_3.12 to %.loc21_3.14 [template = constants.%.39] -// CHECK:STDOUT: %.loc21_3.16: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.17: = bound_method %.loc17, %.loc21_3.16 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_3.18: = specific_function %.loc21_3.17, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %.loc21_3.18(%.loc17) [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.19: init %i32 = converted %.loc17, %int.convert_checked.loc21_3.3 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.20: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc21_3.21: ref %i32 = array_index %ints.var, %.loc21_3.20 -// CHECK:STDOUT: %.loc21_3.22: init %i32 = initialize_from %.loc21_3.19 to %.loc21_3.21 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.23: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.24: = bound_method %.loc18, %.loc21_3.23 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_3.25: = specific_function %.loc21_3.24, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %.loc21_3.25(%.loc18) [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.26: init %i32 = converted %.loc18, %int.convert_checked.loc21_3.4 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.27: Core.IntLiteral = int_value 3 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.28: ref %i32 = array_index %ints.var, %.loc21_3.27 -// CHECK:STDOUT: %.loc21_3.29: init %i32 = initialize_from %.loc21_3.26 to %.loc21_3.28 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.30: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.31: = bound_method %.loc19, %.loc21_3.30 [template = constants.%.43] -// CHECK:STDOUT: %.loc21_3.32: = specific_function %.loc21_3.31, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %.loc21_3.32(%.loc19) [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.33: init %i32 = converted %.loc19, %int.convert_checked.loc21_3.5 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.34: Core.IntLiteral = int_value 4 [template = constants.%.42] -// CHECK:STDOUT: %.loc21_3.35: ref %i32 = array_index %ints.var, %.loc21_3.34 -// CHECK:STDOUT: %.loc21_3.36: init %i32 = initialize_from %.loc21_3.33 to %.loc21_3.35 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.37: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.38: = bound_method %.loc20, %.loc21_3.37 [template = constants.%.43] -// CHECK:STDOUT: %.loc21_3.39: = specific_function %.loc21_3.38, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %.loc21_3.39(%.loc20) [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.40: init %i32 = converted %.loc20, %int.convert_checked.loc21_3.6 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.41: Core.IntLiteral = int_value 5 [template = constants.%.46] -// CHECK:STDOUT: %.loc21_3.42: ref %i32 = array_index %ints.var, %.loc21_3.41 -// CHECK:STDOUT: %.loc21_3.43: init %i32 = initialize_from %.loc21_3.40 to %.loc21_3.42 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_3.44: init %.3 = array_init (%.loc21_3.8, %.loc21_3.15, %.loc21_3.22, %.loc21_3.29, %.loc21_3.36, %.loc21_3.43) to %ints.var [template = constants.%array.1] -// CHECK:STDOUT: %.loc21_4: init %.3 = converted %.loc21_3.1, %.loc21_3.44 [template = constants.%array.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_6.loc14: Core.IntLiteral = int_value 6 [template = constants.%int_6] +// CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_signed, %.loc14_14.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc14: type = array_type %int_6.loc14, %i32 [template = constants.%array_type.1] +// CHECK:STDOUT: %ints.var: ref %array_type.1 = var ints +// CHECK:STDOUT: %ints: ref %array_type.1 = bind_name ints, %ints.var +// CHECK:STDOUT: %int_8.loc15: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] +// CHECK:STDOUT: %int_8.loc17: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] +// CHECK:STDOUT: %int_8.loc18: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] +// CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%int_8.loc15, %int_9, %int_8.loc17, %int_8.loc18, %int_2147483647.loc19, %int_2147483647.loc20) +// CHECK:STDOUT: %impl.elem0.loc21_3.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.1: = bound_method %int_8.loc15, %impl.elem0.loc21_3.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.1: = specific_function %Convert.bound.loc21_3.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %Convert.specific_fn.loc21_3.1(%int_8.loc15) [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc21_3.2: init %i32 = converted %int_8.loc15, %int.convert_checked.loc21_3.1 [template = constants.%int_8.2] +// CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc21_3.3: ref %i32 = array_index %ints.var, %int_0.loc21 +// CHECK:STDOUT: %.loc21_3.4: init %i32 = initialize_from %.loc21_3.2 to %.loc21_3.3 [template = constants.%int_8.2] +// CHECK:STDOUT: %impl.elem0.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.2: = bound_method %int_9, %impl.elem0.loc21_3.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.2: = specific_function %Convert.bound.loc21_3.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %Convert.specific_fn.loc21_3.2(%int_9) [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc21_3.5: init %i32 = converted %int_9, %int.convert_checked.loc21_3.2 [template = constants.%int_9.2] +// CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc21_3.6: ref %i32 = array_index %ints.var, %int_1.loc21 +// CHECK:STDOUT: %.loc21_3.7: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.6 [template = constants.%int_9.2] +// CHECK:STDOUT: %impl.elem0.loc21_3.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.3: = bound_method %int_8.loc17, %impl.elem0.loc21_3.3 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.3: = specific_function %Convert.bound.loc21_3.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %Convert.specific_fn.loc21_3.3(%int_8.loc17) [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc21_3.8: init %i32 = converted %int_8.loc17, %int.convert_checked.loc21_3.3 [template = constants.%int_8.2] +// CHECK:STDOUT: %int_2.loc21: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc21_3.9: ref %i32 = array_index %ints.var, %int_2.loc21 +// CHECK:STDOUT: %.loc21_3.10: init %i32 = initialize_from %.loc21_3.8 to %.loc21_3.9 [template = constants.%int_8.2] +// CHECK:STDOUT: %impl.elem0.loc21_3.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.4: = bound_method %int_8.loc18, %impl.elem0.loc21_3.4 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.4: = specific_function %Convert.bound.loc21_3.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %Convert.specific_fn.loc21_3.4(%int_8.loc18) [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc21_3.11: init %i32 = converted %int_8.loc18, %int.convert_checked.loc21_3.4 [template = constants.%int_8.2] +// CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc21_3.12: ref %i32 = array_index %ints.var, %int_3.loc21 +// CHECK:STDOUT: %.loc21_3.13: init %i32 = initialize_from %.loc21_3.11 to %.loc21_3.12 [template = constants.%int_8.2] +// CHECK:STDOUT: %impl.elem0.loc21_3.5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.5: = bound_method %int_2147483647.loc19, %impl.elem0.loc21_3.5 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.5: = specific_function %Convert.bound.loc21_3.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %Convert.specific_fn.loc21_3.5(%int_2147483647.loc19) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc21_3.14: init %i32 = converted %int_2147483647.loc19, %int.convert_checked.loc21_3.5 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc21_3.15: ref %i32 = array_index %ints.var, %int_4.loc21 +// CHECK:STDOUT: %.loc21_3.16: init %i32 = initialize_from %.loc21_3.14 to %.loc21_3.15 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %impl.elem0.loc21_3.6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_3.6: = bound_method %int_2147483647.loc20, %impl.elem0.loc21_3.6 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc21_3.6: = specific_function %Convert.bound.loc21_3.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %Convert.specific_fn.loc21_3.6(%int_2147483647.loc20) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc21_3.17: init %i32 = converted %int_2147483647.loc20, %int.convert_checked.loc21_3.6 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int_5.loc21: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %.loc21_3.18: ref %i32 = array_index %ints.var, %int_5.loc21 +// CHECK:STDOUT: %.loc21_3.19: init %i32 = initialize_from %.loc21_3.17 to %.loc21_3.18 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc21_3.20: init %array_type.1 = 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 %array_type.1 = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 -// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 64 [template = constants.%.47] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] -// CHECK:STDOUT: %.loc22_21: Core.IntLiteral = int_value 6 [template = constants.%.2] -// 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.%.48] -// CHECK:STDOUT: %floats.var: ref %.48 = var floats -// CHECK:STDOUT: %floats: ref %.48 = bind_name floats, %floats.var -// CHECK:STDOUT: %.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%.50] -// CHECK:STDOUT: %.loc24: f64 = float_literal 8 [template = constants.%.51] -// CHECK:STDOUT: %.loc25: f64 = float_literal 80 [template = constants.%.52] -// CHECK:STDOUT: %.loc26: f64 = float_literal 1.0E+7 [template = constants.%.53] -// CHECK:STDOUT: %.loc27: f64 = float_literal 1.0E+8 [template = constants.%.54] -// CHECK:STDOUT: %.loc28: f64 = float_literal 1.0E-8 [template = constants.%.55] -// CHECK:STDOUT: %.loc29_3.1: %tuple.type.2 = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) -// CHECK:STDOUT: %.loc29_3.2: Core.IntLiteral = int_value 0 [template = constants.%.8] -// 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.%.50] -// CHECK:STDOUT: %.loc29_3.5: Core.IntLiteral = int_value 1 [template = constants.%.36] -// CHECK:STDOUT: %.loc29_3.6: ref f64 = array_index %floats.var, %.loc29_3.5 -// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %.loc24 to %.loc29_3.6 [template = constants.%.51] -// CHECK:STDOUT: %.loc29_3.8: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc29_3.9: ref f64 = array_index %floats.var, %.loc29_3.8 -// CHECK:STDOUT: %.loc29_3.10: init f64 = initialize_from %.loc25 to %.loc29_3.9 [template = constants.%.52] -// CHECK:STDOUT: %.loc29_3.11: Core.IntLiteral = int_value 3 [template = constants.%.41] -// CHECK:STDOUT: %.loc29_3.12: ref f64 = array_index %floats.var, %.loc29_3.11 -// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %.loc26 to %.loc29_3.12 [template = constants.%.53] -// CHECK:STDOUT: %.loc29_3.14: Core.IntLiteral = int_value 4 [template = constants.%.42] -// CHECK:STDOUT: %.loc29_3.15: ref f64 = array_index %floats.var, %.loc29_3.14 -// CHECK:STDOUT: %.loc29_3.16: init f64 = initialize_from %.loc27 to %.loc29_3.15 [template = constants.%.54] -// CHECK:STDOUT: %.loc29_3.17: Core.IntLiteral = int_value 5 [template = constants.%.46] -// 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.%.55] -// CHECK:STDOUT: %.loc29_3.20: init %.48 = 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 %.48 = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %int_6.loc22: Core.IntLiteral = int_value 6 [template = constants.%int_6] +// CHECK:STDOUT: %.loc22_16.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc22_16.2: type = converted %float.make_type, %.loc22_16.1 [template = f64] +// CHECK:STDOUT: %array_type.loc22: type = array_type %int_6.loc22, f64 [template = constants.%array_type.2] +// CHECK:STDOUT: %floats.var: ref %array_type.2 = var floats +// CHECK:STDOUT: %floats: ref %array_type.2 = bind_name floats, %floats.var +// CHECK:STDOUT: %float.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc24: f64 = float_literal 8 [template = constants.%float.2] +// CHECK:STDOUT: %float.loc25: f64 = float_literal 80 [template = constants.%float.3] +// CHECK:STDOUT: %float.loc26: f64 = float_literal 1.0E+7 [template = constants.%float.4] +// CHECK:STDOUT: %float.loc27: f64 = float_literal 1.0E+8 [template = constants.%float.5] +// CHECK:STDOUT: %float.loc28: f64 = float_literal 1.0E-8 [template = constants.%float.6] +// CHECK:STDOUT: %.loc29_3.1: %tuple.type.2 = tuple_literal (%float.loc23, %float.loc24, %float.loc25, %float.loc26, %float.loc27, %float.loc28) +// CHECK:STDOUT: %int_0.loc29: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc29_3.2: ref f64 = array_index %floats.var, %int_0.loc29 +// CHECK:STDOUT: %.loc29_3.3: init f64 = initialize_from %float.loc23 to %.loc29_3.2 [template = constants.%float.1] +// CHECK:STDOUT: %int_1.loc29: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc29_3.4: ref f64 = array_index %floats.var, %int_1.loc29 +// CHECK:STDOUT: %.loc29_3.5: init f64 = initialize_from %float.loc24 to %.loc29_3.4 [template = constants.%float.2] +// CHECK:STDOUT: %int_2.loc29: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc29_3.6: ref f64 = array_index %floats.var, %int_2.loc29 +// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %float.loc25 to %.loc29_3.6 [template = constants.%float.3] +// CHECK:STDOUT: %int_3.loc29: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc29_3.8: ref f64 = array_index %floats.var, %int_3.loc29 +// CHECK:STDOUT: %.loc29_3.9: init f64 = initialize_from %float.loc26 to %.loc29_3.8 [template = constants.%float.4] +// CHECK:STDOUT: %int_4.loc29: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc29_3.10: ref f64 = array_index %floats.var, %int_4.loc29 +// CHECK:STDOUT: %.loc29_3.11: init f64 = initialize_from %float.loc27 to %.loc29_3.10 [template = constants.%float.5] +// CHECK:STDOUT: %int_5.loc29: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %.loc29_3.12: ref f64 = array_index %floats.var, %int_5.loc29 +// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %float.loc28 to %.loc29_3.12 [template = constants.%float.6] +// CHECK:STDOUT: %.loc29_3.14: init %array_type.2 = array_init (%.loc29_3.3, %.loc29_3.5, %.loc29_3.7, %.loc29_3.9, %.loc29_3.11, %.loc29_3.13) to %floats.var [template = constants.%array.2] +// CHECK:STDOUT: %.loc29_4: init %array_type.2 = converted %.loc29_3.1, %.loc29_3.14 [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 df807b62f8dcc..91e02f89f77bc 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -14,22 +14,22 @@ var b: i32 = ((2)); // CHECK:STDOUT: --- parens.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,36 +48,36 @@ var b: i32 = ((2)); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_15: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_15, %.loc11_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_15) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_17.4: init %i32 = converted %.loc11_15, %int.convert_checked.loc11 [template = constants.%.29] -// CHECK:STDOUT: assign file.%a.var, %.loc11_17.4 -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_19.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_19.2: = bound_method %.loc12_16, %.loc12_19.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_19.3(%.loc12_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_19.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.33] -// CHECK:STDOUT: assign file.%b.var, %.loc12_19.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_1, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11: init %i32 = converted %int_1, %int.convert_checked.loc11 [template = constants.%int_1.2] +// CHECK:STDOUT: assign file.%a.var, %.loc11 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_2, %impl.elem0.loc12 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_2, %int.convert_checked.loc12 [template = constants.%int_2.2] +// CHECK:STDOUT: assign file.%b.var, %.loc12 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index 7297180c75698..eebb406e67891 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -13,20 +13,20 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: --- run_i32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,28 +48,28 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed, %.loc11_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed, %.loc11_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed, %.loc11_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed, %.loc11_17.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.2: = bound_method %.loc11_26, %.loc11_27.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.3: = specific_function %.loc11_27.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.3(%.loc11_26) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.5: %i32 = converted %.loc11_26, %.loc11_27.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc11_27.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.2: %i32 = converted %int_0, %.loc11_27.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc11_27.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index dde728d9f1dee..d46c86b0f53c9 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -122,14 +122,14 @@ var test_f128: f128; // CHECK:STDOUT: --- iN.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i8: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i8: type = int_type signed, %int_8 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -148,22 +148,22 @@ var test_f128: f128; // CHECK:STDOUT: .test_i64 = %test_i64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 8 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%.loc3_14.1) [template = constants.%i8] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%i8] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3, %.loc3_14.2 [template = constants.%i8] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] +// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%int_8) [template = constants.%i8] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%i8] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3, %.loc3_14.1 [template = constants.%i8] // 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: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_15.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i16] -// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4, %.loc4_15.2 [template = constants.%i16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc4_15.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i16] +// CHECK:STDOUT: %.loc4_15.2: type = converted %int.make_type_signed.loc4, %.loc4_15.1 [template = constants.%i16] // 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: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_15.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i64] -// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_signed.loc5, %.loc5_15.2 [template = constants.%i64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_64) [template = constants.%i64] +// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i64] +// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i64] // 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: } @@ -178,14 +178,14 @@ var test_f128: f128; // CHECK:STDOUT: --- uN.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u8: type = int_type unsigned, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.3 [template] +// CHECK:STDOUT: %u8: type = int_type unsigned, %int_8 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -204,22 +204,22 @@ var test_f128: f128; // CHECK:STDOUT: .test_u64 = %test_u64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 8 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%.loc3_14.1) [template = constants.%u8] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%u8] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_unsigned.loc3, %.loc3_14.2 [template = constants.%u8] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] +// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%int_8) [template = constants.%u8] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%u8] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_unsigned.loc3, %.loc3_14.1 [template = constants.%u8] // 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: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%.loc4_15.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%u16] -// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_unsigned.loc4, %.loc4_15.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc4_15.1: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%u16] +// CHECK:STDOUT: %.loc4_15.2: type = converted %int.make_type_unsigned.loc4, %.loc4_15.1 [template = constants.%u16] // 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: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_15.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_unsigned.loc5, %.loc5_15.2 [template = constants.%u64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64) [template = constants.%u64] +// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] +// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_unsigned.loc5, %.loc5_15.1 [template = constants.%u64] // 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: } diff --git a/toolchain/check/testdata/builtins/bool/make_type.carbon b/toolchain/check/testdata/builtins/bool/make_type.carbon index 1d9c052a63e1c..d5e7819851ab9 100644 --- a/toolchain/check/testdata/builtins/bool/make_type.carbon +++ b/toolchain/check/testdata/builtins/bool/make_type.carbon @@ -58,7 +58,7 @@ var b: Bool() = false; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal false [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,8 +89,8 @@ var b: Bool() = false; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: bool = bool_literal false [template = constants.%.1] -// CHECK:STDOUT: assign file.%b.var, %.loc6 +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: assign file.%b.var, %false // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index fd73a542bdcdd..64d2deb187ae9 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -53,16 +53,16 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 2.2000000000000002 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 2.3000000000000003 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 4.5 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 2.2000000000000002 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2.3000000000000003 [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 4.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,18 +89,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] -// CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] +// CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -116,18 +116,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] -// CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] +// CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -135,10 +135,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -159,9 +159,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2.2000000000000002 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 2.3000000000000003 [template = constants.%.3] -// CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] +// CHECK:STDOUT: %float.loc8_18: f64 = float_literal 2.2000000000000002 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_23: f64 = float_literal 2.3000000000000003 [template = constants.%float.2] +// CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%float.loc8_18, %float.loc8_23) [template = constants.%float.3] // CHECK:STDOUT: assign file.%x.var, %float.add // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -169,7 +169,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] @@ -217,14 +217,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] -// CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] +// CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -240,22 +240,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] -// CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] +// CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -273,14 +273,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] @@ -299,18 +299,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] -// CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] -// CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] +// CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] +// CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -324,14 +324,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] -// CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] -// CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] +// CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] +// CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -347,22 +347,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] -// CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] -// CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] +// CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] +// CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -380,14 +380,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index 45c558a2c7f78..df99f7e56deaf 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -55,20 +55,20 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 10 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 2.5 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 4 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.7: f64 = float_literal +Inf [template] -// CHECK:STDOUT: %.8: f64 = float_literal NaN [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 10 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2.5 [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 4 [template] +// CHECK:STDOUT: %float.4: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.5: f64 = float_literal 0 [template] +// CHECK:STDOUT: %float.6: f64 = float_literal +Inf [template] +// CHECK:STDOUT: %float.7: f64 = float_literal NaN [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,18 +97,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] -// CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] +// CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -124,18 +124,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] -// CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] +// CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -143,20 +143,20 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// 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: %int_64.loc8: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%int_64.loc8) [template = f64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type.loc8 [template = f64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type.loc8, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %a.var: ref f64 = var a // CHECK:STDOUT: %a: ref f64 = bind_name a, %a.var -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// 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: %.loc10_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// 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: %int_64.loc9: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%Float(%int_64.loc9) [template = f64] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %float.make_type.loc9 [template = f64] +// CHECK:STDOUT: %.loc9_8.2: type = converted %float.make_type.loc9, %.loc9_8.1 [template = f64] +// CHECK:STDOUT: %int_64.loc10: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%Float(%int_64.loc10) [template = f64] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %float.make_type.loc10 [template = f64] +// CHECK:STDOUT: %.loc10_8.2: type = converted %float.make_type.loc10, %.loc10_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.div"; @@ -175,23 +175,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc8: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 10 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_24: f64 = float_literal 2.5 [template = constants.%.3] -// CHECK:STDOUT: %float.div.loc8: init f64 = call %Div.ref.loc8(%.loc8_18, %.loc8_24) [template = constants.%.4] +// CHECK:STDOUT: %float.loc8_18: f64 = float_literal 10 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_24: f64 = float_literal 2.5 [template = constants.%float.2] +// CHECK:STDOUT: %float.div.loc8: init f64 = call %Div.ref.loc8(%float.loc8_18, %float.loc8_24) [template = constants.%float.3] // CHECK:STDOUT: assign file.%a.var, %float.div.loc8 // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc9_18: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23: f64 = float_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %float.div.loc9: init f64 = call %Div.ref.loc9(%.loc9_18, %.loc9_23) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_27.1: f64 = value_of_initializer %float.div.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc9_18: f64 = float_literal 1 [template = constants.%float.4] +// CHECK:STDOUT: %float.loc9_23: f64 = float_literal 0 [template = constants.%float.5] +// CHECK:STDOUT: %float.div.loc9: init f64 = call %Div.ref.loc9(%float.loc9_18, %float.loc9_23) [template = constants.%float.6] +// CHECK:STDOUT: %.loc9_27.1: f64 = value_of_initializer %float.div.loc9 [template = constants.%float.6] +// CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%float.6] // CHECK:STDOUT: %b: f64 = bind_name b, %.loc9_27.2 // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18: f64 = float_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_23: f64 = float_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %float.div.loc10: init f64 = call %Div.ref.loc10(%.loc10_18, %.loc10_23) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_27.1: f64 = value_of_initializer %float.div.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_27.2: f64 = converted %float.div.loc10, %.loc10_27.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc10_18: f64 = float_literal 0 [template = constants.%float.5] +// CHECK:STDOUT: %float.loc10_23: f64 = float_literal 0 [template = constants.%float.5] +// CHECK:STDOUT: %float.div.loc10: init f64 = call %Div.ref.loc10(%float.loc10_18, %float.loc10_23) [template = constants.%float.7] +// CHECK:STDOUT: %.loc10_27.1: f64 = value_of_initializer %float.div.loc10 [template = constants.%float.7] +// CHECK:STDOUT: %.loc10_27.2: f64 = converted %float.div.loc10, %.loc10_27.1 [template = constants.%float.7] // CHECK:STDOUT: %c: f64 = bind_name c, %.loc10_27.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -199,7 +199,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] @@ -247,14 +247,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] -// CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] +// CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -270,22 +270,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] -// CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] +// CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -303,14 +303,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] @@ -329,18 +329,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] -// CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] -// CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] +// CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] +// CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -354,14 +354,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] -// CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] -// CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] +// CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] +// CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -377,22 +377,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] -// CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] -// CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] +// CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] +// CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -410,14 +410,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index 4a3b022ebb2bd..9b4432e2bd0b3 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -36,7 +36,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: --- float_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -44,15 +44,15 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] // CHECK:STDOUT: %Eq: %Eq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: 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: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_10.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_10.3: type = converted %float.make_type.loc2_10, %.loc2_10.2 [template = f64] -// CHECK:STDOUT: %.loc2_18.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%.loc2_18.1) [template = f64] -// CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %float.make_type.loc2_18 [template = f64] -// CHECK:STDOUT: %.loc2_18.3: type = converted %float.make_type.loc2_18, %.loc2_18.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_10: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%int_64.loc2_10) [template = f64] +// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %float.make_type.loc2_10 [template = f64] +// CHECK:STDOUT: %.loc2_10.2: type = converted %float.make_type.loc2_10, %.loc2_10.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_18: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%int_64.loc2_18) [template = f64] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %float.make_type.loc2_18 [template = f64] +// CHECK:STDOUT: %.loc2_18.2: type = converted %float.make_type.loc2_18, %.loc2_18.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type, %.loc2_26.1 [template = bool] @@ -125,14 +125,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %.loc12_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] -// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] -// CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] +// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] +// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -146,19 +146,19 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Eq(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.eq"; @@ -167,11 +167,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc8_19: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_24: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_24) [template = constants.%.6] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.eq.loc8 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.eq.loc8, %.loc8_13.1 [template = constants.%.6] +// CHECK:STDOUT: %float.loc8_19: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_24: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.eq.loc8: init bool = call %Eq.ref.loc8(%float.loc8_19, %float.loc8_24) [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.eq.loc8 [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.eq.loc8, %.loc8_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -186,11 +186,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc9_20: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_25: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_25) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.eq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.eq.loc9, %.loc9_14.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc9_20: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_25: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.eq.loc9: init bool = call %Eq.ref.loc9(%float.loc9_20, %float.loc9_25) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.eq.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.eq.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -220,7 +220,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] @@ -249,18 +249,18 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] -// CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] -// CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] +// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] +// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc7_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%int_64.loc7_35) [template = f64] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %float.make_type.loc7_35 [template = f64] +// CHECK:STDOUT: %.loc7_35.2: type = converted %float.make_type.loc7_35, %.loc7_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 358d32ce4bf39..c3c8c1efd437e 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_greater.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -41,17 +41,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal false [template] -// CHECK:STDOUT: %.8: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.9: bool = bool_literal true [template] -// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_15.3: type = converted %float.make_type.loc2_15, %.loc2_15.2 [template = f64] -// CHECK:STDOUT: %.loc2_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%.loc2_23.1) [template = f64] -// CHECK:STDOUT: %.loc2_23.2: type = value_of_initializer %float.make_type.loc2_23 [template = f64] -// CHECK:STDOUT: %.loc2_23.3: type = converted %float.make_type.loc2_23, %.loc2_23.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%int_64.loc2_15) [template = f64] +// CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %float.make_type.loc2_15 [template = f64] +// CHECK:STDOUT: %.loc2_15.2: type = converted %float.make_type.loc2_15, %.loc2_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%int_64.loc2_23) [template = f64] +// CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %float.make_type.loc2_23 [template = f64] +// CHECK:STDOUT: %.loc2_23.2: type = converted %float.make_type.loc2_23, %.loc2_23.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type, %.loc2_31.1 [template = bool] @@ -108,14 +108,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] -// CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] +// CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -144,14 +144,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -165,19 +165,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Greater(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.greater"; @@ -188,11 +188,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc9_25: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_30: f64 = float_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %float.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_30) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater.loc9, %.loc9_14.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc9_25: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_30: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.greater.loc9: init bool = call %Greater.ref.loc9(%float.loc9_25, %float.loc9_30) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -207,11 +207,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc10_25: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_30: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_30) [template = constants.%.7] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.greater.loc10 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.greater.loc10, %.loc10_14.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc10_25: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc10_30: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.greater.loc10: init bool = call %Greater.ref.loc10(%float.loc10_25, %float.loc10_30) [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.greater.loc10 [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.greater.loc10, %.loc10_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -226,11 +226,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %float.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater.loc11, %.loc11_13.1 [template = constants.%.9] +// CHECK:STDOUT: %float.loc11_24: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc11_29: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %float.greater.loc11: init bool = call %Greater.ref.loc11(%float.loc11_24, %float.loc11_29) [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater.loc11 [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater.loc11, %.loc11_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -246,14 +246,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_32: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_38: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_35.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_35.2: f64 = converted %float.negate.loc12, %.loc12_35.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_35.2, %.loc12_38) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater.loc12, %.loc12_14.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc12_32: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%float.loc12_32) [template = constants.%float.4] +// CHECK:STDOUT: %float.loc12_38: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %.loc12_35.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%float.4] +// CHECK:STDOUT: %.loc12_35.2: f64 = converted %float.negate.loc12, %.loc12_35.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_35.2, %float.loc12_38) [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater.loc12 [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater.loc12, %.loc12_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -268,15 +268,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %float.loc13_24: f64 = float_literal 0 [template = constants.%float.3] // 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_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_39.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater.loc13, %.loc13_13.1 [template = constants.%.9] +// CHECK:STDOUT: %float.loc13_36: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%float.loc13_36) [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%float.loc13_24, %.loc13_39.2) [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater.loc13 [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater.loc13, %.loc13_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 218a4943208be..14d3f065fda14 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_greater_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -41,17 +41,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal false [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] -// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_17.3: type = converted %float.make_type.loc2_17, %.loc2_17.2 [template = f64] -// CHECK:STDOUT: %.loc2_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%.loc2_25.1) [template = f64] -// CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %float.make_type.loc2_25 [template = f64] -// CHECK:STDOUT: %.loc2_25.3: type = converted %float.make_type.loc2_25, %.loc2_25.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%int_64.loc2_17) [template = f64] +// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %float.make_type.loc2_17 [template = f64] +// CHECK:STDOUT: %.loc2_17.2: type = converted %float.make_type.loc2_17, %.loc2_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%int_64.loc2_25) [template = f64] +// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %float.make_type.loc2_25 [template = f64] +// CHECK:STDOUT: %.loc2_25.2: type = converted %float.make_type.loc2_25, %.loc2_25.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type, %.loc2_33.1 [template = bool] @@ -108,14 +108,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] -// CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] +// CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -144,14 +144,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -165,19 +165,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @GreaterEq(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.greater_eq"; @@ -188,11 +188,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc9_27: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_32: f64 = float_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %float.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_32) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater_eq.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater_eq.loc9, %.loc9_14.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc9_27: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_32: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%float.loc9_27, %float.loc9_32) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater_eq.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater_eq.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -207,11 +207,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc10_26: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_31: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_31) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.greater_eq.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.greater_eq.loc10, %.loc10_13.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc10_26: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc10_31: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%float.loc10_26, %float.loc10_31) [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.greater_eq.loc10 [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.greater_eq.loc10, %.loc10_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -226,11 +226,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_31: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %float.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_31) [template = constants.%.8] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater_eq.loc11 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater_eq.loc11, %.loc11_13.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc11_26: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc11_31: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %float.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%float.loc11_26, %float.loc11_31) [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater_eq.loc11 [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater_eq.loc11, %.loc11_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -246,14 +246,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_34: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_40: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_37.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_37.2: f64 = converted %float.negate.loc12, %.loc12_37.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_37.2, %.loc12_40) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater_eq.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater_eq.loc12, %.loc12_14.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc12_34: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%float.loc12_34) [template = constants.%float.4] +// CHECK:STDOUT: %float.loc12_40: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %.loc12_37.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%float.4] +// CHECK:STDOUT: %.loc12_37.2: f64 = converted %float.negate.loc12, %.loc12_37.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_37.2, %float.loc12_40) [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater_eq.loc12 [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater_eq.loc12, %.loc12_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -268,15 +268,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc13_26: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %float.loc13_26: f64 = float_literal 0 [template = constants.%float.3] // 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_41.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_41.2: f64 = converted %float.negate.loc13, %.loc13_41.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_41.2) [template = constants.%.8] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater_eq.loc13 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater_eq.loc13, %.loc13_13.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc13_38: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%float.loc13_38) [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_41.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_41.2: f64 = converted %float.negate.loc13, %.loc13_41.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%float.loc13_26, %.loc13_41.2) [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater_eq.loc13 [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater_eq.loc13, %.loc13_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index ae7161346a703..b921649b2643a 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_less.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -41,17 +41,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_12.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_12.3: type = converted %float.make_type.loc2_12, %.loc2_12.2 [template = f64] -// CHECK:STDOUT: %.loc2_20.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%.loc2_20.1) [template = f64] -// CHECK:STDOUT: %.loc2_20.2: type = value_of_initializer %float.make_type.loc2_20 [template = f64] -// CHECK:STDOUT: %.loc2_20.3: type = converted %float.make_type.loc2_20, %.loc2_20.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_12: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%int_64.loc2_12) [template = f64] +// CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %float.make_type.loc2_12 [template = f64] +// CHECK:STDOUT: %.loc2_12.2: type = converted %float.make_type.loc2_12, %.loc2_12.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_20: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%int_64.loc2_20) [template = f64] +// CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %float.make_type.loc2_20 [template = f64] +// CHECK:STDOUT: %.loc2_20.2: type = converted %float.make_type.loc2_20, %.loc2_20.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type, %.loc2_28.1 [template = bool] @@ -108,14 +108,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] -// CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] +// CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -144,14 +144,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -165,19 +165,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Less(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.less"; @@ -188,11 +188,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_26: f64 = float_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %float.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less.loc9, %.loc9_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc9_21: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_26: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.less.loc9: init bool = call %Less.ref.loc9(%float.loc9_21, %float.loc9_26) [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less.loc9 [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less.loc9, %.loc9_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -207,11 +207,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc10_22: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_27: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_27) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.less.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.less.loc10, %.loc10_14.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc10_22: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc10_27: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.less.loc10: init bool = call %Less.ref.loc10(%float.loc10_22, %float.loc10_27) [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.less.loc10 [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.less.loc10, %.loc10_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -226,11 +226,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc11_22: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %float.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_27) [template = constants.%.8] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less.loc11 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less.loc11, %.loc11_14.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc11_22: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc11_27: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %float.less.loc11: init bool = call %Less.ref.loc11(%float.loc11_22, %float.loc11_27) [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less.loc11 [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less.loc11, %.loc11_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -246,14 +246,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_28: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_34: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_31.2, %.loc12_34) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less.loc12, %.loc12_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc12_28: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%float.loc12_28) [template = constants.%float.4] +// CHECK:STDOUT: %float.loc12_34: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%float.4] +// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_31.2, %float.loc12_34) [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less.loc12 [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less.loc12, %.loc12_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -268,15 +268,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc13_22: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %float.loc13_22: f64 = float_literal 0 [template = constants.%float.3] // 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_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_37.2) [template = constants.%.8] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less.loc13 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less.loc13, %.loc13_14.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc13_34: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%float.loc13_34) [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%float.loc13_22, %.loc13_37.2) [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less.loc13 [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less.loc13, %.loc13_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index 986497161e4ea..8e0d95c45775d 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_less_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -41,17 +41,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %.8: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.9: bool = bool_literal false [template] -// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %.loc2_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] -// CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] -// CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] +// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%int_64.loc2_22) [template = f64] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %float.make_type.loc2_22 [template = f64] +// CHECK:STDOUT: %.loc2_22.2: type = converted %float.make_type.loc2_22, %.loc2_22.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type, %.loc2_30.1 [template = bool] @@ -108,14 +108,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] -// CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] +// CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -144,14 +144,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -165,19 +165,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @LessEq(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.less_eq"; @@ -188,11 +188,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc9_23: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_28: f64 = float_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %float.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_28) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less_eq.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less_eq.loc9, %.loc9_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc9_23: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_28: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.less_eq.loc9: init bool = call %LessEq.ref.loc9(%float.loc9_23, %float.loc9_28) [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less_eq.loc9 [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less_eq.loc9, %.loc9_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -207,11 +207,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc10_23: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_28: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_28) [template = constants.%.7] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.less_eq.loc10 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.less_eq.loc10, %.loc10_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc10_23: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc10_28: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.less_eq.loc10: init bool = call %LessEq.ref.loc10(%float.loc10_23, %float.loc10_28) [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.less_eq.loc10 [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.less_eq.loc10, %.loc10_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -226,11 +226,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %float.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less_eq.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less_eq.loc11, %.loc11_14.1 [template = constants.%.9] +// CHECK:STDOUT: %float.loc11_24: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc11_29: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %float.less_eq.loc11: init bool = call %LessEq.ref.loc11(%float.loc11_24, %float.loc11_29) [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less_eq.loc11 [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less_eq.loc11, %.loc11_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -246,14 +246,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_30: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_36: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_33.2, %.loc12_36) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less_eq.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less_eq.loc12, %.loc12_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc12_30: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%float.loc12_30) [template = constants.%float.4] +// CHECK:STDOUT: %float.loc12_36: f64 = float_literal 0 [template = constants.%float.3] +// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%float.4] +// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_33.2, %float.loc12_36) [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less_eq.loc12 [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less_eq.loc12, %.loc12_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -268,15 +268,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %float.loc13_24: f64 = float_literal 0 [template = constants.%float.3] // 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_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_39.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less_eq.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less_eq.loc13, %.loc13_14.1 [template = constants.%.9] +// CHECK:STDOUT: %float.loc13_36: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%float.loc13_36) [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%float.4] +// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%float.4] +// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%float.loc13_24, %.loc13_39.2) [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less_eq.loc13 [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less_eq.loc13, %.loc13_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index dbd19dcbca116..58f54622852ac 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -47,10 +47,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } @@ -75,10 +75,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_16.3: type = converted %int.make_type_signed, %.loc4_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed, %.loc4_16.1 [template = constants.%i32] // CHECK:STDOUT: %size.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %size: %i32 = bind_name size, %size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 @@ -93,17 +93,17 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 64 [template] -// CHECK:STDOUT: %.30: f64 = float_literal 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_64.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] +// CHECK:STDOUT: %float: f64 = float_literal 0 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] @@ -130,14 +130,14 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_14.3: = bound_method %.loc6_14.1, %.loc6_14.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_14.4: = specific_function %.loc6_14.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_14.4(%.loc6_14.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_14.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc6_14.6: %i32 = converted %.loc6_14.1, %.loc6_14.5 [template = constants.%.29] -// CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14.6) [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_64) [template = constants.%int_64.2] +// CHECK:STDOUT: %.loc6_14.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_64.2] +// CHECK:STDOUT: %.loc6_14.2: %i32 = converted %int_64, %.loc6_14.1 [template = constants.%int_64.2] +// CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14.2) [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 @@ -148,10 +148,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_23.3: type = converted %int.make_type_signed, %.loc8_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_23.2: type = converted %int.make_type_signed, %.loc8_23.1 [template = constants.%i32] // CHECK:STDOUT: %dyn_size.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %dyn_size: %i32 = bind_name dyn_size, %dyn_size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 @@ -173,8 +173,8 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: f64 = float_literal 0 [template = constants.%.30] -// CHECK:STDOUT: assign file.%f.var, %.loc6 +// CHECK:STDOUT: %float: f64 = float_literal 0 [template = constants.%float] +// CHECK:STDOUT: assign file.%f.var, %float // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -183,21 +183,21 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32.1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.1, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 32 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %.30: = bound_method %.29, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 64 [template] +// CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_64.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -221,22 +221,22 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.28] -// CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26.6) [template = ] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32.loc10, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_32.loc10) [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_32.loc10, %.loc10_26.1 [template = constants.%int_32.2] +// CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26.2) [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: %.loc12_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed, %.loc12_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [template = constants.%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: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] @@ -253,13 +253,13 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 64 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_23.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_23.2: = bound_method %.loc12_21, %.loc12_23.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_23.3: = specific_function %.loc12_23.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_23.3(%.loc12_21) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_23.4: init %i32 = converted %.loc12_21, %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: assign file.%dyn_size.var, %.loc12_23.4 +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_64) [template = constants.%int_64.2] +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_64, %int.convert_checked [template = constants.%int_64.2] +// CHECK:STDOUT: assign file.%dyn_size.var, %.loc12 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 690d9e3c4bca2..b76b9c7a76cc7 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -53,16 +53,16 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- mul_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 0.5 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 2 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 0.5 [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,18 +89,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] -// CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] +// CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -116,18 +116,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] -// CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] +// CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -135,10 +135,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -159,9 +159,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.3] -// CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] +// CHECK:STDOUT: %float.loc8_18: f64 = float_literal 2 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_23: f64 = float_literal 0.5 [template = constants.%float.2] +// CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%float.loc8_18, %float.loc8_23) [template = constants.%float.3] // CHECK:STDOUT: assign file.%x.var, %float.mul // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -169,7 +169,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] @@ -217,14 +217,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] -// CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] +// CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -240,22 +240,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] -// CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] +// CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -273,14 +273,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] @@ -299,18 +299,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] -// CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] -// CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] +// CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] +// CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -324,14 +324,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] -// CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] -// CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] +// CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] +// CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -347,22 +347,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] -// CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] -// CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] +// CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] +// CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -380,14 +380,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index a9fc195ef991f..4d7d145df3057 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -74,15 +74,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1.5 [template] -// CHECK:STDOUT: %.3: f64 = float_literal -1.5 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 1.5 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal -1.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -107,14 +107,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %.loc2_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] -// CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] -// CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] +// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%int_64.loc2_22) [template = f64] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %float.make_type.loc2_22 [template = f64] +// CHECK:STDOUT: %.loc2_22.2: type = converted %float.make_type.loc2_22, %.loc2_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -128,18 +128,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] -// CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] +// CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -147,10 +147,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a.param_patt: f64) -> f64 = "float.negate"; @@ -168,10 +168,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_21: f64 = float_literal 1.5 [template = constants.%.2] -// CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%.loc8_21) [template = constants.%.3] -// CHECK:STDOUT: %.loc8_25.1: f64 = value_of_initializer %float.negate [template = constants.%.3] -// CHECK:STDOUT: %.loc8_25.2: f64 = converted %float.negate, %.loc8_25.1 [template = constants.%.3] +// CHECK:STDOUT: %float: f64 = float_literal 1.5 [template = constants.%float.1] +// CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%float) [template = constants.%float.2] +// CHECK:STDOUT: %.loc8_25.1: f64 = value_of_initializer %float.negate [template = constants.%float.2] +// CHECK:STDOUT: %.loc8_25.2: f64 = converted %float.negate, %.loc8_25.1 [template = constants.%float.2] // CHECK:STDOUT: %a: f64 = bind_name a, %.loc8_25.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -179,7 +179,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] @@ -225,10 +225,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_16.1) [template = f64] -// CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_16.3: type = converted %float.make_type, %.loc8_16.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc8_16.2: type = converted %float.make_type, %.loc8_16.1 [template = f64] // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param0 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } @@ -240,18 +240,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -265,10 +265,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_21.1) [template = f64] -// CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc18_21.3: type = converted %float.make_type, %.loc18_21.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc18_21.2: type = converted %float.make_type, %.loc18_21.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] @@ -283,14 +283,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc19_17.3: type = converted %float.make_type.loc19_17, %.loc19_17.2 [template = f64] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%.loc19_25.1) [template = f64] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %float.make_type.loc19_25 [template = f64] -// CHECK:STDOUT: %.loc19_25.3: type = converted %float.make_type.loc19_25, %.loc19_25.2 [template = f64] +// CHECK:STDOUT: %int_64.loc19_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%int_64.loc19_17) [template = f64] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %float.make_type.loc19_17 [template = f64] +// CHECK:STDOUT: %.loc19_17.2: type = converted %float.make_type.loc19_17, %.loc19_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc19_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%int_64.loc19_25) [template = f64] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %float.make_type.loc19_25 [template = f64] +// CHECK:STDOUT: %.loc19_25.2: type = converted %float.make_type.loc19_25, %.loc19_25.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -302,14 +302,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_25.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc21_25.3: type = converted %float.make_type.loc21_25, %.loc21_25.2 [template = f64] -// CHECK:STDOUT: %.loc21_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%.loc21_33.1) [template = f64] -// CHECK:STDOUT: %.loc21_33.2: type = value_of_initializer %float.make_type.loc21_33 [template = f64] -// CHECK:STDOUT: %.loc21_33.3: type = converted %float.make_type.loc21_33, %.loc21_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc21_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%int_64.loc21_25) [template = f64] +// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %float.make_type.loc21_25 [template = f64] +// CHECK:STDOUT: %.loc21_25.2: type = converted %float.make_type.loc21_25, %.loc21_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc21_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%int_64.loc21_33) [template = f64] +// CHECK:STDOUT: %.loc21_33.1: type = value_of_initializer %float.make_type.loc21_33 [template = f64] +// CHECK:STDOUT: %.loc21_33.2: type = converted %float.make_type.loc21_33, %.loc21_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -325,22 +325,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc32_26.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc32_26.3: type = converted %float.make_type.loc32_26, %.loc32_26.2 [template = f64] -// CHECK:STDOUT: %.loc32_34.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%.loc32_34.1) [template = f64] -// CHECK:STDOUT: %.loc32_34.2: type = value_of_initializer %float.make_type.loc32_34 [template = f64] -// CHECK:STDOUT: %.loc32_34.3: type = converted %float.make_type.loc32_34, %.loc32_34.2 [template = f64] -// CHECK:STDOUT: %.loc32_42.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%.loc32_42.1) [template = f64] -// CHECK:STDOUT: %.loc32_42.2: type = value_of_initializer %float.make_type.loc32_42 [template = f64] -// CHECK:STDOUT: %.loc32_42.3: type = converted %float.make_type.loc32_42, %.loc32_42.2 [template = f64] -// CHECK:STDOUT: %.loc32_50.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%.loc32_50.1) [template = f64] -// CHECK:STDOUT: %.loc32_50.2: type = value_of_initializer %float.make_type.loc32_50 [template = f64] -// CHECK:STDOUT: %.loc32_50.3: type = converted %float.make_type.loc32_50, %.loc32_50.2 [template = f64] +// CHECK:STDOUT: %int_64.loc32_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%int_64.loc32_26) [template = f64] +// CHECK:STDOUT: %.loc32_26.1: type = value_of_initializer %float.make_type.loc32_26 [template = f64] +// CHECK:STDOUT: %.loc32_26.2: type = converted %float.make_type.loc32_26, %.loc32_26.1 [template = f64] +// CHECK:STDOUT: %int_64.loc32_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%int_64.loc32_34) [template = f64] +// CHECK:STDOUT: %.loc32_34.1: type = value_of_initializer %float.make_type.loc32_34 [template = f64] +// CHECK:STDOUT: %.loc32_34.2: type = converted %float.make_type.loc32_34, %.loc32_34.1 [template = f64] +// CHECK:STDOUT: %int_64.loc32_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%int_64.loc32_42) [template = f64] +// CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %float.make_type.loc32_42 [template = f64] +// CHECK:STDOUT: %.loc32_42.2: type = converted %float.make_type.loc32_42, %.loc32_42.1 [template = f64] +// CHECK:STDOUT: %int_64.loc32_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%int_64.loc32_50) [template = f64] +// CHECK:STDOUT: %.loc32_50.1: type = value_of_initializer %float.make_type.loc32_50 [template = f64] +// CHECK:STDOUT: %.loc32_50.2: type = converted %float.make_type.loc32_50, %.loc32_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -358,14 +358,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc43_32.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc43_32.3: type = converted %float.make_type.loc43_32, %.loc43_32.2 [template = f64] -// CHECK:STDOUT: %.loc43_40.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%.loc43_40.1) [template = f64] -// CHECK:STDOUT: %.loc43_40.2: type = value_of_initializer %float.make_type.loc43_40 [template = f64] -// CHECK:STDOUT: %.loc43_40.3: type = converted %float.make_type.loc43_40, %.loc43_40.2 [template = f64] +// CHECK:STDOUT: %int_64.loc43_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%int_64.loc43_32) [template = f64] +// CHECK:STDOUT: %.loc43_32.1: type = value_of_initializer %float.make_type.loc43_32 [template = f64] +// CHECK:STDOUT: %.loc43_32.2: type = converted %float.make_type.loc43_32, %.loc43_32.1 [template = f64] +// CHECK:STDOUT: %int_64.loc43_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%int_64.loc43_40) [template = f64] +// CHECK:STDOUT: %.loc43_40.1: type = value_of_initializer %float.make_type.loc43_40 [template = f64] +// CHECK:STDOUT: %.loc43_40.2: type = converted %float.make_type.loc43_40, %.loc43_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc43_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc43_48.2: type = converted %bool.make_type, %.loc43_48.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 39c1e787d8e99..67782c3b17a5a 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -36,7 +36,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: --- float_neq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -44,15 +44,15 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] // CHECK:STDOUT: %Neq: %Neq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: 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: %float.1: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type, %.loc2_27.1 [template = bool] @@ -125,14 +125,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %.loc12_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] -// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] -// CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] +// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] +// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -146,19 +146,19 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Neq(%a.param_patt: f64, %b.param_patt: f64) -> bool = "float.neq"; @@ -167,11 +167,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc8_20: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_25: f64 = float_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %float.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_20, %.loc8_25) [template = constants.%.7] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.neq.loc8 [template = constants.%.7] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.neq.loc8, %.loc8_13.1 [template = constants.%.7] +// CHECK:STDOUT: %float.loc8_20: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_25: f64 = float_literal 2 [template = constants.%float.2] +// CHECK:STDOUT: %float.neq.loc8: init bool = call %Neq.ref.loc8(%float.loc8_20, %float.loc8_25) [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.neq.loc8 [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.neq.loc8, %.loc8_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -186,11 +186,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_26: f64 = float_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %float.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.neq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.neq.loc9, %.loc9_14.1 [template = constants.%.8] +// CHECK:STDOUT: %float.loc9_21: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc9_26: f64 = float_literal 1 [template = constants.%float.1] +// CHECK:STDOUT: %float.neq.loc9: init bool = call %Neq.ref.loc9(%float.loc9_21, %float.loc9_26) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.neq.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.neq.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -220,7 +220,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] @@ -249,18 +249,18 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] -// CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] -// CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] +// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] +// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc7_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%int_64.loc7_35) [template = f64] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %float.make_type.loc7_35 [template = f64] +// CHECK:STDOUT: %.loc7_35.2: type = converted %float.make_type.loc7_35, %.loc7_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 069b43e86c14e..04551d598a66d 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -53,16 +53,16 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 0.5 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 1.5 [template] +// CHECK:STDOUT: %float.1: f64 = float_literal 2 [template] +// CHECK:STDOUT: %float.2: f64 = float_literal 0.5 [template] +// CHECK:STDOUT: %float.3: f64 = float_literal 1.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,18 +89,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] -// CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] +// CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -116,18 +116,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] -// CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] +// CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -135,10 +135,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -159,9 +159,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.3] -// CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] +// CHECK:STDOUT: %float.loc8_18: f64 = float_literal 2 [template = constants.%float.1] +// CHECK:STDOUT: %float.loc8_23: f64 = float_literal 0.5 [template = constants.%float.2] +// CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%float.loc8_18, %float.loc8_23) [template = constants.%float.3] // CHECK:STDOUT: assign file.%x.var, %float.sub // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -169,7 +169,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] @@ -217,14 +217,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] -// CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] +// CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -240,22 +240,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] -// CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] +// CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -273,14 +273,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] @@ -299,18 +299,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] -// CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] -// CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] +// CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] +// CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -324,14 +324,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] -// CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] -// CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] +// CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] +// CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 @@ -347,22 +347,22 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] -// CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] -// CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] +// CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] +// CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 @@ -380,14 +380,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: Core.IntLiteral = int_value 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] -// CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index a5ceca7d59b96..bc568e833de0d 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -22,34 +22,34 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_and.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 8 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] +// CHECK:STDOUT: %int_8.1: %i32 = int_value 8 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_8.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_8.2: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_8.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,18 +80,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -99,44 +99,44 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_24.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.33] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.and, %.loc4_26.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.and [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.and, %.loc4_26.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.and, %.loc4_26.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 8 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] +// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_8.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.and, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.and [template = constants.%int_8.1] +// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.and, %.loc4_26.1 [template = constants.%int_8.1] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc4_26.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc4_26.4: Core.IntLiteral = converted %int.and, %.loc4_26.3 [template = constants.%int_8.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_26.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_8, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -145,18 +145,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 7602af545ec3c..6394ed63515b7 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -23,37 +23,37 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: --- int_complement.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Complement.type: type = fn_type @Complement [template] // CHECK:STDOUT: %Complement: %Complement.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1193046 [template] +// CHECK:STDOUT: %int_1193046.1: Core.IntLiteral = int_value 1193046 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1193046 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1193047 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 16777215 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 16777215 [template] -// CHECK:STDOUT: %.35: %i32 = int_value 15584169 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1193046.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1193046.2: %i32 = int_value 1193046 [template] +// CHECK:STDOUT: %int_-1193047: %i32 = int_value -1193047 [template] +// CHECK:STDOUT: %int_16777215.1: Core.IntLiteral = int_value 16777215 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_16777215.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_16777215.2: %i32 = int_value 16777215 [template] +// CHECK:STDOUT: %int_15584169.1: %i32 = int_value 15584169 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.36: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.37: = bound_method %.35, %Convert.15 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 15584169 [template] -// CHECK:STDOUT: %.40: type = array_type %.39, %i32 [template] -// CHECK:STDOUT: %.41: type = ptr_type %.40 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_15584169.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_15584169.2: Core.IntLiteral = int_value 15584169 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_15584169.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -83,14 +83,14 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%.loc2_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.3: type = converted %int.make_type_signed.loc2_18, %.loc2_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%.loc2_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.3: type = converted %int.make_type_signed.loc2_26, %.loc2_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -104,18 +104,18 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_11: init type = call constants.%Int(%.loc3_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_11.2: type = value_of_initializer %int.make_type_signed.loc3_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_11.3: type = converted %int.make_type_signed.loc3_11, %.loc3_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_19: init type = call constants.%Int(%.loc3_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_19.2: type = value_of_initializer %int.make_type_signed.loc3_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_19.3: type = converted %int.make_type_signed.loc3_19, %.loc3_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_27: init type = call constants.%Int(%.loc3_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_27.2: type = value_of_initializer %int.make_type_signed.loc3_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_27.3: type = converted %int.make_type_signed.loc3_27, %.loc3_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_11: init type = call constants.%Int(%int_32.loc3_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_11.1: type = value_of_initializer %int.make_type_signed.loc3_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_11.2: type = converted %int.make_type_signed.loc3_11, %.loc3_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_19: init type = call constants.%Int(%int_32.loc3_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_19.1: type = value_of_initializer %int.make_type_signed.loc3_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_19.2: type = converted %int.make_type_signed.loc3_19, %.loc3_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_27: init type = call constants.%Int(%int_32.loc3_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_27.1: type = value_of_initializer %int.make_type_signed.loc3_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_27.2: type = converted %int.make_type_signed.loc3_27, %.loc3_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -123,62 +123,62 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, %Complement.decl [template = constants.%Complement] -// CHECK:STDOUT: %.loc5_31.1: Core.IntLiteral = int_value 1193046 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_31.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_31.3: = bound_method %.loc5_31.1, %.loc5_31.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_31.4: = specific_function %.loc5_31.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %.loc5_31.4(%.loc5_31.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_31.5: %i32 = value_of_initializer %int.convert_checked.loc5_31 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_31.6: %i32 = converted %.loc5_31.1, %.loc5_31.5 [template = constants.%.29] -// CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.1: Core.IntLiteral = int_value 16777215 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.complement [template = constants.%.30] -// CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int.complement, %.loc5_39.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_42.3: = bound_method %.loc5_42.1, %.loc5_42.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc5_42.4: = specific_function %.loc5_42.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %.loc5_42.4(%.loc5_42.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc5_42.5: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.34] -// CHECK:STDOUT: %.loc5_42.6: %i32 = converted %.loc5_42.1, %.loc5_42.5 [template = constants.%.34] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_39.2, %.loc5_42.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_50.1: %Convert.type.6 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc5_50.2: = bound_method %int.and, %.loc5_50.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc5_50.3: = specific_function %.loc5_50.2, @Convert.4(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc5_50.4: %i32 = value_of_initializer %int.and [template = constants.%.35] -// CHECK:STDOUT: %.loc5_50.5: %i32 = converted %int.and, %.loc5_50.4 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc5_50: init Core.IntLiteral = call %.loc5_50.3(%.loc5_50.5) [template = constants.%.39] -// CHECK:STDOUT: %.loc5_50.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_50 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_50.7: Core.IntLiteral = converted %int.and, %.loc5_50.6 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_51: type = array_type %.loc5_50.7, %i32 [template = constants.%.40] -// CHECK:STDOUT: %arr.var: ref %.40 = var arr -// CHECK:STDOUT: %arr: ref %.40 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc6_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18: Core.IntLiteral = int_value 15584169 [template = constants.%.39] -// CHECK:STDOUT: %.loc6_13.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_13.3: type = converted %int.make_type_signed.loc6, %.loc6_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26: type = array_type %.loc6_18, %i32 [template = constants.%.40] -// CHECK:STDOUT: %.loc6_27: type = ptr_type %.40 [template = constants.%.41] +// CHECK:STDOUT: %int_1193046: Core.IntLiteral = int_value 1193046 [template = constants.%int_1193046.1] +// CHECK:STDOUT: %impl.elem0.loc5_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_31: = bound_method %int_1193046, %impl.elem0.loc5_31 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5_31: = specific_function %Convert.bound.loc5_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %Convert.specific_fn.loc5_31(%int_1193046) [template = constants.%int_1193046.2] +// CHECK:STDOUT: %.loc5_31.1: %i32 = value_of_initializer %int.convert_checked.loc5_31 [template = constants.%int_1193046.2] +// CHECK:STDOUT: %.loc5_31.2: %i32 = converted %int_1193046, %.loc5_31.1 [template = constants.%int_1193046.2] +// CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.2) [template = constants.%int_-1193047] +// CHECK:STDOUT: %int_16777215: Core.IntLiteral = int_value 16777215 [template = constants.%int_16777215.1] +// CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.complement [template = constants.%int_-1193047] +// CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int.complement, %.loc5_39.1 [template = constants.%int_-1193047] +// CHECK:STDOUT: %impl.elem0.loc5_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_42: = bound_method %int_16777215, %impl.elem0.loc5_42 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc5_42: = specific_function %Convert.bound.loc5_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %Convert.specific_fn.loc5_42(%int_16777215) [template = constants.%int_16777215.2] +// CHECK:STDOUT: %.loc5_42.1: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%int_16777215.2] +// CHECK:STDOUT: %.loc5_42.2: %i32 = converted %int_16777215, %.loc5_42.1 [template = constants.%int_16777215.2] +// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_39.2, %.loc5_42.2) [template = constants.%int_15584169.1] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc5_50: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc5_50: = bound_method %int.and, %impl.elem0.loc5_50 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc5_50: = specific_function %Convert.bound.loc5_50, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc5_50.1: %i32 = value_of_initializer %int.and [template = constants.%int_15584169.1] +// CHECK:STDOUT: %.loc5_50.2: %i32 = converted %int.and, %.loc5_50.1 [template = constants.%int_15584169.1] +// CHECK:STDOUT: %int.convert_checked.loc5_50: init Core.IntLiteral = call %Convert.specific_fn.loc5_50(%.loc5_50.2) [template = constants.%int_15584169.2] +// CHECK:STDOUT: %.loc5_50.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_50 [template = constants.%int_15584169.2] +// CHECK:STDOUT: %.loc5_50.4: Core.IntLiteral = converted %int.and, %.loc5_50.3 [template = constants.%int_15584169.2] +// CHECK:STDOUT: %array_type.loc5: type = array_type %.loc5_50.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %int_15584169: Core.IntLiteral = int_value 15584169 [template = constants.%int_15584169.2] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed.loc6, %.loc6_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc6: type = array_type %int_15584169, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_19: init type = call constants.%Int(%.loc8_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.2: type = value_of_initializer %int.make_type_signed.loc8_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.3: type = converted %int.make_type_signed.loc8_19, %.loc8_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%.loc8_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.3: type = converted %int.make_type_signed.loc8_27, %.loc8_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_19: init type = call constants.%Int(%int_32.loc8_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_signed.loc8_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed.loc8_19, %.loc8_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%int_32.loc8_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed.loc8_27, %.loc8_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -202,9 +202,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.40 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc6: %.41 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.41 = bind_name arr_p, %.loc6 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index d6bdf0604ef83..7befcb0220149 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -251,17 +251,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- int_ops.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] @@ -276,11 +276,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint32: %Uint32ToUint32.type = struct_value () [template] // CHECK:STDOUT: %IntLiteralToIntLiteral.type: type = fn_type @IntLiteralToIntLiteral [template] // CHECK:STDOUT: %IntLiteralToIntLiteral: %IntLiteralToIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] @@ -291,11 +291,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToInt16: %IntLiteralToInt16.type = struct_value () [template] // CHECK:STDOUT: %IntLiteralToUint16.type: type = fn_type @IntLiteralToUint16 [template] // CHECK:STDOUT: %IntLiteralToUint16: %IntLiteralToUint16.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.3 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt64.type: type = fn_type @Uint32ToInt64 [template] @@ -349,14 +349,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%.loc4_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_signed.loc4_17, %.loc4_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%.loc4_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.2: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.3: type = converted %int.make_type_signed.loc4_25, %.loc4_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%int_32.loc4_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_signed.loc4_25, %.loc4_25.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -370,18 +370,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%.loc5_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.3: type = converted %int.make_type_signed.loc5_14, %.loc5_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.3: type = converted %int.make_type_signed.loc5_22, %.loc5_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%.loc5_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.2: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.3: type = converted %int.make_type_signed.loc5_30, %.loc5_30.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_30.1: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_30.2: type = converted %int.make_type_signed.loc5_30, %.loc5_30.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -397,18 +397,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_14: init type = call constants.%UInt(%.loc6_14.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_unsigned.loc6_14 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_unsigned.loc6_14, %.loc6_14.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_22: init type = call constants.%UInt(%.loc6_22.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_unsigned.loc6_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_unsigned.loc6_22, %.loc6_22.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_30: init type = call constants.%UInt(%.loc6_30.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_30.2: type = value_of_initializer %int.make_type_unsigned.loc6_30 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_30.3: type = converted %int.make_type_unsigned.loc6_30, %.loc6_30.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_14: init type = call constants.%UInt(%int_32.loc6_14) [template = constants.%u32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_unsigned.loc6_14 [template = constants.%u32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_unsigned.loc6_14, %.loc6_14.1 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_22: init type = call constants.%UInt(%int_32.loc6_22) [template = constants.%u32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_unsigned.loc6_22 [template = constants.%u32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_unsigned.loc6_22, %.loc6_22.1 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc6_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_30: init type = call constants.%UInt(%int_32.loc6_30) [template = constants.%u32] +// CHECK:STDOUT: %.loc6_30.1: type = value_of_initializer %int.make_type_unsigned.loc6_30 [template = constants.%u32] +// CHECK:STDOUT: %.loc6_30.2: type = converted %int.make_type_unsigned.loc6_30, %.loc6_30.1 [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %u32 = value_param runtime_param1 @@ -429,14 +429,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10_20: init type = call constants.%Int(%.loc10_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.2: type = value_of_initializer %int.make_type_signed.loc10_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.3: type = converted %int.make_type_signed.loc10_20, %.loc10_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10_28: init type = call constants.%Int(%.loc10_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_28.2: type = value_of_initializer %int.make_type_signed.loc10_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_28.3: type = converted %int.make_type_signed.loc10_28, %.loc10_28.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_20: init type = call constants.%Int(%int_32.loc10_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %int.make_type_signed.loc10_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_signed.loc10_20, %.loc10_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_28: init type = call constants.%Int(%int_32.loc10_28) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %int.make_type_signed.loc10_28 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_28.2: type = converted %int.make_type_signed.loc10_28, %.loc10_28.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -448,14 +448,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.3: type = converted %int.make_type_signed, %.loc11_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc11_29.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc11_29.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc11_29.3: type = converted %int.make_type_unsigned, %.loc11_29.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_21.2: type = converted %int.make_type_signed, %.loc11_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc11_29) [template = constants.%u32] +// CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_unsigned, %.loc11_29.1 [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 @@ -467,14 +467,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc12_21.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc12_21.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc12_21.3: type = converted %int.make_type_unsigned, %.loc12_21.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_29.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_29.3: type = converted %int.make_type_signed, %.loc12_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc12_21) [template = constants.%u32] +// CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_unsigned, %.loc12_21.1 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_29.2: type = converted %int.make_type_signed, %.loc12_29.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -486,14 +486,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc13_22: init type = call constants.%UInt(%.loc13_22.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc13_22.2: type = value_of_initializer %int.make_type_unsigned.loc13_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc13_22.3: type = converted %int.make_type_unsigned.loc13_22, %.loc13_22.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc13_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc13_30: init type = call constants.%UInt(%.loc13_30.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc13_30.2: type = value_of_initializer %int.make_type_unsigned.loc13_30 [template = constants.%u32] -// CHECK:STDOUT: %.loc13_30.3: type = converted %int.make_type_unsigned.loc13_30, %.loc13_30.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc13_22: init type = call constants.%UInt(%int_32.loc13_22) [template = constants.%u32] +// CHECK:STDOUT: %.loc13_22.1: type = value_of_initializer %int.make_type_unsigned.loc13_22 [template = constants.%u32] +// CHECK:STDOUT: %.loc13_22.2: type = converted %int.make_type_unsigned.loc13_22, %.loc13_22.1 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc13_30: init type = call constants.%UInt(%int_32.loc13_30) [template = constants.%u32] +// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_unsigned.loc13_30 [template = constants.%u32] +// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_unsigned.loc13_30, %.loc13_30.1 [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 @@ -524,14 +524,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_20: init type = call constants.%Int(%.loc18_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.2: type = value_of_initializer %int.make_type_signed.loc18_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.3: type = converted %int.make_type_signed.loc18_20, %.loc18_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_28.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%.loc18_28.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc18_28.2: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i16] -// CHECK:STDOUT: %.loc18_28.3: type = converted %int.make_type_signed.loc18_28, %.loc18_28.2 [template = constants.%i16] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_20: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_20.1: type = value_of_initializer %int.make_type_signed.loc18_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_signed.loc18_20, %.loc18_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i16] +// CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_signed.loc18_28, %.loc18_28.1 [template = constants.%i16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -543,14 +543,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_21.3: type = converted %int.make_type_signed, %.loc19_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_29.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc19_29.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc19_29.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc19_29.3: type = converted %int.make_type_unsigned, %.loc19_29.2 [template = constants.%u16] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_21.2: type = converted %int.make_type_signed, %.loc19_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc19_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] +// CHECK:STDOUT: %.loc19_29.2: type = converted %int.make_type_unsigned, %.loc19_29.1 [template = constants.%u16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -562,14 +562,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc20_21.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc20_21.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc20_21.3: type = converted %int.make_type_unsigned, %.loc20_21.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc20_29.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc20_29.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_signed, %.loc20_29.2 [template = constants.%i16] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc20_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc20_21.2: type = converted %int.make_type_unsigned, %.loc20_21.1 [template = constants.%u32] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] +// CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_signed, %.loc20_29.1 [template = constants.%i16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -581,14 +581,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc21_22: init type = call constants.%UInt(%.loc21_22.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc21_22.2: type = value_of_initializer %int.make_type_unsigned.loc21_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc21_22.3: type = converted %int.make_type_unsigned.loc21_22, %.loc21_22.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc21_30.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc21_30: init type = call constants.%UInt(%.loc21_30.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc21_30.2: type = value_of_initializer %int.make_type_unsigned.loc21_30 [template = constants.%u16] -// CHECK:STDOUT: %.loc21_30.3: type = converted %int.make_type_unsigned.loc21_30, %.loc21_30.2 [template = constants.%u16] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc21_22: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc21_22.1: type = value_of_initializer %int.make_type_unsigned.loc21_22 [template = constants.%u32] +// CHECK:STDOUT: %.loc21_22.2: type = converted %int.make_type_unsigned.loc21_22, %.loc21_22.1 [template = constants.%u32] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc21_30: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc21_30.1: type = value_of_initializer %int.make_type_unsigned.loc21_30 [template = constants.%u16] +// CHECK:STDOUT: %.loc21_30.2: type = converted %int.make_type_unsigned.loc21_30, %.loc21_30.1 [template = constants.%u16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -604,10 +604,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc22_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc22_36.2: type = converted %int_literal.make_type, %.loc22_36.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc22_42.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_42.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc22_42.2: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc22_42.3: type = converted %int.make_type_signed, %.loc22_42.2 [template = constants.%i16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc22_42.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] +// CHECK:STDOUT: %.loc22_42.2: type = converted %int.make_type_signed, %.loc22_42.1 [template = constants.%i16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -623,10 +623,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_37.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_37.2: type = converted %int_literal.make_type, %.loc23_37.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc23_43.1: Core.IntLiteral = int_value 16 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc23_43.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc23_43.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc23_43.3: type = converted %int.make_type_unsigned, %.loc23_43.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc23_43.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] +// CHECK:STDOUT: %.loc23_43.2: type = converted %int.make_type_unsigned, %.loc23_43.1 [template = constants.%u16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -638,14 +638,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc26_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26_20: init type = call constants.%Int(%.loc26_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_20.2: type = value_of_initializer %int.make_type_signed.loc26_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_20.3: type = converted %int.make_type_signed.loc26_20, %.loc26_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_28.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc26_28: init type = call constants.%Int(%.loc26_28.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc26_28.2: type = value_of_initializer %int.make_type_signed.loc26_28 [template = constants.%i64] -// CHECK:STDOUT: %.loc26_28.3: type = converted %int.make_type_signed.loc26_28, %.loc26_28.2 [template = constants.%i64] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26_20: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_20.1: type = value_of_initializer %int.make_type_signed.loc26_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_20.2: type = converted %int.make_type_signed.loc26_20, %.loc26_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc26_28: init type = call constants.%Int(%int_64) [template = constants.%i64] +// CHECK:STDOUT: %.loc26_28.1: type = value_of_initializer %int.make_type_signed.loc26_28 [template = constants.%i64] +// CHECK:STDOUT: %.loc26_28.2: type = converted %int.make_type_signed.loc26_28, %.loc26_28.1 [template = constants.%i64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -657,14 +657,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc27_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc27_21.3: type = converted %int.make_type_signed, %.loc27_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_29.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc27_29.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc27_29.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] -// CHECK:STDOUT: %.loc27_29.3: type = converted %int.make_type_unsigned, %.loc27_29.2 [template = constants.%u64] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc27_21.2: type = converted %int.make_type_signed, %.loc27_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_64) [template = constants.%u64] +// CHECK:STDOUT: %.loc27_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] +// CHECK:STDOUT: %.loc27_29.2: type = converted %int.make_type_unsigned, %.loc27_29.1 [template = constants.%u64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 @@ -676,14 +676,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc28_21.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc28_21.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc28_21.3: type = converted %int.make_type_unsigned, %.loc28_21.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc28_29.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc28_29.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc28_29.2: type = value_of_initializer %int.make_type_signed [template = constants.%i64] -// CHECK:STDOUT: %.loc28_29.3: type = converted %int.make_type_signed, %.loc28_29.2 [template = constants.%i64] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc28_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_unsigned, %.loc28_21.1 [template = constants.%u32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_64) [template = constants.%i64] +// CHECK:STDOUT: %.loc28_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i64] +// CHECK:STDOUT: %.loc28_29.2: type = converted %int.make_type_signed, %.loc28_29.1 [template = constants.%i64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -695,14 +695,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc29_22: init type = call constants.%UInt(%.loc29_22.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc29_22.2: type = value_of_initializer %int.make_type_unsigned.loc29_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc29_22.3: type = converted %int.make_type_unsigned.loc29_22, %.loc29_22.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc29_30.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_unsigned.loc29_30: init type = call constants.%UInt(%.loc29_30.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc29_30.2: type = value_of_initializer %int.make_type_unsigned.loc29_30 [template = constants.%u64] -// CHECK:STDOUT: %.loc29_30.3: type = converted %int.make_type_unsigned.loc29_30, %.loc29_30.2 [template = constants.%u64] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned.loc29_22: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc29_22.1: type = value_of_initializer %int.make_type_unsigned.loc29_22 [template = constants.%u32] +// CHECK:STDOUT: %.loc29_22.2: type = converted %int.make_type_unsigned.loc29_22, %.loc29_22.1 [template = constants.%u32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc29_30: init type = call constants.%UInt(%int_64) [template = constants.%u64] +// CHECK:STDOUT: %.loc29_30.1: type = value_of_initializer %int.make_type_unsigned.loc29_30 [template = constants.%u64] +// CHECK:STDOUT: %.loc29_30.2: type = converted %int.make_type_unsigned.loc29_30, %.loc29_30.1 [template = constants.%u64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 @@ -714,10 +714,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc30_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.3: type = converted %int.make_type_signed, %.loc30_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_signed, %.loc30_25.1 [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc30_44.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -733,10 +733,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc31_27.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc31_27.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc31_27.3: type = converted %int.make_type_unsigned, %.loc31_27.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc31_27.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc31_27.2: type = converted %int.make_type_unsigned, %.loc31_27.1 [template = constants.%u32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc31_46.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -793,42 +793,42 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- identity.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Int32ToInt32.type: type = fn_type @Int32ToInt32 [template] // CHECK:STDOUT: %Int32ToInt32: %Int32ToInt32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %IntLiteralToIntLiteral.type: type = fn_type @IntLiteralToIntLiteral [template] // CHECK:STDOUT: %IntLiteralToIntLiteral: %IntLiteralToIntLiteral.type = struct_value () [template] // CHECK:STDOUT: %Int32ToIntLiteral.type: type = fn_type @Int32ToIntLiteral [template] // CHECK:STDOUT: %Int32ToIntLiteral: %Int32ToIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -892,18 +892,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.3: type = converted %int.make_type_signed.loc5, %.loc5_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_signed.loc5, %.loc5_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.4 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -925,75 +925,75 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt32.ref.loc5: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_27.3: = bound_method %.loc5_27.1, %.loc5_27.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_27.4: = specific_function %.loc5_27.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %.loc5_27.4(%.loc5_27.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_27.5: %i32 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_27.6: %i32 = converted %.loc5_27.1, %.loc5_27.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_28, %.loc5_29.1 [template = constants.%.29] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0, %impl.elem0.loc5 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %Convert.specific_fn.loc5(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_27.1: %i32 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_27.2: %i32 = converted %int_0, %.loc5_27.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.2) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_28, %.loc5_29.1 [template = constants.%int_0.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc5_29.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc6: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] -// CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_27.3: = bound_method %.loc6_27.1, %.loc6_27.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_27.4: = specific_function %.loc6_27.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %.loc6_27.4(%.loc6_27.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_27.5: %i32 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_27.6: %i32 = converted %.loc6_27.1, %.loc6_27.5 [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_38 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_38, %.loc6_39.1 [template = constants.%.33] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_27.1: %i32 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_27.2: %i32 = converted %int_2147483647.loc6, %.loc6_27.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_38 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_38, %.loc6_39.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc6_39.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc7: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref.loc7: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc7_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_44.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_44.3: = bound_method %.loc7_44.1, %.loc7_44.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_44.4: = specific_function %.loc7_44.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc7_44: init %i32 = call %.loc7_44.4(%.loc7_44.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_44.5: %i32 = value_of_initializer %int.convert_checked.loc7_44 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_44.6: %i32 = converted %.loc7_44.1, %.loc7_44.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc7: init %i32 = call %NegateI32.ref.loc7(%.loc7_44.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_58.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_55.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_55.2: %i32 = converted %int.snegate.loc7, %.loc7_55.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_58.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_58.3: = bound_method %.loc7_58.1, %.loc7_58.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_58.4: = specific_function %.loc7_58.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %.loc7_58.4(%.loc7_58.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc7_58.5: %i32 = value_of_initializer %int.convert_checked.loc7_58 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_58.6: %i32 = converted %.loc7_58.1, %.loc7_58.5 [template = constants.%.38] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_55.2, %.loc7_58.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%.39] -// CHECK:STDOUT: %.loc7_59.2: %i32 = converted %int.ssub, %.loc7_59.1 [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc7_60: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_59.2) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_60 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_60, %.loc7_61.1 [template = constants.%.39] +// CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc7_44: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_44: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_44 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_44: = specific_function %Convert.bound.loc7_44, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_44: init %i32 = call %Convert.specific_fn.loc7_44(%int_2147483647.loc7) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_44.1: %i32 = value_of_initializer %int.convert_checked.loc7_44 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_44.2: %i32 = converted %int_2147483647.loc7, %.loc7_44.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc7: init %i32 = call %NegateI32.ref.loc7(%.loc7_44.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc7_55.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc7_55.2: %i32 = converted %int.snegate.loc7, %.loc7_55.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc7_58: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_58: = bound_method %int_1.loc7, %impl.elem0.loc7_58 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc7_58: = specific_function %Convert.bound.loc7_58, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %Convert.specific_fn.loc7_58(%int_1.loc7) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_58.1: %i32 = value_of_initializer %int.convert_checked.loc7_58 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_58.2: %i32 = converted %int_1.loc7, %.loc7_58.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_55.2, %.loc7_58.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_59.2: %i32 = converted %int.ssub, %.loc7_59.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int.convert_checked.loc7_60: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_59.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_60 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_60, %.loc7_61.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc7_61.2 // CHECK:STDOUT: %IntLiteralToIntLiteral.ref: %IntLiteralToIntLiteral.type = name_ref IntLiteralToIntLiteral, imports.%import_ref.9 [template = constants.%IntLiteralToIntLiteral] // CHECK:STDOUT: %Int32ToIntLiteral.ref: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc8: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc8_74.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc8_74.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_74.3: = bound_method %.loc8_74.1, %.loc8_74.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_74.4: = specific_function %.loc8_74.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc8_74: init %i32 = call %.loc8_74.4(%.loc8_74.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc8_74.5: %i32 = value_of_initializer %int.convert_checked.loc8_74 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_74.6: %i32 = converted %.loc8_74.1, %.loc8_74.5 [template = constants.%.38] -// CHECK:STDOUT: %int.snegate.loc8: init %i32 = call %NegateI32.ref.loc8(%.loc8_74.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc8_75.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%.40] -// CHECK:STDOUT: %.loc8_75.2: %i32 = converted %int.snegate.loc8, %.loc8_75.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc8_76: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_75.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_76 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_76.2: Core.IntLiteral = converted %int.convert_checked.loc8_76, %.loc8_76.1 [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc8_77: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_76.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_77 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_77, %.loc8_78.1 [template = constants.%.41] +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc8_74: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_74.1: %i32 = value_of_initializer %int.convert_checked.loc8_74 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_74.2: %i32 = converted %int_1.loc8, %.loc8_74.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc8: init %i32 = call %NegateI32.ref.loc8(%.loc8_74.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc8_75.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc8_75.2: %i32 = converted %int.snegate.loc8, %.loc8_75.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc8_76: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_75.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc8_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_76 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc8_76.2: Core.IntLiteral = converted %int.convert_checked.loc8_76, %.loc8_76.1 [template = constants.%int_-1.2] +// CHECK:STDOUT: %int.convert_checked.loc8_77: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_76.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_77 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_77, %.loc8_78.1 [template = constants.%int_-1.2] // CHECK:STDOUT: %d: Core.IntLiteral = bind_name d, %.loc8_78.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1001,22 +1001,22 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- same_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt32.type: type = fn_type @Uint32ToInt32 [template] @@ -1083,14 +1083,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc5_10.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_unsigned, %.loc5_10.2 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.3: type = converted %int.make_type_signed, %.loc6_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc5) [template = constants.%u32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_unsigned, %.loc5_10.1 [template = constants.%u32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_20.2: type = converted %int.make_type_signed, %.loc6_20.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked"; @@ -1100,32 +1100,32 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc5_30.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_30.3: = bound_method %.loc5_30.1, %.loc5_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.4: = specific_function %.loc5_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %.loc5_30.4(%.loc5_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_30.5: %i32 = value_of_initializer %int.convert_checked.loc5_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_30.6: %i32 = converted %.loc5_30.1, %.loc5_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_41: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_41 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_41, %.loc5_42.1 [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc5: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_2147483647.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %Convert.specific_fn.loc5(%int_2147483647.loc5) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc5_30.1: %i32 = value_of_initializer %int.convert_checked.loc5_30 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc5_30.2: %i32 = converted %int_2147483647.loc5, %.loc5_30.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc5_41: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.2) [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_41 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_41, %.loc5_42.1 [template = constants.%int_2147483647.3] // CHECK:STDOUT: %max: %u32 = bind_name max, %.loc5_42.2 // CHECK:STDOUT: %Uint32ToInt32.ref: %Uint32ToInt32.type = name_ref Uint32ToInt32, imports.%import_ref.7 [template = constants.%Uint32ToInt32] // CHECK:STDOUT: %Int32ToUint32.ref.loc6: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc6_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_54.3: = bound_method %.loc6_54.1, %.loc6_54.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_54.4: = specific_function %.loc6_54.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %.loc6_54.4(%.loc6_54.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_54.5: %i32 = value_of_initializer %int.convert_checked.loc6_54 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_54.6: %i32 = converted %.loc6_54.1, %.loc6_54.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_65: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_65.1: %u32 = value_of_initializer %int.convert_checked.loc6_65 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_65.2: %u32 = converted %int.convert_checked.loc6_65, %.loc6_65.1 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_66: init %i32 = call %Uint32ToInt32.ref(%.loc6_65.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_66 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_66, %.loc6_67.1 [template = constants.%.29] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_54.1: %i32 = value_of_initializer %int.convert_checked.loc6_54 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_54.2: %i32 = converted %int_2147483647.loc6, %.loc6_54.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc6_65: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.2) [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc6_65.1: %u32 = value_of_initializer %int.convert_checked.loc6_65 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc6_65.2: %u32 = converted %int.convert_checked.loc6_65, %.loc6_65.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %int.convert_checked.loc6_66: init %i32 = call %Uint32ToInt32.ref(%.loc6_65.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_66 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_66, %.loc6_67.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %max_roundtrip: %i32 = bind_name max_roundtrip, %.loc6_67.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1133,62 +1133,62 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- truncate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: %u16 = int_value 0 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 65535 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 65535 [template] -// CHECK:STDOUT: %.36: %u16 = int_value 65535 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.3: %u16 = int_value 0 [template] +// CHECK:STDOUT: %int_65535.1: Core.IntLiteral = int_value 65535 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65535.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_65535.2: %i32 = int_value 65535 [template] +// CHECK:STDOUT: %int_65535.3: %u16 = int_value 65535 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 32767 [template] -// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.41: %i16 = int_value 32767 [template] +// CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %int_32767.3: %i16 = int_value 32767 [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.46: %i32 = int_value -32768 [template] -// CHECK:STDOUT: %.47: %i16 = int_value -32768 [template] +// CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %int_-32768.1: %i32 = int_value -32768 [template] +// CHECK:STDOUT: %int_-32768.2: %i16 = int_value -32768 [template] // CHECK:STDOUT: %Uint32ToUint16.type: type = fn_type @Uint32ToUint16 [template] // CHECK:STDOUT: %Uint32ToUint16: %Uint32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %.48: %u32 = int_value 0 [template] -// CHECK:STDOUT: %.49: %u32 = int_value 65535 [template] +// CHECK:STDOUT: %int_0.4: %u32 = int_value 0 [template] +// CHECK:STDOUT: %int_65535.4: %u32 = int_value 65535 [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] // CHECK:STDOUT: %Uint32ToInt16: %Uint32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.50: %i16 = int_value 0 [template] -// CHECK:STDOUT: %.51: %u32 = int_value 32767 [template] +// CHECK:STDOUT: %int_0.5: %i16 = int_value 0 [template] +// CHECK:STDOUT: %int_32767.4: %u32 = int_value 32767 [template] // CHECK:STDOUT: %IntLiteralToInt16.type: type = fn_type @IntLiteralToInt16 [template] // CHECK:STDOUT: %IntLiteralToInt16: %IntLiteralToInt16.type = struct_value () [template] // CHECK:STDOUT: %Int32ToIntLiteral.type: type = fn_type @Int32ToIntLiteral [template] // CHECK:STDOUT: %Int32ToIntLiteral: %Int32ToIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.52: Core.IntLiteral = int_value -32768 [template] +// CHECK:STDOUT: %int_-32768.3: Core.IntLiteral = int_value -32768 [template] // CHECK:STDOUT: %IntLiteralToUint16.type: type = fn_type @IntLiteralToUint16 [template] // CHECK:STDOUT: %IntLiteralToUint16: %IntLiteralToUint16.type = struct_value () [template] // CHECK:STDOUT: } @@ -1263,54 +1263,54 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_8.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc5_8.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u16] -// CHECK:STDOUT: %.loc5_8.3: type = converted %int.make_type_unsigned.loc5, %.loc5_8.2 [template = constants.%u16] -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%.loc6_8.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u16] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_unsigned.loc6, %.loc6_8.2 [template = constants.%u16] -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i16] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i16] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc11: init type = call constants.%UInt(%.loc11_8.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_unsigned.loc11 [template = constants.%u16] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_unsigned.loc11, %.loc11_8.2 [template = constants.%u16] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%UInt(%.loc12_8.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_unsigned.loc12 [template = constants.%u16] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_unsigned.loc12, %.loc12_8.2 [template = constants.%u16] -// CHECK:STDOUT: %.loc14_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_8.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc14_8.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i16] -// CHECK:STDOUT: %.loc14_8.3: type = converted %int.make_type_signed.loc14, %.loc14_8.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_18.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc17_18.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i16] -// CHECK:STDOUT: %.loc17_18.3: type = converted %int.make_type_signed.loc17, %.loc17_18.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc18_18.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_18.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc18_18.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i16] -// CHECK:STDOUT: %.loc18_18.3: type = converted %int.make_type_signed.loc18, %.loc18_18.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc20_18.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc20: init type = call constants.%UInt(%.loc20_18.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc20_18.2: type = value_of_initializer %int.make_type_unsigned.loc20 [template = constants.%u16] -// CHECK:STDOUT: %.loc20_18.3: type = converted %int.make_type_unsigned.loc20, %.loc20_18.2 [template = constants.%u16] -// CHECK:STDOUT: %.loc21_18.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc21: init type = call constants.%UInt(%.loc21_18.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc21_18.2: type = value_of_initializer %int.make_type_unsigned.loc21 [template = constants.%u16] -// CHECK:STDOUT: %.loc21_18.3: type = converted %int.make_type_unsigned.loc21, %.loc21_18.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc5: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_16.loc5) [template = constants.%u16] +// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u16] +// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc6: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_16.loc6) [template = constants.%u16] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u16] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc8: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_16.loc8) [template = constants.%i16] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i16] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc9: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_16.loc9) [template = constants.%i16] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i16] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc11: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc11: init type = call constants.%UInt(%int_16.loc11) [template = constants.%u16] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_unsigned.loc11 [template = constants.%u16] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_unsigned.loc11, %.loc11_8.1 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc12: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%UInt(%int_16.loc12) [template = constants.%u16] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_unsigned.loc12 [template = constants.%u16] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_unsigned.loc12, %.loc12_8.1 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc14: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_16.loc14) [template = constants.%i16] +// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i16] +// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc15: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_16.loc15) [template = constants.%i16] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc17: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_16.loc17) [template = constants.%i16] +// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i16] +// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc18: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_16.loc18) [template = constants.%i16] +// CHECK:STDOUT: %.loc18_18.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i16] +// CHECK:STDOUT: %.loc18_18.2: type = converted %int.make_type_signed.loc18, %.loc18_18.1 [template = constants.%i16] +// CHECK:STDOUT: %int_16.loc20: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc20: init type = call constants.%UInt(%int_16.loc20) [template = constants.%u16] +// CHECK:STDOUT: %.loc20_18.1: type = value_of_initializer %int.make_type_unsigned.loc20 [template = constants.%u16] +// CHECK:STDOUT: %.loc20_18.2: type = converted %int.make_type_unsigned.loc20, %.loc20_18.1 [template = constants.%u16] +// CHECK:STDOUT: %int_16.loc21: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned.loc21: init type = call constants.%UInt(%int_16.loc21) [template = constants.%u16] +// CHECK:STDOUT: %.loc21_18.1: type = value_of_initializer %int.make_type_unsigned.loc21 [template = constants.%u16] +// CHECK:STDOUT: %.loc21_18.2: type = converted %int.make_type_unsigned.loc21, %.loc21_18.1 [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked"; @@ -1334,188 +1334,188 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref.loc5: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] -// CHECK:STDOUT: %.loc5_28.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%.31] +// CHECK:STDOUT: %int_0.loc5: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Convert.specific_fn.loc5(%int_0.loc5) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_28.1: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_28.2: %i32 = converted %int_0.loc5, %.loc5_28.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%int_0.3] // CHECK:STDOUT: %a: %u16 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint16.ref.loc6: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] -// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] -// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc6_34: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_34 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_34, %.loc6_35.1 [template = constants.%.36] +// CHECK:STDOUT: %int_65535.loc6: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_65535.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6(%int_65535.loc6) [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc6_28.1: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc6_28.2: %i32 = converted %int_65535.loc6, %.loc6_28.1 [template = constants.%int_65535.2] +// CHECK:STDOUT: %int.convert_checked.loc6_34: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.2) [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_34 [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_34, %.loc6_35.1 [template = constants.%int_65535.3] // CHECK:STDOUT: %b: %u16 = bind_name b, %.loc6_35.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc8: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] -// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_27.3: = bound_method %.loc8_27.1, %.loc8_27.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_27.4: = specific_function %.loc8_27.3, @Convert.2(constants.%.2) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %.loc8_27.4(%.loc8_27.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc8_27.5: %i32 = value_of_initializer %int.convert_checked.loc8_27 [template = constants.%.40] -// CHECK:STDOUT: %.loc8_27.6: %i32 = converted %.loc8_27.1, %.loc8_27.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.6) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_33, %.loc8_34.1 [template = constants.%.41] +// CHECK:STDOUT: %int_32767.loc8: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_32767.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %Convert.specific_fn.loc8(%int_32767.loc8) [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.convert_checked.loc8_27 [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_32767.loc8, %.loc8_27.1 [template = constants.%int_32767.2] +// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.2) [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_33, %.loc8_34.1 [template = constants.%int_32767.3] // CHECK:STDOUT: %c: %i16 = bind_name c, %.loc8_34.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc9: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref.loc9: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc9_37.1: Core.IntLiteral = int_value 32768 [template = constants.%.42] -// CHECK:STDOUT: %.loc9_37.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_37.3: = bound_method %.loc9_37.1, %.loc9_37.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc9_37.4: = specific_function %.loc9_37.3, @Convert.2(constants.%.2) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i32 = call %.loc9_37.4(%.loc9_37.1) [template = constants.%.45] -// CHECK:STDOUT: %.loc9_37.5: %i32 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.45] -// CHECK:STDOUT: %.loc9_37.6: %i32 = converted %.loc9_37.1, %.loc9_37.5 [template = constants.%.45] -// CHECK:STDOUT: %int.snegate.loc9: init %i32 = call %NegateI32.ref.loc9(%.loc9_37.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%.46] -// CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int.snegate.loc9, %.loc9_43.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_43.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%.47] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%.47] +// CHECK:STDOUT: %int_32768.loc9: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_32768.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i32 = call %Convert.specific_fn.loc9(%int_32768.loc9) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_37.1: %i32 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_37.2: %i32 = converted %int_32768.loc9, %.loc9_37.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %int.snegate.loc9: init %i32 = call %NegateI32.ref.loc9(%.loc9_37.2) [template = constants.%int_-32768.1] +// CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%int_-32768.1] +// CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int.snegate.loc9, %.loc9_43.1 [template = constants.%int_-32768.1] +// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_43.2) [template = constants.%int_-32768.2] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%int_-32768.2] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%int_-32768.2] // CHECK:STDOUT: %d: %i16 = bind_name d, %.loc9_45.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc11: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc11_43.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_43.3: = bound_method %.loc11_43.1, %.loc11_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_43.4: = specific_function %.loc11_43.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %.loc11_43.4(%.loc11_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_43.5: %i32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_43.6: %i32 = converted %.loc11_43.1, %.loc11_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_44: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.6) [template = constants.%.48] -// CHECK:STDOUT: %.loc11_44.1: %u32 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%.48] -// CHECK:STDOUT: %.loc11_44.2: %u32 = converted %int.convert_checked.loc11_44, %.loc11_44.1 [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc11_45: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_44.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_45, %.loc11_46.1 [template = constants.%.31] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0.loc11, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %Convert.specific_fn.loc11(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_43.1: %i32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_43.2: %i32 = converted %int_0.loc11, %.loc11_43.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc11_44: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.2) [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc11_44.1: %u32 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc11_44.2: %u32 = converted %int.convert_checked.loc11_44, %.loc11_44.1 [template = constants.%int_0.4] +// CHECK:STDOUT: %int.convert_checked.loc11_45: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_44.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_45, %.loc11_46.1 [template = constants.%int_0.3] // CHECK:STDOUT: %e: %u16 = bind_name e, %.loc11_46.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc12: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc12_49: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.6) [template = constants.%.49] -// CHECK:STDOUT: %.loc12_49.1: %u32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%.49] -// CHECK:STDOUT: %.loc12_49.2: %u32 = converted %int.convert_checked.loc12_49, %.loc12_49.1 [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc12_50: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_49.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_50 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_50, %.loc12_51.1 [template = constants.%.36] +// CHECK:STDOUT: %int_65535.loc12: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_65535.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12(%int_65535.loc12) [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc12_43.1: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc12_43.2: %i32 = converted %int_65535.loc12, %.loc12_43.1 [template = constants.%int_65535.2] +// CHECK:STDOUT: %int.convert_checked.loc12_49: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.2) [template = constants.%int_65535.4] +// CHECK:STDOUT: %.loc12_49.1: %u32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%int_65535.4] +// CHECK:STDOUT: %.loc12_49.2: %u32 = converted %int.convert_checked.loc12_49, %.loc12_49.1 [template = constants.%int_65535.4] +// CHECK:STDOUT: %int.convert_checked.loc12_50: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_49.2) [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_50 [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_50, %.loc12_51.1 [template = constants.%int_65535.3] // CHECK:STDOUT: %f: %u16 = bind_name f, %.loc12_51.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc14: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc14: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc14_43: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.6) [template = constants.%.48] -// CHECK:STDOUT: %.loc14_43.1: %u32 = value_of_initializer %int.convert_checked.loc14_43 [template = constants.%.48] -// CHECK:STDOUT: %.loc14_43.2: %u32 = converted %int.convert_checked.loc14_43, %.loc14_43.1 [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc14_44: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_43.2) [template = constants.%.50] -// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_44 [template = constants.%.50] -// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_44, %.loc14_45.1 [template = constants.%.50] +// CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_0.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %Convert.specific_fn.loc14(%int_0.loc14) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int_0.loc14, %.loc14_42.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc14_43: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.2) [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc14_43.1: %u32 = value_of_initializer %int.convert_checked.loc14_43 [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc14_43.2: %u32 = converted %int.convert_checked.loc14_43, %.loc14_43.1 [template = constants.%int_0.4] +// CHECK:STDOUT: %int.convert_checked.loc14_44: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_43.2) [template = constants.%int_0.5] +// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_44 [template = constants.%int_0.5] +// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_44, %.loc14_45.1 [template = constants.%int_0.5] // CHECK:STDOUT: %g: %i16 = bind_name g, %.loc14_45.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc15: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc15_42.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_42.3: = bound_method %.loc15_42.1, %.loc15_42.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_42.4: = specific_function %.loc15_42.3, @Convert.2(constants.%.2) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %.loc15_42.4(%.loc15_42.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc15_42.5: %i32 = value_of_initializer %int.convert_checked.loc15_42 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_42.6: %i32 = converted %.loc15_42.1, %.loc15_42.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc15_48: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.6) [template = constants.%.51] -// CHECK:STDOUT: %.loc15_48.1: %u32 = value_of_initializer %int.convert_checked.loc15_48 [template = constants.%.51] -// CHECK:STDOUT: %.loc15_48.2: %u32 = converted %int.convert_checked.loc15_48, %.loc15_48.1 [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked.loc15_49: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_48.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_49 [template = constants.%.41] -// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_49, %.loc15_50.1 [template = constants.%.41] +// CHECK:STDOUT: %int_32767.loc15: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_32767.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %Convert.specific_fn.loc15(%int_32767.loc15) [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc15_42.1: %i32 = value_of_initializer %int.convert_checked.loc15_42 [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc15_42.2: %i32 = converted %int_32767.loc15, %.loc15_42.1 [template = constants.%int_32767.2] +// CHECK:STDOUT: %int.convert_checked.loc15_48: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.2) [template = constants.%int_32767.4] +// CHECK:STDOUT: %.loc15_48.1: %u32 = value_of_initializer %int.convert_checked.loc15_48 [template = constants.%int_32767.4] +// CHECK:STDOUT: %.loc15_48.2: %u32 = converted %int.convert_checked.loc15_48, %.loc15_48.1 [template = constants.%int_32767.4] +// CHECK:STDOUT: %int.convert_checked.loc15_49: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_48.2) [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_49 [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_49, %.loc15_50.1 [template = constants.%int_32767.3] // CHECK:STDOUT: %h: %i16 = bind_name h, %.loc15_50.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc17: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc17: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc17: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc17_70.1: Core.IntLiteral = int_value 32768 [template = constants.%.42] -// CHECK:STDOUT: %.loc17_70.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_70.3: = bound_method %.loc17_70.1, %.loc17_70.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc17_70.4: = specific_function %.loc17_70.3, @Convert.2(constants.%.2) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc17_70: init %i32 = call %.loc17_70.4(%.loc17_70.1) [template = constants.%.45] -// CHECK:STDOUT: %.loc17_70.5: %i32 = value_of_initializer %int.convert_checked.loc17_70 [template = constants.%.45] -// CHECK:STDOUT: %.loc17_70.6: %i32 = converted %.loc17_70.1, %.loc17_70.5 [template = constants.%.45] -// CHECK:STDOUT: %int.snegate.loc17: init %i32 = call %NegateI32.ref.loc17(%.loc17_70.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc17_76.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%.46] -// CHECK:STDOUT: %.loc17_76.2: %i32 = converted %int.snegate.loc17, %.loc17_76.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc17_77: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_76.2) [template = constants.%.52] -// CHECK:STDOUT: %.loc17_77.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_77 [template = constants.%.52] -// CHECK:STDOUT: %.loc17_77.2: Core.IntLiteral = converted %int.convert_checked.loc17_77, %.loc17_77.1 [template = constants.%.52] -// CHECK:STDOUT: %int.convert_checked.loc17_78: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_77.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_78 [template = constants.%.47] -// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_78, %.loc17_79.1 [template = constants.%.47] +// CHECK:STDOUT: %int_32768.loc17: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_32768.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc17_70: init %i32 = call %Convert.specific_fn.loc17(%int_32768.loc17) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc17_70.1: %i32 = value_of_initializer %int.convert_checked.loc17_70 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc17_70.2: %i32 = converted %int_32768.loc17, %.loc17_70.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %int.snegate.loc17: init %i32 = call %NegateI32.ref.loc17(%.loc17_70.2) [template = constants.%int_-32768.1] +// CHECK:STDOUT: %.loc17_76.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%int_-32768.1] +// CHECK:STDOUT: %.loc17_76.2: %i32 = converted %int.snegate.loc17, %.loc17_76.1 [template = constants.%int_-32768.1] +// CHECK:STDOUT: %int.convert_checked.loc17_77: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_76.2) [template = constants.%int_-32768.3] +// CHECK:STDOUT: %.loc17_77.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_77 [template = constants.%int_-32768.3] +// CHECK:STDOUT: %.loc17_77.2: Core.IntLiteral = converted %int.convert_checked.loc17_77, %.loc17_77.1 [template = constants.%int_-32768.3] +// CHECK:STDOUT: %int.convert_checked.loc17_78: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_77.2) [template = constants.%int_-32768.2] +// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_78 [template = constants.%int_-32768.2] +// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_78, %.loc17_79.1 [template = constants.%int_-32768.2] // CHECK:STDOUT: %lit_i16_min: %i16 = bind_name lit_i16_min, %.loc17_79.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc18: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc18: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] -// CHECK:STDOUT: %.loc18_60.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_60.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_60.3: = bound_method %.loc18_60.1, %.loc18_60.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_60.4: = specific_function %.loc18_60.3, @Convert.2(constants.%.2) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %.loc18_60.4(%.loc18_60.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc18_60.5: %i32 = value_of_initializer %int.convert_checked.loc18_60 [template = constants.%.40] -// CHECK:STDOUT: %.loc18_60.6: %i32 = converted %.loc18_60.1, %.loc18_60.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc18_66: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc18_66.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_66 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_66.2: Core.IntLiteral = converted %int.convert_checked.loc18_66, %.loc18_66.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc18_67: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_66.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_67 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_67, %.loc18_68.1 [template = constants.%.41] +// CHECK:STDOUT: %int_32767.loc18: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_32767.loc18, %impl.elem0.loc18 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %Convert.specific_fn.loc18(%int_32767.loc18) [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc18_60.1: %i32 = value_of_initializer %int.convert_checked.loc18_60 [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc18_60.2: %i32 = converted %int_32767.loc18, %.loc18_60.1 [template = constants.%int_32767.2] +// CHECK:STDOUT: %int.convert_checked.loc18_66: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.2) [template = constants.%int_32767.1] +// CHECK:STDOUT: %.loc18_66.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_66 [template = constants.%int_32767.1] +// CHECK:STDOUT: %.loc18_66.2: Core.IntLiteral = converted %int.convert_checked.loc18_66, %.loc18_66.1 [template = constants.%int_32767.1] +// CHECK:STDOUT: %int.convert_checked.loc18_67: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_66.2) [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_67 [template = constants.%int_32767.3] +// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_67, %.loc18_68.1 [template = constants.%int_32767.3] // CHECK:STDOUT: %lit_i16_max: %i16 = bind_name lit_i16_max, %.loc18_68.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc20: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc20: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] -// CHECK:STDOUT: %.loc20_61.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_61.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_61.3: = bound_method %.loc20_61.1, %.loc20_61.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc20_61.4: = specific_function %.loc20_61.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %.loc20_61.4(%.loc20_61.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc20_61.5: %i32 = value_of_initializer %int.convert_checked.loc20_61 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_61.6: %i32 = converted %.loc20_61.1, %.loc20_61.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc20_62: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc20(%.loc20_61.6) [template = constants.%.3] -// CHECK:STDOUT: %.loc20_62.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc20_62 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_62.2: Core.IntLiteral = converted %int.convert_checked.loc20_62, %.loc20_62.1 [template = constants.%.3] -// CHECK:STDOUT: %int.convert_checked.loc20_63: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_62.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_63 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_63, %.loc20_64.1 [template = constants.%.31] +// CHECK:STDOUT: %int_0.loc20: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc20: = bound_method %int_0.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc20: = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %Convert.specific_fn.loc20(%int_0.loc20) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc20_61.1: %i32 = value_of_initializer %int.convert_checked.loc20_61 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc20_61.2: %i32 = converted %int_0.loc20, %.loc20_61.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc20_62: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc20(%.loc20_61.2) [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc20_62.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc20_62 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc20_62.2: Core.IntLiteral = converted %int.convert_checked.loc20_62, %.loc20_62.1 [template = constants.%int_0.1] +// CHECK:STDOUT: %int.convert_checked.loc20_63: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_62.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_63 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_63, %.loc20_64.1 [template = constants.%int_0.3] // CHECK:STDOUT: %lit_u16_min: %u16 = bind_name lit_u16_min, %.loc20_64.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc21: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc21: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] -// CHECK:STDOUT: %.loc21_61.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] -// CHECK:STDOUT: %.loc21_61.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_61.3: = bound_method %.loc21_61.1, %.loc21_61.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_61.4: = specific_function %.loc21_61.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %.loc21_61.4(%.loc21_61.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc21_61.5: %i32 = value_of_initializer %int.convert_checked.loc21_61 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_61.6: %i32 = converted %.loc21_61.1, %.loc21_61.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc21_67: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc21_67.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_67 [template = constants.%.32] -// CHECK:STDOUT: %.loc21_67.2: Core.IntLiteral = converted %int.convert_checked.loc21_67, %.loc21_67.1 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc21_68: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_67.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_68 [template = constants.%.36] -// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_68, %.loc21_69.1 [template = constants.%.36] +// CHECK:STDOUT: %int_65535.loc21: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_65535.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %Convert.specific_fn.loc21(%int_65535.loc21) [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc21_61.1: %i32 = value_of_initializer %int.convert_checked.loc21_61 [template = constants.%int_65535.2] +// CHECK:STDOUT: %.loc21_61.2: %i32 = converted %int_65535.loc21, %.loc21_61.1 [template = constants.%int_65535.2] +// CHECK:STDOUT: %int.convert_checked.loc21_67: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.2) [template = constants.%int_65535.1] +// CHECK:STDOUT: %.loc21_67.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_67 [template = constants.%int_65535.1] +// CHECK:STDOUT: %.loc21_67.2: Core.IntLiteral = converted %int.convert_checked.loc21_67, %.loc21_67.1 [template = constants.%int_65535.1] +// CHECK:STDOUT: %int.convert_checked.loc21_68: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_67.2) [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_68 [template = constants.%int_65535.3] +// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_68, %.loc21_69.1 [template = constants.%int_65535.3] // CHECK:STDOUT: %lit_u16_max: %u16 = bind_name lit_u16_max, %.loc21_69.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1523,49 +1523,49 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- zero_extend.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %Uint32ToUint64.type: type = fn_type @Uint32ToUint64 [template] // CHECK:STDOUT: %Uint32ToUint64: %Uint32ToUint64.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: %u32 = int_value 0 [template] -// CHECK:STDOUT: %.32: %u64 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.3: %u32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.4: %u64 = int_value 0 [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.37: %u32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.38: %u32 = int_value 4294967294 [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.43: %u32 = int_value 1 [template] -// CHECK:STDOUT: %.44: %u32 = int_value 4294967295 [template] -// CHECK:STDOUT: %.45: %u64 = int_value 4294967295 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_4294967294: %u32 = int_value 4294967294 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.3: %u32 = int_value 1 [template] +// CHECK:STDOUT: %int_4294967295.1: %u32 = int_value 4294967295 [template] +// CHECK:STDOUT: %int_4294967295.2: %u64 = int_value 4294967295 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %Uint32ToInt64.type: type = fn_type @Uint32ToInt64 [template] // CHECK:STDOUT: %Uint32ToInt64: %Uint32ToInt64.type = struct_value () [template] -// CHECK:STDOUT: %.46: %i64 = int_value 0 [template] -// CHECK:STDOUT: %.47: %i64 = int_value 4294967295 [template] +// CHECK:STDOUT: %int_0.5: %i64 = int_value 0 [template] +// CHECK:STDOUT: %int_4294967295.3: %i64 = int_value 4294967295 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1630,22 +1630,22 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_8.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.3: type = converted %int.make_type_unsigned.loc5, %.loc5_8.2 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%.loc6_8.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_unsigned.loc6, %.loc6_8.2 [template = constants.%u64] -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i64] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i64] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i64] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64.loc5) [template = constants.%u64] +// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] +// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_64.loc6) [template = constants.%u64] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_64.loc11) [template = constants.%i64] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i64] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc12: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_64.loc12) [template = constants.%i64] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i64] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint64(%a.param_patt: %u32) -> %u64 = "int.convert_checked"; @@ -1660,127 +1660,127 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Uint32ToUint64.ref.loc5: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc5_43.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_43.3: = bound_method %.loc5_43.1, %.loc5_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc5_43.4: = specific_function %.loc5_43.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %.loc5_43.4(%.loc5_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_43.5: %i32 = value_of_initializer %int.convert_checked.loc5_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_43.6: %i32 = converted %.loc5_43.1, %.loc5_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_44: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_44.1: %u32 = value_of_initializer %int.convert_checked.loc5_44 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_44.2: %u32 = converted %int.convert_checked.loc5_44, %.loc5_44.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc5_45: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_44.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_45 [template = constants.%.32] -// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_45, %.loc5_46.1 [template = constants.%.32] +// CHECK:STDOUT: %int_0.loc5: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %Convert.specific_fn.loc5(%int_0.loc5) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_43.1: %i32 = value_of_initializer %int.convert_checked.loc5_43 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_43.2: %i32 = converted %int_0.loc5, %.loc5_43.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc5_44: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_44.1: %u32 = value_of_initializer %int.convert_checked.loc5_44 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_44.2: %u32 = converted %int.convert_checked.loc5_44, %.loc5_44.1 [template = constants.%int_0.3] +// CHECK:STDOUT: %int.convert_checked.loc5_45: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_44.2) [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_45 [template = constants.%int_0.4] +// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_45, %.loc5_46.1 [template = constants.%int_0.4] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_46.2 // CHECK:STDOUT: %Uint32ToUint64.ref.loc6: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %AddU32.ref.loc7: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %AddU32.ref.loc8: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc8_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_26.3: = bound_method %.loc8_26.1, %.loc8_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_26.4: = specific_function %.loc8_26.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %.loc8_26.4(%.loc8_26.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc8_26.5: %i32 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_26.6: %i32 = converted %.loc8_26.1, %.loc8_26.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_37: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.6) [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc8_26: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_26: = bound_method %int_2147483647.loc8_26, %impl.elem0.loc8_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_26: = specific_function %Convert.bound.loc8_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %Convert.specific_fn.loc8_26(%int_2147483647.loc8_26) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_26.1: %i32 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_26.2: %i32 = converted %int_2147483647.loc8_26, %.loc8_26.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc8_37: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc8_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_54.3: = bound_method %.loc8_54.1, %.loc8_54.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_54.4: = specific_function %.loc8_54.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %.loc8_54.4(%.loc8_54.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc8_54.5: %i32 = value_of_initializer %int.convert_checked.loc8_54 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_54.6: %i32 = converted %.loc8_54.1, %.loc8_54.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_65: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_37.1: %u32 = value_of_initializer %int.convert_checked.loc8_37 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_37.2: %u32 = converted %int.convert_checked.loc8_37, %.loc8_37.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_65.1: %u32 = value_of_initializer %int.convert_checked.loc8_65 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_65.2: %u32 = converted %int.convert_checked.loc8_65, %.loc8_65.1 [template = constants.%.37] -// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_37.2, %.loc8_65.2) [template = constants.%.38] +// CHECK:STDOUT: %int_2147483647.loc8_54: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_54: = bound_method %int_2147483647.loc8_54, %impl.elem0.loc8_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_54: = specific_function %Convert.bound.loc8_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %Convert.specific_fn.loc8_54(%int_2147483647.loc8_54) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_54.1: %i32 = value_of_initializer %int.convert_checked.loc8_54 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_54.2: %i32 = converted %int_2147483647.loc8_54, %.loc8_54.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc8_65: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.2) [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc8_37.1: %u32 = value_of_initializer %int.convert_checked.loc8_37 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc8_37.2: %u32 = converted %int.convert_checked.loc8_37, %.loc8_37.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc8_65.1: %u32 = value_of_initializer %int.convert_checked.loc8_65 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc8_65.2: %u32 = converted %int.convert_checked.loc8_65, %.loc8_65.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_37.2, %.loc8_65.2) [template = constants.%int_4294967294] // CHECK:STDOUT: %Int32ToUint32.ref.loc9: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_19.3: = bound_method %.loc9_19.1, %.loc9_19.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc9_19.4: = specific_function %.loc9_19.3, @Convert.2(constants.%.2) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %.loc9_19.4(%.loc9_19.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9_19 [template = constants.%.42] -// CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_19.1, %.loc9_19.5 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc9_20: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc8_66.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_66.2: %u32 = converted %int.uadd.loc8, %.loc8_66.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_20.1: %u32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.43] -// CHECK:STDOUT: %.loc9_20.2: %u32 = converted %int.convert_checked.loc9_20, %.loc9_20.1 [template = constants.%.43] -// CHECK:STDOUT: %int.uadd.loc9: init %u32 = call %AddU32.ref.loc7(%.loc8_66.2, %.loc9_20.2) [template = constants.%.44] -// CHECK:STDOUT: %.loc9_21.1: %u32 = value_of_initializer %int.uadd.loc9 [template = constants.%.44] -// CHECK:STDOUT: %.loc9_21.2: %u32 = converted %int.uadd.loc9, %.loc9_21.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc9_22: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc9_21.2) [template = constants.%.45] -// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc9_22 [template = constants.%.45] -// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc9_22, %.loc9_23.1 [template = constants.%.45] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %Convert.specific_fn.loc9(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_19.1: %i32 = value_of_initializer %int.convert_checked.loc9_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_19.2: %i32 = converted %int_1.loc9, %.loc9_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.2) [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc8_66.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%int_4294967294] +// CHECK:STDOUT: %.loc8_66.2: %u32 = converted %int.uadd.loc8, %.loc8_66.1 [template = constants.%int_4294967294] +// CHECK:STDOUT: %.loc9_20.1: %u32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc9_20.2: %u32 = converted %int.convert_checked.loc9_20, %.loc9_20.1 [template = constants.%int_1.3] +// CHECK:STDOUT: %int.uadd.loc9: init %u32 = call %AddU32.ref.loc7(%.loc8_66.2, %.loc9_20.2) [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %.loc9_21.1: %u32 = value_of_initializer %int.uadd.loc9 [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %.loc9_21.2: %u32 = converted %int.uadd.loc9, %.loc9_21.1 [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %int.convert_checked.loc9_22: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc9_21.2) [template = constants.%int_4294967295.2] +// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc9_22 [template = constants.%int_4294967295.2] +// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc9_22, %.loc9_23.1 [template = constants.%int_4294967295.2] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc9_23.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc11: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc11_42.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_42.3: = bound_method %.loc11_42.1, %.loc11_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_42.4: = specific_function %.loc11_42.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %.loc11_42.4(%.loc11_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_42.5: %i32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_42.6: %i32 = converted %.loc11_42.1, %.loc11_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_43: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_43.1: %u32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_43.2: %u32 = converted %int.convert_checked.loc11_43, %.loc11_43.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_44: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_43.2) [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_44, %.loc11_45.1 [template = constants.%.46] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0.loc11, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %Convert.specific_fn.loc11(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_42.1: %i32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_42.2: %i32 = converted %int_0.loc11, %.loc11_42.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc11_43: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc11_43.1: %u32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc11_43.2: %u32 = converted %int.convert_checked.loc11_43, %.loc11_43.1 [template = constants.%int_0.3] +// CHECK:STDOUT: %int.convert_checked.loc11_44: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_43.2) [template = constants.%int_0.5] +// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%int_0.5] +// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_44, %.loc11_45.1 [template = constants.%int_0.5] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc11_45.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc12: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %AddU32.ref.loc13: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %AddU32.ref.loc14: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc14_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_26.1, %.loc14_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_26.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_26.5: %i32 = value_of_initializer %int.convert_checked.loc14_26 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_26.6: %i32 = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_37: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.6) [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc14_26: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_26: = bound_method %int_2147483647.loc14_26, %impl.elem0.loc14_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_26: = specific_function %Convert.bound.loc14_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %Convert.specific_fn.loc14_26(%int_2147483647.loc14_26) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_26.1: %i32 = value_of_initializer %int.convert_checked.loc14_26 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_26.2: %i32 = converted %int_2147483647.loc14_26, %.loc14_26.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc14_37: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc14_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_54.3: = bound_method %.loc14_54.1, %.loc14_54.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_54.4: = specific_function %.loc14_54.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %.loc14_54.4(%.loc14_54.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_54.5: %i32 = value_of_initializer %int.convert_checked.loc14_54 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_54.6: %i32 = converted %.loc14_54.1, %.loc14_54.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_65: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_37.1: %u32 = value_of_initializer %int.convert_checked.loc14_37 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_37.2: %u32 = converted %int.convert_checked.loc14_37, %.loc14_37.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_65.1: %u32 = value_of_initializer %int.convert_checked.loc14_65 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_65.2: %u32 = converted %int.convert_checked.loc14_65, %.loc14_65.1 [template = constants.%.37] -// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_37.2, %.loc14_65.2) [template = constants.%.38] +// CHECK:STDOUT: %int_2147483647.loc14_54: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc14_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_54: = bound_method %int_2147483647.loc14_54, %impl.elem0.loc14_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_54: = specific_function %Convert.bound.loc14_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %Convert.specific_fn.loc14_54(%int_2147483647.loc14_54) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_54.1: %i32 = value_of_initializer %int.convert_checked.loc14_54 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_54.2: %i32 = converted %int_2147483647.loc14_54, %.loc14_54.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc14_65: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.2) [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc14_37.1: %u32 = value_of_initializer %int.convert_checked.loc14_37 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc14_37.2: %u32 = converted %int.convert_checked.loc14_37, %.loc14_37.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc14_65.1: %u32 = value_of_initializer %int.convert_checked.loc14_65 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc14_65.2: %u32 = converted %int.convert_checked.loc14_65, %.loc14_65.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_37.2, %.loc14_65.2) [template = constants.%int_4294967294] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] -// CHECK:STDOUT: %.loc15_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_19.3: = bound_method %.loc15_19.1, %.loc15_19.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_19.4: = specific_function %.loc15_19.3, @Convert.2(constants.%.2) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %.loc15_19.4(%.loc15_19.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc15_19.5: %i32 = value_of_initializer %int.convert_checked.loc15_19 [template = constants.%.42] -// CHECK:STDOUT: %.loc15_19.6: %i32 = converted %.loc15_19.1, %.loc15_19.5 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc15_20: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc14_66.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_66.2: %u32 = converted %int.uadd.loc14, %.loc14_66.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_20.1: %u32 = value_of_initializer %int.convert_checked.loc15_20 [template = constants.%.43] -// CHECK:STDOUT: %.loc15_20.2: %u32 = converted %int.convert_checked.loc15_20, %.loc15_20.1 [template = constants.%.43] -// CHECK:STDOUT: %int.uadd.loc15: init %u32 = call %AddU32.ref.loc13(%.loc14_66.2, %.loc15_20.2) [template = constants.%.44] -// CHECK:STDOUT: %.loc15_21.1: %u32 = value_of_initializer %int.uadd.loc15 [template = constants.%.44] -// CHECK:STDOUT: %.loc15_21.2: %u32 = converted %int.uadd.loc15, %.loc15_21.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc15_22: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc15_21.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc15_22 [template = constants.%.47] -// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc15_22, %.loc15_23.1 [template = constants.%.47] +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_19.1: %i32 = value_of_initializer %int.convert_checked.loc15_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_19.2: %i32 = converted %int_1.loc15, %.loc15_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc15_20: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.2) [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc14_66.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%int_4294967294] +// CHECK:STDOUT: %.loc14_66.2: %u32 = converted %int.uadd.loc14, %.loc14_66.1 [template = constants.%int_4294967294] +// CHECK:STDOUT: %.loc15_20.1: %u32 = value_of_initializer %int.convert_checked.loc15_20 [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc15_20.2: %u32 = converted %int.convert_checked.loc15_20, %.loc15_20.1 [template = constants.%int_1.3] +// CHECK:STDOUT: %int.uadd.loc15: init %u32 = call %AddU32.ref.loc13(%.loc14_66.2, %.loc15_20.2) [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %.loc15_21.1: %u32 = value_of_initializer %int.uadd.loc15 [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %.loc15_21.2: %u32 = converted %int.uadd.loc15, %.loc15_21.1 [template = constants.%int_4294967295.1] +// CHECK:STDOUT: %int.convert_checked.loc15_22: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc15_21.2) [template = constants.%int_4294967295.3] +// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc15_22 [template = constants.%int_4294967295.3] +// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc15_22, %.loc15_23.1 [template = constants.%int_4294967295.3] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc15_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1788,45 +1788,45 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- sign_extend.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: %u64 = int_value 0 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.36: %u64 = int_value 2147483647 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.3: %u64 = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.3: %u64 = int_value 2147483647 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.37: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.42: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.43: %i64 = int_value -2147483648 [template] -// CHECK:STDOUT: %.44: %i64 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648.1: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_-2147483648.2: %i64 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_2147483647.4: %i64 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1891,22 +1891,22 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_8.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.3: type = converted %int.make_type_unsigned.loc5, %.loc5_8.2 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%.loc6_8.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_unsigned.loc6, %.loc6_8.2 [template = constants.%u64] -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i64] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i64] -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i64] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64.loc5) [template = constants.%u64] +// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] +// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_64.loc6) [template = constants.%u64] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_64.loc8) [template = constants.%i64] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i64] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_64.loc9) [template = constants.%i64] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i64] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked"; @@ -1920,67 +1920,67 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint64.ref.loc5: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] -// CHECK:STDOUT: %.loc5_28.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%.31] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0, %impl.elem0.loc5 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Convert.specific_fn.loc5(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_28.1: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_28.2: %i32 = converted %int_0, %.loc5_28.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.2) [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%int_0.3] +// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%int_0.3] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint64.ref.loc6: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] -// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] -// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc6_39: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_39, %.loc6_40.1 [template = constants.%.36] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_28.1: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_28.2: %i32 = converted %int_2147483647.loc6, %.loc6_28.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc6_39: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.2) [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_39, %.loc6_40.1 [template = constants.%int_2147483647.3] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc6_40.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc8: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc8_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_44.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_44.3: = bound_method %.loc8_44.1, %.loc8_44.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_44.4: = specific_function %.loc8_44.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc8_44: init %i32 = call %.loc8_44.4(%.loc8_44.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc8_44.5: %i32 = value_of_initializer %int.convert_checked.loc8_44 [template = constants.%.35] -// CHECK:STDOUT: %.loc8_44.6: %i32 = converted %.loc8_44.1, %.loc8_44.5 [template = constants.%.35] -// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc8_44.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_58.1: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%.37] -// CHECK:STDOUT: %.loc8_55.2: %i32 = converted %int.snegate, %.loc8_55.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_58.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_58.3: = bound_method %.loc8_58.1, %.loc8_58.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc8_58.4: = specific_function %.loc8_58.3, @Convert.2(constants.%.2) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %.loc8_58.4(%.loc8_58.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_58.5: %i32 = value_of_initializer %int.convert_checked.loc8_58 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_58.6: %i32 = converted %.loc8_58.1, %.loc8_58.5 [template = constants.%.41] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_55.2, %.loc8_58.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc8_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%.42] -// CHECK:STDOUT: %.loc8_59.2: %i32 = converted %int.ssub, %.loc8_59.1 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc8_60: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_59.2) [template = constants.%.43] -// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_60 [template = constants.%.43] -// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_60, %.loc8_61.1 [template = constants.%.43] +// CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8_44: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_44: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_44 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_44: = specific_function %Convert.bound.loc8_44, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_44: init %i32 = call %Convert.specific_fn.loc8_44(%int_2147483647.loc8) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_44.1: %i32 = value_of_initializer %int.convert_checked.loc8_44 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_44.2: %i32 = converted %int_2147483647.loc8, %.loc8_44.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc8_44.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc8_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_55.2: %i32 = converted %int.snegate, %.loc8_55.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc8_58: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_58: = bound_method %int_1, %impl.elem0.loc8_58 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc8_58: = specific_function %Convert.bound.loc8_58, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %Convert.specific_fn.loc8_58(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_58.1: %i32 = value_of_initializer %int.convert_checked.loc8_58 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_58.2: %i32 = converted %int_1, %.loc8_58.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_55.2, %.loc8_58.2) [template = constants.%int_-2147483648.1] +// CHECK:STDOUT: %.loc8_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-2147483648.1] +// CHECK:STDOUT: %.loc8_59.2: %i32 = converted %int.ssub, %.loc8_59.1 [template = constants.%int_-2147483648.1] +// CHECK:STDOUT: %int.convert_checked.loc8_60: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_59.2) [template = constants.%int_-2147483648.2] +// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_60 [template = constants.%int_-2147483648.2] +// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_60, %.loc8_61.1 [template = constants.%int_-2147483648.2] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc8_61.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc9: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] -// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.2) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.44] -// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_38, %.loc9_39.1 [template = constants.%.44] +// CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_2147483647.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %Convert.specific_fn.loc9(%int_2147483647.loc9) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_2147483647.loc9, %.loc9_27.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.2) [template = constants.%int_2147483647.4] +// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%int_2147483647.4] +// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_38, %.loc9_39.1 [template = constants.%int_2147483647.4] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc9_39.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1988,33 +1988,33 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_large_u32_for_i32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Uint32ToInt32.type: type = fn_type @Uint32ToInt32 [template] // CHECK:STDOUT: %Uint32ToInt32: %Uint32ToInt32.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %u32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %u32 = int_value 1 [template] -// CHECK:STDOUT: %.36: %u32 = int_value 2147483648 [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.3: %u32 = int_value 1 [template] +// CHECK:STDOUT: %int_2147483648.1: %u32 = int_value 2147483648 [template] +// CHECK:STDOUT: %int_2147483648.2: %i32 = int_value 2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2075,10 +2075,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed, %.loc5_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed, %.loc5_19.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt32(%a.param_patt: %u32) -> %i32 = "int.convert_checked"; @@ -2092,33 +2092,33 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt32.ref: %Uint32ToInt32.type = name_ref Uint32ToInt32, imports.%import_ref.7 [template = constants.%Uint32ToInt32] // CHECK:STDOUT: %AddU32.ref: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc11_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_37: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.6) [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_2147483647, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %Convert.specific_fn.loc11(%int_2147483647) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_26.1: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_26.2: %i32 = converted %int_2147483647, %.loc11_26.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.convert_checked.loc11_37: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_26.3: = bound_method %.loc12_26.1, %.loc12_26.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_26.4: = specific_function %.loc12_26.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %.loc12_26.4(%.loc12_26.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_26.5: %i32 = value_of_initializer %int.convert_checked.loc12_26 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_26.6: %i32 = converted %.loc12_26.1, %.loc12_26.5 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc12_27: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_37.1: %u32 = value_of_initializer %int.convert_checked.loc11_37 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_37.2: %u32 = converted %int.convert_checked.loc11_37, %.loc11_37.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_27.1: %u32 = value_of_initializer %int.convert_checked.loc12_27 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_27.2: %u32 = converted %int.convert_checked.loc12_27, %.loc12_27.1 [template = constants.%.35] -// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_37.2, %.loc12_27.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_28.1: %u32 = value_of_initializer %int.uadd [template = constants.%.36] -// CHECK:STDOUT: %.loc12_28.2: %u32 = converted %int.uadd, %.loc12_28.1 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Uint32ToInt32.ref(%.loc12_28.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc12_29, %.loc12_30.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %Convert.specific_fn.loc12(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_26.1: %i32 = value_of_initializer %int.convert_checked.loc12_26 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_26.2: %i32 = converted %int_1, %.loc12_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc12_27: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.2) [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc11_37.1: %u32 = value_of_initializer %int.convert_checked.loc11_37 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc11_37.2: %u32 = converted %int.convert_checked.loc11_37, %.loc11_37.1 [template = constants.%int_2147483647.3] +// CHECK:STDOUT: %.loc12_27.1: %u32 = value_of_initializer %int.convert_checked.loc12_27 [template = constants.%int_1.3] +// CHECK:STDOUT: %.loc12_27.2: %u32 = converted %int.convert_checked.loc12_27, %.loc12_27.1 [template = constants.%int_1.3] +// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_37.2, %.loc12_27.2) [template = constants.%int_2147483648.1] +// CHECK:STDOUT: %.loc12_28.1: %u32 = value_of_initializer %int.uadd [template = constants.%int_2147483648.1] +// CHECK:STDOUT: %.loc12_28.2: %u32 = converted %int.uadd, %.loc12_28.1 [template = constants.%int_2147483648.1] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Uint32ToInt32.ref(%.loc12_28.2) [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%int_2147483648.2] +// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc12_29, %.loc12_30.1 [template = constants.%int_2147483648.2] // CHECK:STDOUT: %max_plus_one: %i32 = bind_name max_plus_one, %.loc12_30.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2126,23 +2126,23 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_large_i32_for_i16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.31: %i16 = int_value 32768 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %int_32768.3: %i16 = int_value 32768 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2203,10 +2203,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_19.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_signed, %.loc9_19.2 [template = constants.%i16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed, %.loc9_19.1 [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked"; @@ -2214,16 +2214,16 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] -// CHECK:STDOUT: %.loc9_38.1: Core.IntLiteral = int_value 32768 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_38.3: = bound_method %.loc9_38.1, %.loc9_38.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_38.4: = specific_function %.loc9_38.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %.loc9_38.4(%.loc9_38.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_38.5: %i32 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_38.6: %i32 = converted %.loc9_38.1, %.loc9_38.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref(%.loc9_38.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%.31] +// CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %Convert.specific_fn(%int_32768) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_38.1: %i32 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_38.2: %i32 = converted %int_32768, %.loc9_38.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref(%.loc9_38.2) [template = constants.%int_32768.3] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%int_32768.3] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%int_32768.3] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_45.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2231,23 +2231,23 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_large_i32_for_u16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 65536 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.31: %u16 = int_value 65536 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %int_65536.3: %u16 = int_value 65536 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2308,10 +2308,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc9_19.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_unsigned, %.loc9_19.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_unsigned, %.loc9_19.1 [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked"; @@ -2319,16 +2319,16 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] -// CHECK:STDOUT: %.loc9_39.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_39.3: = bound_method %.loc9_39.1, %.loc9_39.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_39.4: = specific_function %.loc9_39.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %.loc9_39.4(%.loc9_39.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_39.5: %i32 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_39.6: %i32 = converted %.loc9_39.1, %.loc9_39.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_47: init %u16 = call %Int32ToUint16.ref(%.loc9_39.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_47 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_47, %.loc9_48.1 [template = constants.%.31] +// CHECK:STDOUT: %int_65536: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %Convert.specific_fn(%int_65536) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc9_39.1: %i32 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc9_39.2: %i32 = converted %int_65536, %.loc9_39.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.convert_checked.loc9_47: init %u16 = call %Int32ToUint16.ref(%.loc9_39.2) [template = constants.%int_65536.3] +// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_47 [template = constants.%int_65536.3] +// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_47, %.loc9_48.1 [template = constants.%int_65536.3] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2336,27 +2336,27 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_large_u32_for_i16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] // CHECK:STDOUT: %Uint32ToInt16: %Uint32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.31: %u32 = int_value 32768 [template] -// CHECK:STDOUT: %.32: %i16 = int_value 32768 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %int_32768.3: %u32 = int_value 32768 [template] +// CHECK:STDOUT: %int_32768.4: %i16 = int_value 32768 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2417,10 +2417,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_19.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_signed, %.loc9_19.2 [template = constants.%i16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed, %.loc9_19.1 [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt16(%a.param_patt: %u32) -> %i16 = "int.convert_checked"; @@ -2431,19 +2431,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Uint32ToInt16.ref: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 32768 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_59: init %u32 = call %Int32ToUint32.ref(%.loc9_53.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_59.1: %u32 = value_of_initializer %int.convert_checked.loc9_59 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_59.2: %u32 = converted %int.convert_checked.loc9_59, %.loc9_59.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_60: init %i16 = call %Uint32ToInt16.ref(%.loc9_59.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_60 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_60, %.loc9_61.1 [template = constants.%.32] +// CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn(%int_32768) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_32768, %.loc9_53.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %int.convert_checked.loc9_59: init %u32 = call %Int32ToUint32.ref(%.loc9_53.2) [template = constants.%int_32768.3] +// CHECK:STDOUT: %.loc9_59.1: %u32 = value_of_initializer %int.convert_checked.loc9_59 [template = constants.%int_32768.3] +// CHECK:STDOUT: %.loc9_59.2: %u32 = converted %int.convert_checked.loc9_59, %.loc9_59.1 [template = constants.%int_32768.3] +// CHECK:STDOUT: %int.convert_checked.loc9_60: init %i16 = call %Uint32ToInt16.ref(%.loc9_59.2) [template = constants.%int_32768.4] +// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_60 [template = constants.%int_32768.4] +// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_60, %.loc9_61.1 [template = constants.%int_32768.4] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_61.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2451,27 +2451,27 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_large_u32_for_u16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] // CHECK:STDOUT: %Uint32ToUint16.type: type = fn_type @Uint32ToUint16 [template] // CHECK:STDOUT: %Uint32ToUint16: %Uint32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 65536 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.31: %u32 = int_value 65536 [template] -// CHECK:STDOUT: %.32: %u16 = int_value 65536 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %int_65536.3: %u32 = int_value 65536 [template] +// CHECK:STDOUT: %int_65536.4: %u16 = int_value 65536 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2532,10 +2532,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc9_19.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_unsigned, %.loc9_19.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_unsigned, %.loc9_19.1 [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint16(%a.param_patt: %u32) -> %u16 = "int.convert_checked"; @@ -2546,19 +2546,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Uint32ToUint16.ref: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc9_54.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_54.3: = bound_method %.loc9_54.1, %.loc9_54.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_54.4: = specific_function %.loc9_54.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %.loc9_54.4(%.loc9_54.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_54.5: %i32 = value_of_initializer %int.convert_checked.loc9_54 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_54.6: %i32 = converted %.loc9_54.1, %.loc9_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_62: init %u32 = call %Int32ToUint32.ref(%.loc9_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_62.1: %u32 = value_of_initializer %int.convert_checked.loc9_62 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_62.2: %u32 = converted %int.convert_checked.loc9_62, %.loc9_62.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_63: init %u16 = call %Uint32ToUint16.ref(%.loc9_62.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_63 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_63, %.loc9_64.1 [template = constants.%.32] +// CHECK:STDOUT: %int_65536: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %Convert.specific_fn(%int_65536) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.convert_checked.loc9_54 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int_65536, %.loc9_54.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.convert_checked.loc9_62: init %u32 = call %Int32ToUint32.ref(%.loc9_54.2) [template = constants.%int_65536.3] +// CHECK:STDOUT: %.loc9_62.1: %u32 = value_of_initializer %int.convert_checked.loc9_62 [template = constants.%int_65536.3] +// CHECK:STDOUT: %.loc9_62.2: %u32 = converted %int.convert_checked.loc9_62, %.loc9_62.1 [template = constants.%int_65536.3] +// CHECK:STDOUT: %int.convert_checked.loc9_63: init %u16 = call %Uint32ToUint16.ref(%.loc9_62.2) [template = constants.%int_65536.4] +// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_63 [template = constants.%int_65536.4] +// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_63, %.loc9_64.1 [template = constants.%int_65536.4] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_64.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2566,30 +2566,30 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_negative_i32_to_u16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %u16 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-1.2: %u16 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2650,10 +2650,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc9_23.1) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_23.3: type = converted %int.make_type_unsigned, %.loc9_23.2 [template = constants.%u16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] +// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] +// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked"; @@ -2664,26 +2664,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] -// CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u16 = call %Int32ToUint16.ref(%.loc9_54.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.36] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_1, %.loc9_53.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.2, %.loc9_53.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u16 = call %Int32ToUint16.ref(%.loc9_54.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%int_-1.2] // CHECK:STDOUT: %minus_one_to_u16: %u16 = bind_name minus_one_to_u16, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2691,29 +2691,29 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_negative_i32_to_u32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.35: %u32 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-1.2: %u32 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2774,10 +2774,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc9_23.1) [template = constants.%u32] -// CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc9_23.3: type = converted %int.make_type_unsigned, %.loc9_23.2 [template = constants.%u32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] +// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] +// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked"; @@ -2788,26 +2788,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] -// CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.34] -// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u32 = call %Int32ToUint32.ref(%.loc9_54.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.35] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_1, %.loc9_53.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.2, %.loc9_53.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u32 = call %Int32ToUint32.ref(%.loc9_54.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%int_-1.2] // CHECK:STDOUT: %minus_one_to_u32: %u32 = bind_name minus_one_to_u32, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2815,30 +2815,30 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_negative_i32_to_u64.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %u64 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-1.2: %u64 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2899,10 +2899,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%.loc9_23.1) [template = constants.%u64] -// CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] -// CHECK:STDOUT: %.loc9_23.3: type = converted %int.make_type_unsigned, %.loc9_23.2 [template = constants.%u64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_64) [template = constants.%u64] +// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] +// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked"; @@ -2913,26 +2913,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint64.ref: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] -// CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u64 = call %Int32ToUint64.ref(%.loc9_54.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.36] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_1, %.loc9_53.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.2, %.loc9_53.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u64 = call %Int32ToUint64.ref(%.loc9_54.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%int_-1.2] // CHECK:STDOUT: %minus_one_to_u64: %u64 = bind_name minus_one_to_u64, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2940,26 +2940,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_too_small_i32_for_i16.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32769 [template] +// CHECK:STDOUT: %int_32769.1: Core.IntLiteral = int_value 32769 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 32769 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -32769 [template] -// CHECK:STDOUT: %.32: %i16 = int_value -32769 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32769.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32769.2: %i32 = int_value 32769 [template] +// CHECK:STDOUT: %int_-32769.1: %i32 = int_value -32769 [template] +// CHECK:STDOUT: %int_-32769.2: %i16 = int_value -32769 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3020,10 +3020,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 16 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_20.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_20.3: type = converted %int.make_type_signed, %.loc9_20.2 [template = constants.%i16] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] +// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked"; @@ -3034,19 +3034,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc9_49.1: Core.IntLiteral = int_value 32769 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_49.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_49.3: = bound_method %.loc9_49.1, %.loc9_49.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_49.4: = specific_function %.loc9_49.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_49: init %i32 = call %.loc9_49.4(%.loc9_49.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.5: %i32 = value_of_initializer %int.convert_checked.loc9_49 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.6: %i32 = converted %.loc9_49.1, %.loc9_49.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc9_49.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%.31] -// CHECK:STDOUT: %.loc9_55.2: %i32 = converted %int.snegate, %.loc9_55.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_56: init %i16 = call %Int32ToInt16.ref(%.loc9_55.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_56 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_56, %.loc9_57.1 [template = constants.%.32] +// CHECK:STDOUT: %int_32769: Core.IntLiteral = int_value 32769 [template = constants.%int_32769.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32769, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc9_49: init %i32 = call %Convert.specific_fn(%int_32769) [template = constants.%int_32769.2] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.convert_checked.loc9_49 [template = constants.%int_32769.2] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int_32769, %.loc9_49.1 [template = constants.%int_32769.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc9_49.2) [template = constants.%int_-32769.1] +// CHECK:STDOUT: %.loc9_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-32769.1] +// CHECK:STDOUT: %.loc9_55.2: %i32 = converted %int.snegate, %.loc9_55.1 [template = constants.%int_-32769.1] +// CHECK:STDOUT: %int.convert_checked.loc9_56: init %i16 = call %Int32ToInt16.ref(%.loc9_55.2) [template = constants.%int_-32769.2] +// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_56 [template = constants.%int_-32769.2] +// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_56, %.loc9_57.1 [template = constants.%int_-32769.2] // CHECK:STDOUT: %min_minus_one: %i16 = bind_name min_minus_one, %.loc9_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -3054,26 +3054,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: --- fail_not_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.30 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %Int32ToInt32.type: type = fn_type @Int32ToInt32 [template] // CHECK:STDOUT: %Int32ToInt32: %Int32ToInt32.type = struct_value () [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.31 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] // CHECK:STDOUT: } @@ -3139,22 +3139,22 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.1: Core.IntLiteral = int_value 16 [template = constants.%.30] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_34.1) [template = constants.%i16] -// CHECK:STDOUT: %.loc15_34.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] -// CHECK:STDOUT: %.loc15_34.3: type = converted %int.make_type_signed.loc15, %.loc15_34.2 [template = constants.%i16] -// CHECK:STDOUT: %.loc25_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_32.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_32.3: type = converted %int.make_type_signed.loc25, %.loc25_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_33.1: Core.IntLiteral = int_value 64 [template = constants.%.31] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_33.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc34_33.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i64] -// CHECK:STDOUT: %.loc34_33.3: type = converted %int.make_type_signed.loc34, %.loc34_33.2 [template = constants.%i64] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_16) [template = constants.%i16] +// CHECK:STDOUT: %.loc15_34.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] +// CHECK:STDOUT: %.loc15_34.2: type = converted %int.make_type_signed.loc15, %.loc15_34.1 [template = constants.%i16] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_32.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_32.2: type = converted %int.make_type_signed.loc25, %.loc25_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_64) [template = constants.%i64] +// CHECK:STDOUT: %.loc34_33.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i64] +// CHECK:STDOUT: %.loc34_33.2: type = converted %int.make_type_signed.loc34, %.loc34_33.1 [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked"; @@ -3165,14 +3165,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_25: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_26.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_26.2: = bound_method %.loc5_25, %.loc5_26.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_26.3: = specific_function %.loc5_26.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_26.3(%.loc5_25) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_26.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_26.5: %i32 = converted %.loc5_25, %.loc5_26.4 [template = constants.%.29] -// CHECK:STDOUT: %not_constant: %i32 = bind_name not_constant, %.loc5_26.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_26.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_26.2: %i32 = converted %int_0, %.loc5_26.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %not_constant: %i32 = bind_name not_constant, %.loc5_26.2 // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %not_constant.ref.loc15: %i32 = name_ref not_constant, %not_constant // CHECK:STDOUT: %int.convert_checked.loc15: init %i16 = call %Int32ToInt16.ref(%not_constant.ref.loc15) diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 9970cfb841c6c..e6439e699f97b 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -36,34 +36,34 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: --- int_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] // CHECK:STDOUT: %Eq: %Eq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: bool = bool_literal true [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: bool = bool_literal false [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -96,14 +96,14 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%.loc2_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.3: type = converted %int.make_type_signed.loc2_10, %.loc2_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%.loc2_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.3: type = converted %int.make_type_signed.loc2_18, %.loc2_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%int_32.loc2_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_signed.loc2_10, %.loc2_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type, %.loc2_26.1 [template = bool] @@ -137,14 +137,14 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%.loc12_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.3: type = converted %int.make_type_signed.loc12_19, %.loc12_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%.loc12_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_signed.loc12_27, %.loc12_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%int_32.loc12_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_signed.loc12_27, %.loc12_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -158,19 +158,19 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Eq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.eq"; @@ -179,23 +179,23 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc8_19.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_19.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_19.3: = bound_method %.loc8_19.1, %.loc8_19.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_19.4: = specific_function %.loc8_19.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_19: init %i32 = call %.loc8_19.4(%.loc8_19.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_19.5: %i32 = value_of_initializer %int.convert_checked.loc8_19 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_19.6: %i32 = converted %.loc8_19.1, %.loc8_19.5 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.32] -// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19.6, %.loc8_22.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%.33] +// CHECK:STDOUT: %int_1.loc8_19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc8_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc8_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_19: = bound_method %int_1.loc8_19, %impl.elem0.loc8_19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_19: = specific_function %Convert.bound.loc8_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_19: init %i32 = call %Convert.specific_fn.loc8_19(%int_1.loc8_19) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_19.1: %i32 = value_of_initializer %int.convert_checked.loc8_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_19.2: %i32 = converted %int_1.loc8_19, %.loc8_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_22: = bound_method %int_1.loc8_22, %impl.elem0.loc8_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_22: = specific_function %Convert.bound.loc8_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %Convert.specific_fn.loc8_22(%int_1.loc8_22) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_1.loc8_22, %.loc8_22.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19.2, %.loc8_22.2) [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%true] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -210,23 +210,23 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.37] -// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_20: = bound_method %int_1.loc9, %impl.elem0.loc9_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_20: = specific_function %Convert.bound.loc9_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %Convert.specific_fn.loc9_20(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_1.loc9, %.loc9_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_2, %impl.elem0.loc9_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_23.1: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_23.2: %i32 = converted %int_2, %.loc9_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20.2, %.loc9_23.2) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -256,10 +256,10 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] // CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] // CHECK:STDOUT: } @@ -286,18 +286,18 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 7d0b15ef8ba81..efdf91f164f12 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -31,10 +31,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_greater.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] @@ -42,30 +42,30 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.37: bool = bool_literal false [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.42: bool = bool_literal true [template] -// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -99,14 +99,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_15: init type = call constants.%Int(%.loc2_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_15.2: type = value_of_initializer %int.make_type_signed.loc2_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_15.3: type = converted %int.make_type_signed.loc2_15, %.loc2_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_23: init type = call constants.%Int(%.loc2_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_23.2: type = value_of_initializer %int.make_type_signed.loc2_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_23.3: type = converted %int.make_type_signed.loc2_23, %.loc2_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_15: init type = call constants.%Int(%int_32.loc2_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %int.make_type_signed.loc2_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_15.2: type = converted %int.make_type_signed.loc2_15, %.loc2_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_23: init type = call constants.%Int(%int_32.loc2_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %int.make_type_signed.loc2_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_23.2: type = converted %int.make_type_signed.loc2_23, %.loc2_23.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type, %.loc2_31.1 [template = bool] @@ -123,14 +123,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%.loc3_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3_14, %.loc3_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%.loc3_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.3: type = converted %int.make_type_signed.loc3_22, %.loc3_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -159,14 +159,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed.loc16_19, %.loc16_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%.loc16_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.3: type = converted %int.make_type_signed.loc16_27, %.loc16_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,19 +180,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Greater(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.greater"; @@ -203,23 +203,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_28.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_28.1, %.loc9_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_28: init %i32 = call %.loc9_28.4(%.loc9_28.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_28.1, %.loc9_28.5 [template = constants.%.36] -// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25.6, %.loc9_28.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_1.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_1.loc9, %.loc9_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_28: = bound_method %int_2, %impl.elem0.loc9_28 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_28: = specific_function %Convert.bound.loc9_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_28: init %i32 = call %Convert.specific_fn.loc9_28(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_28.1: %i32 = value_of_initializer %int.convert_checked.loc9_28 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_28.2: %i32 = converted %int_2, %.loc9_28.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25.2, %.loc9_28.2) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,23 +234,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc10_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_28.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_28.3: = bound_method %.loc10_28.1, %.loc10_28.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_28.4: = specific_function %.loc10_28.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_28: init %i32 = call %.loc10_28.4(%.loc10_28.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_28.5: %i32 = value_of_initializer %int.convert_checked.loc10_28 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_28.6: %i32 = converted %.loc10_28.1, %.loc10_28.5 [template = constants.%.33] -// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25.6, %.loc10_28.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%.37] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc10_25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc10_28: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_25: = bound_method %int_1.loc10_25, %impl.elem0.loc10_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_25: = specific_function %Convert.bound.loc10_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %Convert.specific_fn.loc10_25(%int_1.loc10_25) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_25.2: %i32 = converted %int_1.loc10_25, %.loc10_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_28: = bound_method %int_1.loc10_28, %impl.elem0.loc10_28 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_28: = specific_function %Convert.bound.loc10_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_28: init %i32 = call %Convert.specific_fn.loc10_28(%int_1.loc10_28) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_28.1: %i32 = value_of_initializer %int.convert_checked.loc10_28 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_28.2: %i32 = converted %int_1.loc10_28, %.loc10_28.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25.2, %.loc10_28.2) [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -265,23 +265,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc11_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.41] -// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.41] -// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%.42] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_24: = bound_method %int_1.loc11, %impl.elem0.loc11_24 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_24: = specific_function %Convert.bound.loc11_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %Convert.specific_fn.loc11_24(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int_1.loc11, %.loc11_24.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27: = bound_method %int_0.loc11, %impl.elem0.loc11_27 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27: = specific_function %Convert.bound.loc11_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %Convert.specific_fn.loc11_27(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.1: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.2: %i32 = converted %int_0.loc11, %.loc11_27.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24.2, %.loc11_27.2) [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -297,26 +297,26 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_32.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc12_36.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_36.1, %.loc12_36.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %.loc12_36.4(%.loc12_36.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc12_36.5: %i32 = value_of_initializer %int.convert_checked.loc12_36 [template = constants.%.41] -// CHECK:STDOUT: %.loc12_36.6: %i32 = converted %.loc12_36.1, %.loc12_36.5 [template = constants.%.41] -// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_33.2, %.loc12_36.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_1.loc12, %impl.elem0.loc12_32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_32.1: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_32.2: %i32 = converted %int_1.loc12, %.loc12_32.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_32.2) [template = constants.%int_-1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc12_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_36: = bound_method %int_0.loc12, %impl.elem0.loc12_36 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_36: = specific_function %Convert.bound.loc12_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %Convert.specific_fn.loc12_36(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_36.1: %i32 = value_of_initializer %int.convert_checked.loc12_36 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_36.2: %i32 = converted %int_0.loc12, %.loc12_36.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_33.2, %.loc12_36.2) [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -331,27 +331,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] -// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.6, %.loc13_35.2) [template = constants.%.42] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.42] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_1.loc13, %impl.elem0.loc13_34 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_34: = specific_function %Convert.bound.loc13_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %Convert.specific_fn.loc13_34(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_1.loc13, %.loc13_34.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int_0.loc13, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %Convert.specific_fn.loc13_24(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int_0.loc13, %.loc13_24.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.2, %.loc13_35.2) [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index b232508e9a059..ae9b5ff0d4a78 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -31,10 +31,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_greater_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] @@ -42,30 +42,30 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.37: bool = bool_literal false [template] -// CHECK:STDOUT: %.38: bool = bool_literal true [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -99,14 +99,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%.loc2_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.3: type = converted %int.make_type_signed.loc2_17, %.loc2_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%.loc2_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.3: type = converted %int.make_type_signed.loc2_25, %.loc2_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%int_32.loc2_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_signed.loc2_17, %.loc2_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%int_32.loc2_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_signed.loc2_25, %.loc2_25.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type, %.loc2_33.1 [template = bool] @@ -123,14 +123,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%.loc3_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3_14, %.loc3_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%.loc3_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.3: type = converted %int.make_type_signed.loc3_22, %.loc3_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -159,14 +159,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed.loc16_19, %.loc16_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%.loc16_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.3: type = converted %int.make_type_signed.loc16_27, %.loc16_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,19 +180,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @GreaterEq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.greater_eq"; @@ -203,23 +203,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_30.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_30.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_30.3: = bound_method %.loc9_30.1, %.loc9_30.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_30.4: = specific_function %.loc9_30.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_30: init %i32 = call %.loc9_30.4(%.loc9_30.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_30.5: %i32 = value_of_initializer %int.convert_checked.loc9_30 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_30.6: %i32 = converted %.loc9_30.1, %.loc9_30.5 [template = constants.%.36] -// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27.6, %.loc9_30.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_27: = bound_method %int_1.loc9, %impl.elem0.loc9_27 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_27: = specific_function %Convert.bound.loc9_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %Convert.specific_fn.loc9_27(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_1.loc9, %.loc9_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_30: = bound_method %int_2, %impl.elem0.loc9_30 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_30: = specific_function %Convert.bound.loc9_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_30: init %i32 = call %Convert.specific_fn.loc9_30(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_30.1: %i32 = value_of_initializer %int.convert_checked.loc9_30 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_30.2: %i32 = converted %int_2, %.loc9_30.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27.2, %.loc9_30.2) [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%false] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,23 +234,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_29.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_29.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_29.3: = bound_method %.loc10_29.1, %.loc10_29.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_29.4: = specific_function %.loc10_29.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_29: init %i32 = call %.loc10_29.4(%.loc10_29.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_29.5: %i32 = value_of_initializer %int.convert_checked.loc10_29 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_29.6: %i32 = converted %.loc10_29.1, %.loc10_29.5 [template = constants.%.33] -// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26.6, %.loc10_29.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc10_26: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc10_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_1.loc10_26, %impl.elem0.loc10_26 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_1.loc10_26) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_1.loc10_26, %.loc10_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_29: = bound_method %int_1.loc10_29, %impl.elem0.loc10_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_29: = specific_function %Convert.bound.loc10_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_29: init %i32 = call %Convert.specific_fn.loc10_29(%int_1.loc10_29) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_29.1: %i32 = value_of_initializer %int.convert_checked.loc10_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_29.2: %i32 = converted %int_1.loc10_29, %.loc10_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26.2, %.loc10_29.2) [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -265,23 +265,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc11_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_29.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_29.3: = bound_method %.loc11_29.1, %.loc11_29.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_29.4: = specific_function %.loc11_29.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc11_29: init %i32 = call %.loc11_29.4(%.loc11_29.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_29.5: %i32 = value_of_initializer %int.convert_checked.loc11_29 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_29.6: %i32 = converted %.loc11_29.1, %.loc11_29.5 [template = constants.%.42] -// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26.6, %.loc11_29.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26: = bound_method %int_1.loc11, %impl.elem0.loc11_26 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26: = specific_function %Convert.bound.loc11_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %Convert.specific_fn.loc11_26(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_26.1: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_26.2: %i32 = converted %int_1.loc11, %.loc11_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_29: = bound_method %int_0.loc11, %impl.elem0.loc11_29 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_29: = specific_function %Convert.bound.loc11_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_29: init %i32 = call %Convert.specific_fn.loc11_29(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_29.1: %i32 = value_of_initializer %int.convert_checked.loc11_29 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_29.2: %i32 = converted %int_0.loc11, %.loc11_29.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26.2, %.loc11_29.2) [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%true] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -297,26 +297,26 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_34.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc12_38.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_35.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_35.2: %i32 = converted %int.snegate.loc12, %.loc12_35.1 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_38.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_38.3: = bound_method %.loc12_38.1, %.loc12_38.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc12_38.4: = specific_function %.loc12_38.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %.loc12_38.4(%.loc12_38.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc12_38.5: %i32 = value_of_initializer %int.convert_checked.loc12_38 [template = constants.%.42] -// CHECK:STDOUT: %.loc12_38.6: %i32 = converted %.loc12_38.1, %.loc12_38.5 [template = constants.%.42] -// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_35.2, %.loc12_38.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_1.loc12, %impl.elem0.loc12_34 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_34: = specific_function %Convert.bound.loc12_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %Convert.specific_fn.loc12_34(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_1.loc12, %.loc12_34.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_34.2) [template = constants.%int_-1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_35.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc12_35.2: %i32 = converted %int.snegate.loc12, %.loc12_35.1 [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc12_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_38: = bound_method %int_0.loc12, %impl.elem0.loc12_38 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_38: = specific_function %Convert.bound.loc12_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %Convert.specific_fn.loc12_38(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_38.1: %i32 = value_of_initializer %int.convert_checked.loc12_38 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_38.2: %i32 = converted %int_0.loc12, %.loc12_38.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_35.2, %.loc12_38.2) [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%false] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -331,27 +331,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc13_26.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_36.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_36.3: = bound_method %.loc13_36.1, %.loc13_36.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_36.4: = specific_function %.loc13_36.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_36: init %i32 = call %.loc13_36.4(%.loc13_36.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_36.5: %i32 = value_of_initializer %int.convert_checked.loc13_36 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_36.6: %i32 = converted %.loc13_36.1, %.loc13_36.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_36.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc13_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_26.3: = bound_method %.loc13_26.1, %.loc13_26.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_26.4: = specific_function %.loc13_26.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %.loc13_26.4(%.loc13_26.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc13_26.5: %i32 = value_of_initializer %int.convert_checked.loc13_26 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_26.6: %i32 = converted %.loc13_26.1, %.loc13_26.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_37.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_37.2: %i32 = converted %int.snegate.loc13, %.loc13_37.1 [template = constants.%.43] -// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.6, %.loc13_37.2) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_36: = bound_method %int_1.loc13, %impl.elem0.loc13_36 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_36: = specific_function %Convert.bound.loc13_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_36: init %i32 = call %Convert.specific_fn.loc13_36(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_36.1: %i32 = value_of_initializer %int.convert_checked.loc13_36 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_36.2: %i32 = converted %int_1.loc13, %.loc13_36.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_36.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc13_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_26: = bound_method %int_0.loc13, %impl.elem0.loc13_26 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_26: = specific_function %Convert.bound.loc13_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %Convert.specific_fn.loc13_26(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_26.1: %i32 = value_of_initializer %int.convert_checked.loc13_26 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_26.2: %i32 = converted %int_0.loc13, %.loc13_26.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_37.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc13_37.2: %i32 = converted %int.snegate.loc13, %.loc13_37.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.2, %.loc13_37.2) [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%true] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index db66fcb79137e..a9add0883ef10 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -66,34 +66,34 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: --- int_left_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] // CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 20 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_20.1: %i32 = int_value 20 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 20 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_20.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_20.2: Core.IntLiteral = int_value 20 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_20.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -124,18 +124,18 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%.loc2_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.3: type = converted %int.make_type_signed.loc2_17, %.loc2_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%.loc2_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.3: type = converted %int.make_type_signed.loc2_25, %.loc2_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_33: init type = call constants.%Int(%.loc2_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_33.2: type = value_of_initializer %int.make_type_signed.loc2_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_33.3: type = converted %int.make_type_signed.loc2_33, %.loc2_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%int_32.loc2_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_signed.loc2_17, %.loc2_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%int_32.loc2_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_signed.loc2_25, %.loc2_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_33: init type = call constants.%Int(%int_32.loc2_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %int.make_type_signed.loc2_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_33.2: type = converted %int.make_type_signed.loc2_33, %.loc2_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -143,44 +143,44 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc4_26.1: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_29.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_26.3: = bound_method %.loc4_26.1, %.loc4_26.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_26.4: = specific_function %.loc4_26.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %.loc4_26.4(%.loc4_26.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_26.5: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_26.6: %i32 = converted %.loc4_26.1, %.loc4_26.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_29.3: = bound_method %.loc4_29.1, %.loc4_29.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_29.4: = specific_function %.loc4_29.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %.loc4_29.4(%.loc4_29.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_29.5: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_29.6: %i32 = converted %.loc4_29.1, %.loc4_29.5 [template = constants.%.33] -// CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.6, %.loc4_29.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_30.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_30.2: = bound_method %int.left_shift, %.loc4_30.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_30.3: = specific_function %.loc4_30.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_30.4: %i32 = value_of_initializer %int.left_shift [template = constants.%.34] -// CHECK:STDOUT: %.loc4_30.5: %i32 = converted %int.left_shift, %.loc4_30.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init Core.IntLiteral = call %.loc4_30.3(%.loc4_30.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_30.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_30.7: Core.IntLiteral = converted %int.left_shift, %.loc4_30.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_31: type = array_type %.loc4_30.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 20 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int_5, %impl.elem0.loc4_26 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %Convert.specific_fn.loc4_26(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int_5, %.loc4_26.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc4_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_29: = bound_method %int_2, %impl.elem0.loc4_29 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_29: = specific_function %Convert.bound.loc4_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %Convert.specific_fn.loc4_29(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int_2, %.loc4_29.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.2, %.loc4_29.2) [template = constants.%int_20.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int.left_shift, %impl.elem0.loc4_30 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.left_shift [template = constants.%int_20.1] +// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int.left_shift, %.loc4_30.1 [template = constants.%int_20.1] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init Core.IntLiteral = call %Convert.specific_fn.loc4_30(%.loc4_30.2) [template = constants.%int_20.2] +// CHECK:STDOUT: %.loc4_30.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_20.2] +// CHECK:STDOUT: %.loc4_30.4: Core.IntLiteral = converted %int.left_shift, %.loc4_30.3 [template = constants.%int_20.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_30.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [template = constants.%int_20.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_20, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -189,18 +189,18 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -225,52 +225,52 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bad_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32.1 [template] // CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] // CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 31 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_31.1: Core.IntLiteral = int_value 31 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 31 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.35: = bound_method %.1, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 32 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 33 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 1000 [template] -// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %.46: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.48: = bound_method %.47, %Convert.14 [template] -// CHECK:STDOUT: %.49: = specific_function %.48, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.50: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_31.2: %i32 = int_value 31 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] +// CHECK:STDOUT: %int_33.1: Core.IntLiteral = int_value 33 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_33.2: %i32 = int_value 33 [template] +// CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %int_0.1: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_0.2, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -305,18 +305,18 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%.loc4_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_signed.loc4_17, %.loc4_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%.loc4_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.2: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.3: type = converted %int.make_type_signed.loc4_25, %.loc4_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_33: init type = call constants.%Int(%.loc4_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.2: type = value_of_initializer %int.make_type_signed.loc4_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.3: type = converted %int.make_type_signed.loc4_33, %.loc4_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%int_32.loc4_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_signed.loc4_25, %.loc4_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_33: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_33: init type = call constants.%Int(%int_32.loc4_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_33.1: type = value_of_initializer %int.make_type_signed.loc4_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_33.2: type = converted %int.make_type_signed.loc4_33, %.loc4_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -330,51 +330,51 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%.loc5_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.3: type = converted %int.make_type_signed.loc5_14, %.loc5_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.3: type = converted %int.make_type_signed.loc5_22, %.loc5_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = converted %int.make_type_signed.loc13, %.loc13_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.3: type = converted %int.make_type_signed.loc18, %.loc18_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.3: type = converted %int.make_type_signed.loc21, %.loc21_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_17.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_17.3: type = converted %int.make_type_signed.loc26, %.loc26_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%.loc29_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_20.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_20.3: type = converted %int.make_type_signed.loc29, %.loc29_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_20.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_20.3: type = converted %int.make_type_signed.loc34, %.loc34_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%.loc40_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15.2: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15.3: type = converted %int.make_type_signed.loc40, %.loc40_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed.loc13, %.loc13_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed.loc18, %.loc18_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_signed.loc21, %.loc21_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_17.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_17.2: type = converted %int.make_type_signed.loc26, %.loc26_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_20.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_20.2: type = converted %int.make_type_signed.loc29, %.loc29_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_20.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_20.2: type = converted %int.make_type_signed.loc34, %.loc34_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%int_32.loc40) [template = constants.%i32] +// CHECK:STDOUT: %.loc40_15.1: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] +// CHECK:STDOUT: %.loc40_15.2: type = converted %int.make_type_signed.loc40, %.loc40_15.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @LeftShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; @@ -384,158 +384,158 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc8_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_32.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_29.3: = bound_method %.loc8_29.1, %.loc8_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_29.4: = specific_function %.loc8_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc8_29: init %i32 = call %.loc8_29.4(%.loc8_29.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_29.5: %i32 = value_of_initializer %int.convert_checked.loc8_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_29.6: %i32 = converted %.loc8_29.1, %.loc8_29.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_32.3: = bound_method %.loc8_32.1, %.loc8_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_32.4: = specific_function %.loc8_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_32: init %i32 = call %.loc8_32.4(%.loc8_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_32.5: %i32 = value_of_initializer %int.convert_checked.loc8_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_32.6: %i32 = converted %.loc8_32.1, %.loc8_32.5 [template = constants.%.33] -// CHECK:STDOUT: %int.left_shift.loc8: init %i32 = call %LeftShift.ref.loc8(%.loc8_29.6, %.loc8_32.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.34] +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_31.loc8: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] +// CHECK:STDOUT: %impl.elem0.loc8_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_29: = bound_method %int_1.loc8, %impl.elem0.loc8_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_29: = specific_function %Convert.bound.loc8_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_29: init %i32 = call %Convert.specific_fn.loc8_29(%int_1.loc8) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_29.1: %i32 = value_of_initializer %int.convert_checked.loc8_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_29.2: %i32 = converted %int_1.loc8, %.loc8_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc8_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_32: = bound_method %int_31.loc8, %impl.elem0.loc8_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_32: = specific_function %Convert.bound.loc8_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_32: init %i32 = call %Convert.specific_fn.loc8_32(%int_31.loc8) [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc8_32.1: %i32 = value_of_initializer %int.convert_checked.loc8_32 [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc8_32.2: %i32 = converted %int_31.loc8, %.loc8_32.1 [template = constants.%int_31.2] +// CHECK:STDOUT: %int.left_shift.loc8: init %i32 = call %LeftShift.ref.loc8(%.loc8_29.2, %.loc8_32.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_35.2 // CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc13_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_29.1, %.loc13_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_29: init %i32 = call %.loc13_29.4(%.loc13_29.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_29.5: %i32 = value_of_initializer %int.convert_checked.loc13_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_29.6: %i32 = converted %.loc13_29.1, %.loc13_29.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.37] -// CHECK:STDOUT: %int.left_shift.loc13: init %i32 = call %LeftShift.ref.loc13(%.loc13_29.6, %.loc13_32.6) [template = ] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %impl.elem0.loc13_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_29: = bound_method %int_1.loc13, %impl.elem0.loc13_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_29: = specific_function %Convert.bound.loc13_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_29: init %i32 = call %Convert.specific_fn.loc13_29(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_29.1: %i32 = value_of_initializer %int.convert_checked.loc13_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_29.2: %i32 = converted %int_1.loc13, %.loc13_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_32: = bound_method %int_32.loc13, %impl.elem0.loc13_32 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_32: = specific_function %Convert.bound.loc13_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %Convert.specific_fn.loc13_32(%int_32.loc13) [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc13_32.1: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc13_32.2: %i32 = converted %int_32.loc13, %.loc13_32.1 [template = constants.%int_32.2] +// CHECK:STDOUT: %int.left_shift.loc13: init %i32 = call %LeftShift.ref.loc13(%.loc13_29.2, %.loc13_32.2) [template = ] // CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.left_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.left_shift.loc13, %.loc13_35.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_35.2 // CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc18_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_32.1: Core.IntLiteral = int_value 33 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_29.3: = bound_method %.loc18_29.1, %.loc18_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc18_29.4: = specific_function %.loc18_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc18_29: init %i32 = call %.loc18_29.4(%.loc18_29.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc18_29.5: %i32 = value_of_initializer %int.convert_checked.loc18_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_29.6: %i32 = converted %.loc18_29.1, %.loc18_29.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_32.3: = bound_method %.loc18_32.1, %.loc18_32.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc18_32.4: = specific_function %.loc18_32.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc18_32: init %i32 = call %.loc18_32.4(%.loc18_32.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc18_32.5: %i32 = value_of_initializer %int.convert_checked.loc18_32 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_32.6: %i32 = converted %.loc18_32.1, %.loc18_32.5 [template = constants.%.41] -// CHECK:STDOUT: %int.left_shift.loc18: init %i32 = call %LeftShift.ref.loc18(%.loc18_29.6, %.loc18_32.6) [template = ] +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [template = constants.%int_33.1] +// CHECK:STDOUT: %impl.elem0.loc18_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_29: = bound_method %int_1.loc18, %impl.elem0.loc18_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18_29: = specific_function %Convert.bound.loc18_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18_29: init %i32 = call %Convert.specific_fn.loc18_29(%int_1.loc18) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_29.1: %i32 = value_of_initializer %int.convert_checked.loc18_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_29.2: %i32 = converted %int_1.loc18, %.loc18_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc18_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_32: = bound_method %int_33, %impl.elem0.loc18_32 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc18_32: = specific_function %Convert.bound.loc18_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc18_32: init %i32 = call %Convert.specific_fn.loc18_32(%int_33) [template = constants.%int_33.2] +// CHECK:STDOUT: %.loc18_32.1: %i32 = value_of_initializer %int.convert_checked.loc18_32 [template = constants.%int_33.2] +// CHECK:STDOUT: %.loc18_32.2: %i32 = converted %int_33, %.loc18_32.1 [template = constants.%int_33.2] +// CHECK:STDOUT: %int.left_shift.loc18: init %i32 = call %LeftShift.ref.loc18(%.loc18_29.2, %.loc18_32.2) [template = ] // CHECK:STDOUT: %.loc18_35.1: %i32 = value_of_initializer %int.left_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_35.2: %i32 = converted %int.left_shift.loc18, %.loc18_35.1 [template = ] // CHECK:STDOUT: %size_3: %i32 = bind_name size_3, %.loc18_35.2 // CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc21_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.42] -// CHECK:STDOUT: %.loc21_39.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc21_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_33.3: = bound_method %.loc21_33.1, %.loc21_33.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc21_33.4: = specific_function %.loc21_33.3, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc21_33: init %i32 = call %.loc21_33.4(%.loc21_33.1) [template = constants.%.45] -// CHECK:STDOUT: %.loc21_33.5: %i32 = value_of_initializer %int.convert_checked.loc21_33 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_33.6: %i32 = converted %.loc21_33.1, %.loc21_33.5 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_39.3: = bound_method %.loc21_39.1, %.loc21_39.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_39.4: = specific_function %.loc21_39.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc21_39: init %i32 = call %.loc21_39.4(%.loc21_39.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc21_39.5: %i32 = value_of_initializer %int.convert_checked.loc21_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_39.6: %i32 = converted %.loc21_39.1, %.loc21_39.5 [template = constants.%.33] -// CHECK:STDOUT: %int.left_shift.loc21: init %i32 = call %LeftShift.ref.loc21(%.loc21_33.6, %.loc21_39.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc21_42.1: %i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.46] -// CHECK:STDOUT: %.loc21_42.2: %i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.46] +// CHECK:STDOUT: %int_1000.loc21: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %int_31.loc21: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] +// CHECK:STDOUT: %impl.elem0.loc21_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_33: = bound_method %int_1000.loc21, %impl.elem0.loc21_33 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc21_33: = specific_function %Convert.bound.loc21_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc21_33: init %i32 = call %Convert.specific_fn.loc21_33(%int_1000.loc21) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc21_33.1: %i32 = value_of_initializer %int.convert_checked.loc21_33 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc21_33.2: %i32 = converted %int_1000.loc21, %.loc21_33.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %impl.elem0.loc21_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21_39: = bound_method %int_31.loc21, %impl.elem0.loc21_39 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc21_39: = specific_function %Convert.bound.loc21_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc21_39: init %i32 = call %Convert.specific_fn.loc21_39(%int_31.loc21) [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc21_39.1: %i32 = value_of_initializer %int.convert_checked.loc21_39 [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc21_39.2: %i32 = converted %int_31.loc21, %.loc21_39.1 [template = constants.%int_31.2] +// CHECK:STDOUT: %int.left_shift.loc21: init %i32 = call %LeftShift.ref.loc21(%.loc21_33.2, %.loc21_39.2) [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc21_42.1: %i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc21_42.2: %i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%int_0.1] // CHECK:STDOUT: %overflow_1: %i32 = bind_name overflow_1, %.loc21_42.2 // CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc26_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.42] -// CHECK:STDOUT: %.loc26_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc26_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_33.3: = bound_method %.loc26_33.1, %.loc26_33.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc26_33.4: = specific_function %.loc26_33.3, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc26_33: init %i32 = call %.loc26_33.4(%.loc26_33.1) [template = constants.%.45] -// CHECK:STDOUT: %.loc26_33.5: %i32 = value_of_initializer %int.convert_checked.loc26_33 [template = constants.%.45] -// CHECK:STDOUT: %.loc26_33.6: %i32 = converted %.loc26_33.1, %.loc26_33.5 [template = constants.%.45] -// CHECK:STDOUT: %.loc26_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_39.3: = bound_method %.loc26_39.1, %.loc26_39.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc26_39.4: = specific_function %.loc26_39.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc26_39: init %i32 = call %.loc26_39.4(%.loc26_39.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc26_39.5: %i32 = value_of_initializer %int.convert_checked.loc26_39 [template = constants.%.37] -// CHECK:STDOUT: %.loc26_39.6: %i32 = converted %.loc26_39.1, %.loc26_39.5 [template = constants.%.37] -// CHECK:STDOUT: %int.left_shift.loc26: init %i32 = call %LeftShift.ref.loc26(%.loc26_33.6, %.loc26_39.6) [template = ] +// CHECK:STDOUT: %int_1000.loc26: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %impl.elem0.loc26_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc26_33: = bound_method %int_1000.loc26, %impl.elem0.loc26_33 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc26_33: = specific_function %Convert.bound.loc26_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc26_33: init %i32 = call %Convert.specific_fn.loc26_33(%int_1000.loc26) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc26_33.1: %i32 = value_of_initializer %int.convert_checked.loc26_33 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc26_33.2: %i32 = converted %int_1000.loc26, %.loc26_33.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %impl.elem0.loc26_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc26_39: = bound_method %int_32.loc26, %impl.elem0.loc26_39 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc26_39: = specific_function %Convert.bound.loc26_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc26_39: init %i32 = call %Convert.specific_fn.loc26_39(%int_32.loc26) [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc26_39.1: %i32 = value_of_initializer %int.convert_checked.loc26_39 [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc26_39.2: %i32 = converted %int_32.loc26, %.loc26_39.1 [template = constants.%int_32.2] +// CHECK:STDOUT: %int.left_shift.loc26: init %i32 = call %LeftShift.ref.loc26(%.loc26_33.2, %.loc26_39.2) [template = ] // CHECK:STDOUT: %.loc26_42.1: %i32 = value_of_initializer %int.left_shift.loc26 [template = ] // CHECK:STDOUT: %.loc26_42.2: %i32 = converted %int.left_shift.loc26, %.loc26_42.1 [template = ] // CHECK:STDOUT: %overflow_2: %i32 = bind_name overflow_2, %.loc26_42.2 // CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc29_36.1: Core.IntLiteral = int_value 0 [template = constants.%.47] -// CHECK:STDOUT: %.loc29_39.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_36.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_36.3: = bound_method %.loc29_36.1, %.loc29_36.2 [template = constants.%.48] -// CHECK:STDOUT: %.loc29_36.4: = specific_function %.loc29_36.3, @Convert.2(constants.%.1) [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc29_36: init %i32 = call %.loc29_36.4(%.loc29_36.1) [template = constants.%.46] -// CHECK:STDOUT: %.loc29_36.5: %i32 = value_of_initializer %int.convert_checked.loc29_36 [template = constants.%.46] -// CHECK:STDOUT: %.loc29_36.6: %i32 = converted %.loc29_36.1, %.loc29_36.5 [template = constants.%.46] -// CHECK:STDOUT: %.loc29_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_39.3: = bound_method %.loc29_39.1, %.loc29_39.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc29_39.4: = specific_function %.loc29_39.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc29_39: init %i32 = call %.loc29_39.4(%.loc29_39.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc29_39.5: %i32 = value_of_initializer %int.convert_checked.loc29_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc29_39.6: %i32 = converted %.loc29_39.1, %.loc29_39.5 [template = constants.%.33] -// CHECK:STDOUT: %int.left_shift.loc29: init %i32 = call %LeftShift.ref.loc29(%.loc29_36.6, %.loc29_39.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc29_42.1: %i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.46] -// CHECK:STDOUT: %.loc29_42.2: %i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.46] +// CHECK:STDOUT: %int_0.loc29: Core.IntLiteral = int_value 0 [template = constants.%int_0.2] +// CHECK:STDOUT: %int_31.loc29: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] +// CHECK:STDOUT: %impl.elem0.loc29_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc29_36: = bound_method %int_0.loc29, %impl.elem0.loc29_36 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %Convert.specific_fn.loc29_36: = specific_function %Convert.bound.loc29_36, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.6] +// CHECK:STDOUT: %int.convert_checked.loc29_36: init %i32 = call %Convert.specific_fn.loc29_36(%int_0.loc29) [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc29_36.1: %i32 = value_of_initializer %int.convert_checked.loc29_36 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc29_36.2: %i32 = converted %int_0.loc29, %.loc29_36.1 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc29_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc29_39: = bound_method %int_31.loc29, %impl.elem0.loc29_39 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc29_39: = specific_function %Convert.bound.loc29_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc29_39: init %i32 = call %Convert.specific_fn.loc29_39(%int_31.loc29) [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc29_39.1: %i32 = value_of_initializer %int.convert_checked.loc29_39 [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc29_39.2: %i32 = converted %int_31.loc29, %.loc29_39.1 [template = constants.%int_31.2] +// CHECK:STDOUT: %int.left_shift.loc29: init %i32 = call %LeftShift.ref.loc29(%.loc29_36.2, %.loc29_39.2) [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc29_42.1: %i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc29_42.2: %i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%int_0.1] // CHECK:STDOUT: %no_overflow_1: %i32 = bind_name no_overflow_1, %.loc29_42.2 // CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc34_36.1: Core.IntLiteral = int_value 0 [template = constants.%.47] -// CHECK:STDOUT: %.loc34_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc34_36.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_36.3: = bound_method %.loc34_36.1, %.loc34_36.2 [template = constants.%.48] -// CHECK:STDOUT: %.loc34_36.4: = specific_function %.loc34_36.3, @Convert.2(constants.%.1) [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc34_36: init %i32 = call %.loc34_36.4(%.loc34_36.1) [template = constants.%.46] -// CHECK:STDOUT: %.loc34_36.5: %i32 = value_of_initializer %int.convert_checked.loc34_36 [template = constants.%.46] -// CHECK:STDOUT: %.loc34_36.6: %i32 = converted %.loc34_36.1, %.loc34_36.5 [template = constants.%.46] -// CHECK:STDOUT: %.loc34_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_39.3: = bound_method %.loc34_39.1, %.loc34_39.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc34_39.4: = specific_function %.loc34_39.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc34_39: init %i32 = call %.loc34_39.4(%.loc34_39.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc34_39.5: %i32 = value_of_initializer %int.convert_checked.loc34_39 [template = constants.%.37] -// CHECK:STDOUT: %.loc34_39.6: %i32 = converted %.loc34_39.1, %.loc34_39.5 [template = constants.%.37] -// CHECK:STDOUT: %int.left_shift.loc34: init %i32 = call %LeftShift.ref.loc34(%.loc34_36.6, %.loc34_39.6) [template = ] +// CHECK:STDOUT: %int_0.loc34: Core.IntLiteral = int_value 0 [template = constants.%int_0.2] +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %impl.elem0.loc34_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc34_36: = bound_method %int_0.loc34, %impl.elem0.loc34_36 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %Convert.specific_fn.loc34_36: = specific_function %Convert.bound.loc34_36, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.6] +// CHECK:STDOUT: %int.convert_checked.loc34_36: init %i32 = call %Convert.specific_fn.loc34_36(%int_0.loc34) [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc34_36.1: %i32 = value_of_initializer %int.convert_checked.loc34_36 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc34_36.2: %i32 = converted %int_0.loc34, %.loc34_36.1 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc34_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc34_39: = bound_method %int_32.loc34, %impl.elem0.loc34_39 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc34_39: = specific_function %Convert.bound.loc34_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc34_39: init %i32 = call %Convert.specific_fn.loc34_39(%int_32.loc34) [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc34_39.1: %i32 = value_of_initializer %int.convert_checked.loc34_39 [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc34_39.2: %i32 = converted %int_32.loc34, %.loc34_39.1 [template = constants.%int_32.2] +// CHECK:STDOUT: %int.left_shift.loc34: init %i32 = call %LeftShift.ref.loc34(%.loc34_36.2, %.loc34_39.2) [template = ] // CHECK:STDOUT: %.loc34_42.1: %i32 = value_of_initializer %int.left_shift.loc34 [template = ] // CHECK:STDOUT: %.loc34_42.2: %i32 = converted %int.left_shift.loc34, %.loc34_42.1 [template = ] // CHECK:STDOUT: %no_overflow_2: %i32 = bind_name no_overflow_2, %.loc34_42.2 // CHECK:STDOUT: %LeftShift.ref.loc40: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc40_31.1: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_1.loc40_31: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc40_41.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc40_41.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc40_41.3: = bound_method %.loc40_41.1, %.loc40_41.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc40_41.4: = specific_function %.loc40_41.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc40_41: init %i32 = call %.loc40_41.4(%.loc40_41.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc40_41.5: %i32 = value_of_initializer %int.convert_checked.loc40_41 [template = constants.%.30] -// CHECK:STDOUT: %.loc40_41.6: %i32 = converted %.loc40_41.1, %.loc40_41.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc40_41.6) [template = constants.%.50] -// CHECK:STDOUT: %.loc40_31.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc40_31.3: = bound_method %.loc40_31.1, %.loc40_31.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc40_31.4: = specific_function %.loc40_31.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %.loc40_31.4(%.loc40_31.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc40_31.5: %i32 = value_of_initializer %int.convert_checked.loc40_31 [template = constants.%.30] -// CHECK:STDOUT: %.loc40_31.6: %i32 = converted %.loc40_31.1, %.loc40_31.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc40_42.1: %i32 = value_of_initializer %int.snegate [template = constants.%.50] -// CHECK:STDOUT: %.loc40_42.2: %i32 = converted %int.snegate, %.loc40_42.1 [template = constants.%.50] -// CHECK:STDOUT: %int.left_shift.loc40: init %i32 = call %LeftShift.ref.loc40(%.loc40_31.6, %.loc40_42.2) [template = ] +// CHECK:STDOUT: %int_1.loc40_41: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc40_41: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc40_41: = bound_method %int_1.loc40_41, %impl.elem0.loc40_41 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc40_41: = specific_function %Convert.bound.loc40_41, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc40_41: init %i32 = call %Convert.specific_fn.loc40_41(%int_1.loc40_41) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc40_41.1: %i32 = value_of_initializer %int.convert_checked.loc40_41 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc40_41.2: %i32 = converted %int_1.loc40_41, %.loc40_41.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc40_41.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc40_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc40_31: = bound_method %int_1.loc40_31, %impl.elem0.loc40_31 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc40_31: = specific_function %Convert.bound.loc40_31, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %Convert.specific_fn.loc40_31(%int_1.loc40_31) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc40_31.1: %i32 = value_of_initializer %int.convert_checked.loc40_31 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc40_31.2: %i32 = converted %int_1.loc40_31, %.loc40_31.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc40_42.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1] +// CHECK:STDOUT: %.loc40_42.2: %i32 = converted %int.snegate, %.loc40_42.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.left_shift.loc40: init %i32 = call %LeftShift.ref.loc40(%.loc40_31.2, %.loc40_42.2) [template = ] // CHECK:STDOUT: %.loc40_44.1: %i32 = value_of_initializer %int.left_shift.loc40 [template = ] // CHECK:STDOUT: %.loc40_44.2: %i32 = converted %int.left_shift.loc40, %.loc40_44.1 [template = ] // CHECK:STDOUT: %negative: %i32 = bind_name negative, %.loc40_44.2 diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 9708c0d785b4e..c4c683dc10509 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -31,10 +31,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_less.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] @@ -42,30 +42,30 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.37: bool = bool_literal true [template] -// CHECK:STDOUT: %.38: bool = bool_literal false [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -99,14 +99,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_12: init type = call constants.%Int(%.loc2_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_12.2: type = value_of_initializer %int.make_type_signed.loc2_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_12.3: type = converted %int.make_type_signed.loc2_12, %.loc2_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_20: init type = call constants.%Int(%.loc2_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_20.2: type = value_of_initializer %int.make_type_signed.loc2_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_20.3: type = converted %int.make_type_signed.loc2_20, %.loc2_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_12: init type = call constants.%Int(%int_32.loc2_12) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %int.make_type_signed.loc2_12 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_12.2: type = converted %int.make_type_signed.loc2_12, %.loc2_12.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_20: init type = call constants.%Int(%int_32.loc2_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %int.make_type_signed.loc2_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_20.2: type = converted %int.make_type_signed.loc2_20, %.loc2_20.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type, %.loc2_28.1 [template = bool] @@ -123,14 +123,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%.loc3_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3_14, %.loc3_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%.loc3_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.3: type = converted %int.make_type_signed.loc3_22, %.loc3_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -159,14 +159,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed.loc16_19, %.loc16_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%.loc16_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.3: type = converted %int.make_type_signed.loc16_27, %.loc16_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,19 +180,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Less(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.less"; @@ -203,23 +203,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc9_21.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_21.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_21.3: = bound_method %.loc9_21.1, %.loc9_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_21.4: = specific_function %.loc9_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_21: init %i32 = call %.loc9_21.4(%.loc9_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_21.5: %i32 = value_of_initializer %int.convert_checked.loc9_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_21.6: %i32 = converted %.loc9_21.1, %.loc9_21.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_24.3: = bound_method %.loc9_24.1, %.loc9_24.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_24.4: = specific_function %.loc9_24.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_24: init %i32 = call %.loc9_24.4(%.loc9_24.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_24.5: %i32 = value_of_initializer %int.convert_checked.loc9_24 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_24.6: %i32 = converted %.loc9_24.1, %.loc9_24.5 [template = constants.%.36] -// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21.6, %.loc9_24.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_21: = bound_method %int_1.loc9, %impl.elem0.loc9_21 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_21: = specific_function %Convert.bound.loc9_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_21: init %i32 = call %Convert.specific_fn.loc9_21(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_21.1: %i32 = value_of_initializer %int.convert_checked.loc9_21 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_21.2: %i32 = converted %int_1.loc9, %.loc9_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_24: = bound_method %int_2, %impl.elem0.loc9_24 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_24: = specific_function %Convert.bound.loc9_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_24: init %i32 = call %Convert.specific_fn.loc9_24(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.convert_checked.loc9_24 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int_2, %.loc9_24.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21.2, %.loc9_24.2) [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,23 +234,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_22.3: = bound_method %.loc10_22.1, %.loc10_22.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_22.4: = specific_function %.loc10_22.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_22: init %i32 = call %.loc10_22.4(%.loc10_22.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_22.5: %i32 = value_of_initializer %int.convert_checked.loc10_22 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_22.6: %i32 = converted %.loc10_22.1, %.loc10_22.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22.6, %.loc10_25.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc10_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc10_25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_22: = bound_method %int_1.loc10_22, %impl.elem0.loc10_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22: = specific_function %Convert.bound.loc10_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_22: init %i32 = call %Convert.specific_fn.loc10_22(%int_1.loc10_22) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %int.convert_checked.loc10_22 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_1.loc10_22, %.loc10_22.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_25: = bound_method %int_1.loc10_25, %impl.elem0.loc10_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_25: = specific_function %Convert.bound.loc10_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %Convert.specific_fn.loc10_25(%int_1.loc10_25) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_25.2: %i32 = converted %int_1.loc10_25, %.loc10_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22.2, %.loc10_25.2) [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%false] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -265,23 +265,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.42] -// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22.6, %.loc11_25.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_22: = bound_method %int_1.loc11, %impl.elem0.loc11_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_22: = specific_function %Convert.bound.loc11_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %Convert.specific_fn.loc11_22(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_22.1: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_22.2: %i32 = converted %int_1.loc11, %.loc11_22.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_25: = bound_method %int_0.loc11, %impl.elem0.loc11_25 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_25: = specific_function %Convert.bound.loc11_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %Convert.specific_fn.loc11_25(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_0.loc11, %.loc11_25.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22.2, %.loc11_25.2) [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -297,26 +297,26 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_28: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_28.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.42] -// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.42] -// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_29.2, %.loc12_32.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_28: = bound_method %int_1.loc12, %impl.elem0.loc12_28 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_28: = specific_function %Convert.bound.loc12_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_28: init %i32 = call %Convert.specific_fn.loc12_28(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int_1.loc12, %.loc12_28.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_28.2) [template = constants.%int_-1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_0.loc12, %impl.elem0.loc12_32 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_32.1: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_32.2: %i32 = converted %int_0.loc12, %.loc12_32.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_29.2, %.loc12_32.2) [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -331,27 +331,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc13_22.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_32.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_32.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc13_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_22.3: = bound_method %.loc13_22.1, %.loc13_22.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_22.4: = specific_function %.loc13_22.3, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %.loc13_22.4(%.loc13_22.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc13_22.5: %i32 = value_of_initializer %int.convert_checked.loc13_22 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_22.6: %i32 = converted %.loc13_22.1, %.loc13_22.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] -// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.6, %.loc13_33.2) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_32: = bound_method %int_1.loc13, %impl.elem0.loc13_32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_32: = specific_function %Convert.bound.loc13_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %Convert.specific_fn.loc13_32(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_32.1: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_32.2: %i32 = converted %int_1.loc13, %.loc13_32.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_32.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc13_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_22: = bound_method %int_0.loc13, %impl.elem0.loc13_22 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_22: = specific_function %Convert.bound.loc13_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %Convert.specific_fn.loc13_22(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_22.1: %i32 = value_of_initializer %int.convert_checked.loc13_22 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_22.2: %i32 = converted %int_0.loc13, %.loc13_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.2, %.loc13_33.2) [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index da25116e33ba0..70c317b5007c3 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -31,10 +31,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_less_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] @@ -42,30 +42,30 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.37: bool = bool_literal true [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.42: bool = bool_literal false [template] -// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -99,14 +99,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%.loc2_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.3: type = converted %int.make_type_signed.loc2_14, %.loc2_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%.loc2_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.3: type = converted %int.make_type_signed.loc2_22, %.loc2_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type, %.loc2_30.1 [template = bool] @@ -123,14 +123,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%.loc3_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3_14, %.loc3_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%.loc3_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.3: type = converted %int.make_type_signed.loc3_22, %.loc3_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -159,14 +159,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed.loc16_19, %.loc16_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%.loc16_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.3: type = converted %int.make_type_signed.loc16_27, %.loc16_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,19 +180,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @LessEq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.less_eq"; @@ -203,23 +203,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_26.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_26.3: = bound_method %.loc9_26.1, %.loc9_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_26.4: = specific_function %.loc9_26.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i32 = call %.loc9_26.4(%.loc9_26.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_26.5: %i32 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_26.6: %i32 = converted %.loc9_26.1, %.loc9_26.5 [template = constants.%.36] -// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23.6, %.loc9_26.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_1.loc9, %impl.elem0.loc9_23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_23.1: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_23.2: %i32 = converted %int_1.loc9, %.loc9_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_26: = bound_method %int_2, %impl.elem0.loc9_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_26: = specific_function %Convert.bound.loc9_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i32 = call %Convert.specific_fn.loc9_26(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_26.1: %i32 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_26.2: %i32 = converted %int_2, %.loc9_26.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23.2, %.loc9_26.2) [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,23 +234,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc10_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_23.3: = bound_method %.loc10_23.1, %.loc10_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_23.4: = specific_function %.loc10_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %.loc10_23.4(%.loc10_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_23.5: %i32 = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_23.6: %i32 = converted %.loc10_23.1, %.loc10_23.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] -// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23.6, %.loc10_26.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%.37] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc10_26: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_23: = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_23: = specific_function %Convert.bound.loc10_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %Convert.specific_fn.loc10_23(%int_1.loc10_23) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int_1.loc10_23, %.loc10_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_1.loc10_26, %impl.elem0.loc10_26 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_1.loc10_26) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_1.loc10_26, %.loc10_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23.2, %.loc10_26.2) [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%true] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -265,23 +265,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc11_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.41] -// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.41] -// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%.42] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_24: = bound_method %int_1.loc11, %impl.elem0.loc11_24 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_24: = specific_function %Convert.bound.loc11_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %Convert.specific_fn.loc11_24(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int_1.loc11, %.loc11_24.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27: = bound_method %int_0.loc11, %impl.elem0.loc11_27 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27: = specific_function %Convert.bound.loc11_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %Convert.specific_fn.loc11_27(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.1: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_27.2: %i32 = converted %int_0.loc11, %.loc11_27.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24.2, %.loc11_27.2) [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%false] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -297,26 +297,26 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_30.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_30.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_30.3: = bound_method %.loc12_30.1, %.loc12_30.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_30.4: = specific_function %.loc12_30.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_30: init %i32 = call %.loc12_30.4(%.loc12_30.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_30.5: %i32 = value_of_initializer %int.convert_checked.loc12_30 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_30.6: %i32 = converted %.loc12_30.1, %.loc12_30.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_30.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.41] -// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.41] -// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_31.2, %.loc12_34.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.37] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_30: = bound_method %int_1.loc12, %impl.elem0.loc12_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_30: = specific_function %Convert.bound.loc12_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_30: init %i32 = call %Convert.specific_fn.loc12_30(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc12_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int_1.loc12, %.loc12_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_30.2) [template = constants.%int_-1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_0.loc12, %impl.elem0.loc12_34 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_34: = specific_function %Convert.bound.loc12_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %Convert.specific_fn.loc12_34(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_0.loc12, %.loc12_34.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_31.2, %.loc12_34.2) [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%true] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -331,27 +331,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.33] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] -// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.6, %.loc13_35.2) [template = constants.%.42] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.42] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_1.loc13, %impl.elem0.loc13_34 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_34: = specific_function %Convert.bound.loc13_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %Convert.specific_fn.loc13_34(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_1.loc13, %.loc13_34.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int_0.loc13, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %Convert.specific_fn.loc13_24(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int_0.loc13, %.loc13_24.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.2, %.loc13_35.2) [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%false] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index ddaccd2a8ed84..85c2d8b295e53 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -145,12 +145,12 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %i13: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] +// CHECK:STDOUT: %i13: type = int_type signed, %int_13 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] @@ -189,13 +189,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%int_64.loc6_13) [template = constants.%i64] // CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64] // CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64] // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc6_25: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc6_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%int_64.loc6_25) [template = constants.%i64] // CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_27 [template = constants.%i64] // CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_27, %.loc6_27.1 [template = constants.%i64] // CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 @@ -210,13 +210,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.param_patt: %i13 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%i13] +// CHECK:STDOUT: %int_13.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%int_13.loc10_13) [template = constants.%i13] // CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13] // CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13] // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc10_25: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%i13] +// CHECK:STDOUT: %int_13.loc10_25: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%int_13.loc10_25) [template = constants.%i13] // CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_27 [template = constants.%i13] // CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_27, %.loc10_27.1 [template = constants.%i13] // CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 @@ -296,20 +296,20 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] // CHECK:STDOUT: %UseF: %UseF.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %i13: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] +// CHECK:STDOUT: %i13: type = int_type signed, %int_13 [template] // CHECK:STDOUT: %UseG.type: type = fn_type @UseG [template] // CHECK:STDOUT: %UseG: %UseG.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 24 [template] -// CHECK:STDOUT: %i24: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [template] +// CHECK:STDOUT: %i24: type = int_type signed, %int_24 [template] // CHECK:STDOUT: %UseSymbolic.type: type = fn_type @UseSymbolic [template] // CHECK:STDOUT: %UseSymbolic: %UseSymbolic.type = struct_value () [template] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] @@ -317,7 +317,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.4: = specific_function %Symbolic, @Symbolic(%.3) [template] +// CHECK:STDOUT: %Symbolic.specific_fn: = specific_function %Symbolic, @Symbolic(%int_24) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -353,13 +353,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%.loc7_16) [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%int_64.loc7_16) [template = constants.%i64] // CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64] // CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64] // CHECK:STDOUT: %Int.ref.loc7_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc7_28: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%.loc7_28) [template = constants.%i64] +// CHECK:STDOUT: %int_64.loc7_28: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%int_64.loc7_28) [template = constants.%i64] // CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i64] // CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i64] // CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 @@ -374,13 +374,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.param_patt: %i13 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%.loc11_16) [template = constants.%i13] +// CHECK:STDOUT: %int_13.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%int_13.loc11_16) [template = constants.%i13] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13] // CHECK:STDOUT: %Int.ref.loc11_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%.loc11_28) [template = constants.%i13] +// CHECK:STDOUT: %int_13.loc11_28: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%int_13.loc11_28) [template = constants.%i13] // CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i13] // CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i13] // CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 @@ -395,13 +395,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.param_patt: %i24 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%.loc15_23) [template = constants.%i24] +// CHECK:STDOUT: %int_24.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%int_24] +// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%int_24.loc15_23) [template = constants.%i24] // CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24] // CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24] // CHECK:STDOUT: %Int.ref.loc15_31: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc15_35: Core.IntLiteral = int_value 24 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%.loc15_35) [template = constants.%i24] +// CHECK:STDOUT: %int_24.loc15_35: Core.IntLiteral = int_value 24 [template = constants.%int_24] +// CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%int_24.loc15_35) [template = constants.%i24] // CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_37 [template = constants.%i24] // CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_37, %.loc15_37.1 [template = constants.%i24] // CHECK:STDOUT: %n.param: %i24 = value_param runtime_param0 @@ -440,10 +440,10 @@ var m: Int(1000000000); // CHECK:STDOUT: fn @UseSymbolic(%n.param_patt: %i24) -> %i24 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Symbolic.ref: %Symbolic.type = name_ref Symbolic, imports.%import_ref.5 [template = constants.%Symbolic] -// CHECK:STDOUT: %.loc16_19: Core.IntLiteral = int_value 24 [template = constants.%.3] +// CHECK:STDOUT: %int_24.loc16: Core.IntLiteral = int_value 24 [template = constants.%int_24] // CHECK:STDOUT: %n.ref: %i24 = name_ref n, %n -// CHECK:STDOUT: %.loc16_10: = specific_function %Symbolic.ref, @Symbolic(constants.%.3) [template = constants.%.4] -// CHECK:STDOUT: %Symbolic.call: init %i24 = call %.loc16_10(%n.ref) +// CHECK:STDOUT: %Symbolic.specific_fn: = specific_function %Symbolic.ref, @Symbolic(constants.%int_24) [template = constants.%Symbolic.specific_fn] +// CHECK:STDOUT: %Symbolic.call: init %i24 = call %Symbolic.specific_fn(%n.ref) // CHECK:STDOUT: %.loc16_25.1: %i24 = value_of_initializer %Symbolic.call // CHECK:STDOUT: %.loc16_25.2: %i24 = converted %Symbolic.call, %.loc16_25.1 // CHECK:STDOUT: return %.loc16_25.2 @@ -465,9 +465,9 @@ var m: Int(1000000000); // CHECK:STDOUT: %iN => constants.%iN // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Symbolic(constants.%.3) { -// CHECK:STDOUT: %N => constants.%.3 -// CHECK:STDOUT: %N.patt => constants.%.3 +// CHECK:STDOUT: specific @Symbolic(constants.%int_24) { +// CHECK:STDOUT: %N => constants.%int_24 +// CHECK:STDOUT: %N.patt => constants.%int_24 // CHECK:STDOUT: %iN => constants.%i24 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -478,7 +478,7 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -500,8 +500,8 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc10_12: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc10_12) [template = ] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_0) [template = ] // CHECK:STDOUT: %.loc10_13.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc10_13.2: type = converted %int.make_type_signed, %.loc10_13.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n @@ -513,30 +513,30 @@ var m: Int(1000000000); // CHECK:STDOUT: --- fail_negative_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type.1: type = fn_type @Int.1 [template] // CHECK:STDOUT: %Int.1: %Int.type.1 = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Int.type.2: type = fn_type @Int.2 [template] // CHECK:STDOUT: %Int.2: %Int.type.2 = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -566,14 +566,14 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int.1(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int.1(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int.1(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int.1(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -581,23 +581,23 @@ var m: Int(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Int.ref: %Int.type.2 = name_ref Int, imports.%import_ref.2 [template = constants.%Int.2] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_19.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_19.3: = bound_method %.loc12_19.1, %.loc12_19.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_19.4: = specific_function %.loc12_19.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %.loc12_19.4(%.loc12_19.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_19.5: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_19.6: %i32 = converted %.loc12_19.1, %.loc12_19.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_20.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_20.2: = bound_method %int.snegate, %.loc12_20.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_20.3: = specific_function %.loc12_20.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc12_20.5: %i32 = converted %int.snegate, %.loc12_20.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_20: init Core.IntLiteral = call %.loc12_20.3(%.loc12_20.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_20.7: Core.IntLiteral = converted %int.snegate, %.loc12_20.6 [template = constants.%.34] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_20.7) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_19: = bound_method %int_1, %impl.elem0.loc12_19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_19: = specific_function %Convert.bound.loc12_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %Convert.specific_fn.loc12_19(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1, %.loc12_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int.snegate, %impl.elem0.loc12_20 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int.snegate, %.loc12_20.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc12_20: init Core.IntLiteral = call %Convert.specific_fn.loc12_20(%.loc12_20.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc12_20.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc12_20.4: Core.IntLiteral = converted %int.snegate, %.loc12_20.3 [template = constants.%int_-1.2] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_20.4) [template = ] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n @@ -613,7 +613,7 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1000000000 [template] +// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -635,8 +635,8 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %.loc9_12: Core.IntLiteral = int_value 1000000000 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc9_12) [template = ] +// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template = constants.%int_1000000000] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_1000000000) [template = ] // CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc9_22.2: type = converted %int.make_type_signed, %.loc9_22.1 [template = ] // CHECK:STDOUT: %m.var: ref = var m diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 73754962da7b8..2cde4c551b125 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -126,12 +126,12 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %u13: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] +// CHECK:STDOUT: %u13: type = int_type unsigned, %int_13 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] @@ -170,13 +170,13 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%int_64.loc6_14) [template = constants.%u64] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64] // CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64] // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc6_27: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%u64] +// CHECK:STDOUT: %int_64.loc6_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%int_64.loc6_27) [template = constants.%u64] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_29 [template = constants.%u64] // CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_29, %.loc6_29.1 [template = constants.%u64] // CHECK:STDOUT: %n.param: %u64 = value_param runtime_param0 @@ -191,13 +191,13 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.param_patt: %u13 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%u13] +// CHECK:STDOUT: %int_13.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%int_13.loc10_14) [template = constants.%u13] // CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13] // CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13] // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_27: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%u13] +// CHECK:STDOUT: %int_13.loc10_27: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%int_13.loc10_27) [template = constants.%u13] // CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_29 [template = constants.%u13] // CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_29, %.loc10_29.1 [template = constants.%u13] // CHECK:STDOUT: %n.param: %u13 = value_param runtime_param0 @@ -277,7 +277,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -299,8 +299,8 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_13: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc10_13) [template = ] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%int_0) [template = ] // CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_unsigned, %.loc10_14.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n @@ -312,30 +312,30 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- fail_negative_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -365,14 +365,14 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -380,23 +380,23 @@ var m: UInt(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_20.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_20.3: = bound_method %.loc12_20.1, %.loc12_20.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_20.4: = specific_function %.loc12_20.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %.loc12_20.4(%.loc12_20.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_20.5: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_20.6: %i32 = converted %.loc12_20.1, %.loc12_20.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_21.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_21.2: = bound_method %int.snegate, %.loc12_21.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_21.3: = specific_function %.loc12_21.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc12_21.5: %i32 = converted %int.snegate, %.loc12_21.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init Core.IntLiteral = call %.loc12_21.3(%.loc12_21.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_21.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_21.7: Core.IntLiteral = converted %int.snegate, %.loc12_21.6 [template = constants.%.34] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_21.7) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int_1, %impl.elem0.loc12_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %Convert.specific_fn.loc12_20(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int_1, %.loc12_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.2) [template = constants.%int_-1.1] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int.snegate, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.snegate, %.loc12_21.1 [template = constants.%int_-1.1] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init Core.IntLiteral = call %Convert.specific_fn.loc12_21(%.loc12_21.2) [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc12_21.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%int_-1.2] +// CHECK:STDOUT: %.loc12_21.4: Core.IntLiteral = converted %int.snegate, %.loc12_21.3 [template = constants.%int_-1.2] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_21.4) [template = ] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_unsigned, %.loc12_22.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n @@ -412,7 +412,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1000000000 [template] +// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -434,8 +434,8 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %.loc9_13: Core.IntLiteral = int_value 1000000000 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc9_13) [template = ] +// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template = constants.%int_1000000000] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%int_1000000000) [template = ] // CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = ] // CHECK:STDOUT: %m.var: ref = var m diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index 98be3f18f8de1..6118640a869a6 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -27,34 +27,34 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_neq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] // CHECK:STDOUT: %Neq: %Neq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: bool = bool_literal false [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: bool = bool_literal true [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -87,14 +87,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type, %.loc2_27.1 [template = bool] @@ -128,14 +128,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%.loc12_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.3: type = converted %int.make_type_signed.loc12_19, %.loc12_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%.loc12_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_signed.loc12_27, %.loc12_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%int_32.loc12_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_signed.loc12_27, %.loc12_27.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -149,19 +149,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Neq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.neq"; @@ -170,23 +170,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc8_21.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_21.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_21.3: = bound_method %.loc8_21.1, %.loc8_21.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_21.4: = specific_function %.loc8_21.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_21: init %i32 = call %.loc8_21.4(%.loc8_21.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_21.5: %i32 = value_of_initializer %int.convert_checked.loc8_21 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_21.6: %i32 = converted %.loc8_21.1, %.loc8_21.5 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_24.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_24.3: = bound_method %.loc8_24.1, %.loc8_24.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_24.4: = specific_function %.loc8_24.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_24: init %i32 = call %.loc8_24.4(%.loc8_24.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_24.5: %i32 = value_of_initializer %int.convert_checked.loc8_24 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_24.6: %i32 = converted %.loc8_24.1, %.loc8_24.5 [template = constants.%.32] -// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21.6, %.loc8_24.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%.33] +// CHECK:STDOUT: %int_1.loc8_21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_1.loc8_24: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc8_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_21: = bound_method %int_1.loc8_21, %impl.elem0.loc8_21 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_21: = specific_function %Convert.bound.loc8_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_21: init %i32 = call %Convert.specific_fn.loc8_21(%int_1.loc8_21) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %int.convert_checked.loc8_21 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int_1.loc8_21, %.loc8_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc8_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_24: = bound_method %int_1.loc8_24, %impl.elem0.loc8_24 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_24: = specific_function %Convert.bound.loc8_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_24: init %i32 = call %Convert.specific_fn.loc8_24(%int_1.loc8_24) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_24.1: %i32 = value_of_initializer %int.convert_checked.loc8_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_24.2: %i32 = converted %int_1.loc8_24, %.loc8_24.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21.2, %.loc8_24.2) [template = constants.%false] +// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%false] +// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%false] // CHECK:STDOUT: if %.loc8_14.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -201,23 +201,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc8_14.3: type = block_arg !if.expr.result.loc8 [template = constants.%False] // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.37] -// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%.38] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_20: = bound_method %int_1.loc9, %impl.elem0.loc9_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_20: = specific_function %Convert.bound.loc9_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %Convert.specific_fn.loc9_20(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_1.loc9, %.loc9_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_2, %impl.elem0.loc9_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_23.1: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_23.2: %i32 = converted %int_2, %.loc9_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20.2, %.loc9_23.2) [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%true] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%true] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 83bb6895e2b00..53e4214bdf2f2 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -22,34 +22,34 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_or.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 14 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] +// CHECK:STDOUT: %int_14.1: %i32 = int_value 14 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 14 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_14.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_14.2: Core.IntLiteral = int_value 14 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_14.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,18 +80,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%.loc2_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.3: type = converted %int.make_type_signed.loc2_10, %.loc2_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%.loc2_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.3: type = converted %int.make_type_signed.loc2_18, %.loc2_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%.loc2_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.3: type = converted %int.make_type_signed.loc2_26, %.loc2_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%int_32.loc2_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_signed.loc2_10, %.loc2_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -99,44 +99,44 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_19.3: = bound_method %.loc4_19.1, %.loc4_19.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_19.4: = specific_function %.loc4_19.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.4(%.loc4_19.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.6: %i32 = converted %.loc4_19.1, %.loc4_19.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_25.2: = bound_method %int.or, %.loc4_25.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_25.3: = specific_function %.loc4_25.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_25.4: %i32 = value_of_initializer %int.or [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25.5: %i32 = converted %int.or, %.loc4_25.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %.loc4_25.3(%.loc4_25.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25.7: Core.IntLiteral = converted %int.or, %.loc4_25.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26: type = array_type %.loc4_25.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 14 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_12, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_19: = specific_function %Convert.bound.loc4_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %Convert.specific_fn.loc4_19(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_19.1: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_19.2: %i32 = converted %int_12, %.loc4_19.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_10, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_10, %.loc4_23.1 [template = constants.%int_10.2] +// CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.2, %.loc4_23.2) [template = constants.%int_14.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_25: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_25: = bound_method %int.or, %impl.elem0.loc4_25 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_25: = specific_function %Convert.bound.loc4_25, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_25.1: %i32 = value_of_initializer %int.or [template = constants.%int_14.1] +// CHECK:STDOUT: %.loc4_25.2: %i32 = converted %int.or, %.loc4_25.1 [template = constants.%int_14.1] +// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %Convert.specific_fn.loc4_25(%.loc4_25.2) [template = constants.%int_14.2] +// CHECK:STDOUT: %.loc4_25.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%int_14.2] +// CHECK:STDOUT: %.loc4_25.4: Core.IntLiteral = converted %int.or, %.loc4_25.3 [template = constants.%int_14.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_25.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [template = constants.%int_14.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_14, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -145,18 +145,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index e22f10126ff12..b2b06e1c04e52 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -67,34 +67,34 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: --- int_right_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 22 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_22.1: Core.IntLiteral = int_value 22 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 22 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_22.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_22.2: %i32 = int_value 22 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_5.1: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_5.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_5.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_5.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -125,18 +125,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%.loc2_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.3: type = converted %int.make_type_signed.loc2_18, %.loc2_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%.loc2_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.3: type = converted %int.make_type_signed.loc2_26, %.loc2_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_34: init type = call constants.%Int(%.loc2_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_34.2: type = value_of_initializer %int.make_type_signed.loc2_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_34.3: type = converted %int.make_type_signed.loc2_34, %.loc2_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_34: init type = call constants.%Int(%int_32.loc2_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_34.1: type = value_of_initializer %int.make_type_signed.loc2_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_34.2: type = converted %int.make_type_signed.loc2_34, %.loc2_34.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -144,44 +144,44 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 22 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_31.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_27.3: = bound_method %.loc4_27.1, %.loc4_27.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_27.4: = specific_function %.loc4_27.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %.loc4_27.4(%.loc4_27.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %.loc4_27.1, %.loc4_27.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_31.1, %.loc4_31.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %.loc4_31.4(%.loc4_31.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_31.5: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_31.6: %i32 = converted %.loc4_31.1, %.loc4_31.5 [template = constants.%.33] -// CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.6, %.loc4_31.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_32.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_32.2: = bound_method %int.right_shift, %.loc4_32.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_32.3: = specific_function %.loc4_32.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_32.4: %i32 = value_of_initializer %int.right_shift [template = constants.%.34] -// CHECK:STDOUT: %.loc4_32.5: %i32 = converted %int.right_shift, %.loc4_32.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %.loc4_32.3(%.loc4_32.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_32.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_32.7: Core.IntLiteral = converted %int.right_shift, %.loc4_32.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_33: type = array_type %.loc4_32.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 5 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [template = constants.%int_22.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int_22, %impl.elem0.loc4_27 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_27: = specific_function %Convert.bound.loc4_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %Convert.specific_fn.loc4_27(%int_22) [template = constants.%int_22.2] +// CHECK:STDOUT: %.loc4_27.1: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_22.2] +// CHECK:STDOUT: %.loc4_27.2: %i32 = converted %int_22, %.loc4_27.1 [template = constants.%int_22.2] +// CHECK:STDOUT: %impl.elem0.loc4_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_31: = bound_method %int_2, %impl.elem0.loc4_31 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_31: = specific_function %Convert.bound.loc4_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %Convert.specific_fn.loc4_31(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_31.1: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_31.2: %i32 = converted %int_2, %.loc4_31.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.2, %.loc4_31.2) [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int.right_shift, %impl.elem0.loc4_32 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_32: = specific_function %Convert.bound.loc4_32, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_32.1: %i32 = value_of_initializer %int.right_shift [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc4_32.2: %i32 = converted %int.right_shift, %.loc4_32.1 [template = constants.%int_5.1] +// CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %Convert.specific_fn.loc4_32(%.loc4_32.2) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %int.right_shift, %.loc4_32.3 [template = constants.%int_5.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_32.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_5, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -190,18 +190,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -226,56 +226,56 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- arith_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.40: %i32 = int_value -10 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.42: = bound_method %.41, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.45: %i32 = int_value -3 [template] -// CHECK:STDOUT: %.46: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.47: = bound_method %.46, %Convert.15 [template] -// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.50: type = array_type %.49, %i32 [template] -// CHECK:STDOUT: %.51: type = ptr_type %.50 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.2, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %array_type.1 [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] +// CHECK:STDOUT: %int_-10: %i32 = int_value -10 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_-3: %i32 = int_value -3 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %array_type.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -306,18 +306,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_18: init type = call constants.%Int(%.loc6_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.2: type = value_of_initializer %int.make_type_signed.loc6_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.3: type = converted %int.make_type_signed.loc6_18, %.loc6_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_26: init type = call constants.%Int(%.loc6_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26.2: type = value_of_initializer %int.make_type_signed.loc6_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26.3: type = converted %int.make_type_signed.loc6_26, %.loc6_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_34: init type = call constants.%Int(%.loc6_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = value_of_initializer %int.make_type_signed.loc6_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.3: type = converted %int.make_type_signed.loc6_34, %.loc6_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_18: init type = call constants.%Int(%int_32.loc6_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_signed.loc6_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_signed.loc6_18, %.loc6_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_26: init type = call constants.%Int(%int_32.loc6_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_26.1: type = value_of_initializer %int.make_type_signed.loc6_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_26.2: type = converted %int.make_type_signed.loc6_26, %.loc6_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_34: init type = call constants.%Int(%int_32.loc6_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6_34, %.loc6_34.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -331,111 +331,111 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%.loc7_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_14.2: type = value_of_initializer %int.make_type_signed.loc7_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_14.3: type = converted %int.make_type_signed.loc7_14, %.loc7_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_22: init type = call constants.%Int(%.loc7_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %int.make_type_signed.loc7_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.3: type = converted %int.make_type_signed.loc7_22, %.loc7_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%int_32.loc7_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_signed.loc7_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_signed.loc7_14, %.loc7_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_22: init type = call constants.%Int(%int_32.loc7_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_22.1: type = value_of_initializer %int.make_type_signed.loc7_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_22.2: type = converted %int.make_type_signed.loc7_22, %.loc7_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_12.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] // 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.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_42.3: = bound_method %.loc10_42.1, %.loc10_42.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_42.4: = specific_function %.loc10_42.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %.loc10_42.4(%.loc10_42.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_42.5: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_42.6: %i32 = converted %.loc10_42.1, %.loc10_42.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc10_43: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_46.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.snegate.loc10_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int.snegate.loc10_43, %.loc10_43.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_46.3: = bound_method %.loc10_46.1, %.loc10_46.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_46.4: = specific_function %.loc10_46.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %.loc10_46.4(%.loc10_46.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_46.5: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_46.6: %i32 = converted %.loc10_46.1, %.loc10_46.5 [template = constants.%.29] -// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_43.2, %.loc10_46.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_47.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_47.2: %i32 = converted %int.right_shift.loc10, %.loc10_47.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc10_48: init %i32 = call %Negate.ref.loc10_17(%.loc10_47.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_12.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_12.3: type = converted %int.make_type_signed.loc10, %.loc10_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_48.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc10_48.2: = bound_method %int.snegate.loc10_48, %.loc10_48.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc10_48.3: = specific_function %.loc10_48.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_48.4: %i32 = value_of_initializer %int.snegate.loc10_48 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_48.5: %i32 = converted %int.snegate.loc10_48, %.loc10_48.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc10_48: init Core.IntLiteral = call %.loc10_48.3(%.loc10_48.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc10_48.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_48 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_48.7: Core.IntLiteral = converted %int.snegate.loc10_48, %.loc10_48.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_49: type = array_type %.loc10_48.7, %i32 [template = constants.%.34] -// CHECK:STDOUT: %arr1.var: ref %.34 = var arr1 -// CHECK:STDOUT: %arr1: ref %.34 = bind_name arr1, %arr1.var -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed.loc11, %.loc11_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20: type = array_type %.loc11_19, %i32 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_21: type = ptr_type %.34 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_12.1) [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc10_42: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_42: = bound_method %int_1.loc10_42, %impl.elem0.loc10_42 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_42: = specific_function %Convert.bound.loc10_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %Convert.specific_fn.loc10_42(%int_1.loc10_42) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_42.1: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_42.2: %i32 = converted %int_1.loc10_42, %.loc10_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc10_43: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.2) [template = constants.%int_-1] +// CHECK:STDOUT: %int_1.loc10_46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.snegate.loc10_43 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int.snegate.loc10_43, %.loc10_43.1 [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc10_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_46: = bound_method %int_1.loc10_46, %impl.elem0.loc10_46 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_46: = specific_function %Convert.bound.loc10_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %Convert.specific_fn.loc10_46(%int_1.loc10_46) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_46.1: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_46.2: %i32 = converted %int_1.loc10_46, %.loc10_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_43.2, %.loc10_46.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc10_47.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc10_47.2: %i32 = converted %int.right_shift.loc10, %.loc10_47.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.snegate.loc10_48: init %i32 = call %Negate.ref.loc10_17(%.loc10_47.2) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_12.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_signed.loc10, %.loc10_12.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc10_48: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc10_48: = bound_method %int.snegate.loc10_48, %impl.elem0.loc10_48 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_48: = specific_function %Convert.bound.loc10_48, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc10_48.1: %i32 = value_of_initializer %int.snegate.loc10_48 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_48.2: %i32 = converted %int.snegate.loc10_48, %.loc10_48.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc10_48: init Core.IntLiteral = call %Convert.specific_fn.loc10_48(%.loc10_48.2) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc10_48.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_48 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc10_48.4: Core.IntLiteral = converted %int.snegate.loc10_48, %.loc10_48.3 [template = constants.%int_1.1] +// CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_48.4, %i32 [template = constants.%array_type.1] +// CHECK:STDOUT: %arr1.var: ref %array_type.1 = var arr1 +// CHECK:STDOUT: %arr1: ref %array_type.1 = bind_name arr1, %arr1.var +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc11: type = array_type %int_1.loc11, %i32 [template = constants.%array_type.1] +// CHECK:STDOUT: %ptr.loc11: type = ptr_type %array_type.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref.loc14_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 10 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.39] -// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.39] -// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.39] -// CHECK:STDOUT: %int.snegate.loc14_44: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc14_47.1: Core.IntLiteral = int_value 2 [template = constants.%.41] -// CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.snegate.loc14_44 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_44.2: %i32 = converted %int.snegate.loc14_44, %.loc14_44.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_47.3: = bound_method %.loc14_47.1, %.loc14_47.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc14_47.4: = specific_function %.loc14_47.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %.loc14_47.4(%.loc14_47.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc14_47.5: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%.44] -// CHECK:STDOUT: %.loc14_47.6: %i32 = converted %.loc14_47.1, %.loc14_47.5 [template = constants.%.44] -// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_44.2, %.loc14_47.6) [template = constants.%.45] -// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.right_shift.loc14, %.loc14_48.1 [template = constants.%.45] -// CHECK:STDOUT: %int.snegate.loc14_49: init %i32 = call %Negate.ref.loc14_17(%.loc14_48.2) [template = constants.%.46] -// CHECK:STDOUT: %.loc14_12.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_12.3: type = converted %int.make_type_signed.loc14, %.loc14_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_49.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_49.2: = bound_method %int.snegate.loc14_49, %.loc14_49.1 [template = constants.%.47] -// CHECK:STDOUT: %.loc14_49.3: = specific_function %.loc14_49.2, @Convert.4(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %.loc14_49.4: %i32 = value_of_initializer %int.snegate.loc14_49 [template = constants.%.46] -// CHECK:STDOUT: %.loc14_49.5: %i32 = converted %int.snegate.loc14_49, %.loc14_49.4 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc14_49: init Core.IntLiteral = call %.loc14_49.3(%.loc14_49.5) [template = constants.%.49] -// CHECK:STDOUT: %.loc14_49.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_49 [template = constants.%.49] -// CHECK:STDOUT: %.loc14_49.7: Core.IntLiteral = converted %int.snegate.loc14_49, %.loc14_49.6 [template = constants.%.49] -// CHECK:STDOUT: %.loc14_50: type = array_type %.loc14_49.7, %i32 [template = constants.%.50] -// CHECK:STDOUT: %arr2.var: ref %.50 = var arr2 -// CHECK:STDOUT: %arr2: ref %.50 = bind_name arr2, %arr2.var -// CHECK:STDOUT: %.loc15_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19: Core.IntLiteral = int_value 3 [template = constants.%.49] -// CHECK:STDOUT: %.loc15_14.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.3: type = converted %int.make_type_signed.loc15, %.loc15_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_20: type = array_type %.loc15_19, %i32 [template = constants.%.50] -// CHECK:STDOUT: %.loc15_21: type = ptr_type %.50 [template = constants.%.51] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc14_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_42: = bound_method %int_10, %impl.elem0.loc14_42 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc14_42: = specific_function %Convert.bound.loc14_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %Convert.specific_fn.loc14_42(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int_10, %.loc14_42.1 [template = constants.%int_10.2] +// CHECK:STDOUT: %int.snegate.loc14_44: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.2) [template = constants.%int_-10] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.snegate.loc14_44 [template = constants.%int_-10] +// CHECK:STDOUT: %.loc14_44.2: %i32 = converted %int.snegate.loc14_44, %.loc14_44.1 [template = constants.%int_-10] +// CHECK:STDOUT: %impl.elem0.loc14_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_47: = bound_method %int_2, %impl.elem0.loc14_47 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc14_47: = specific_function %Convert.bound.loc14_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %Convert.specific_fn.loc14_47(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_47.1: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_47.2: %i32 = converted %int_2, %.loc14_47.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_44.2, %.loc14_47.2) [template = constants.%int_-3] +// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%int_-3] +// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.right_shift.loc14, %.loc14_48.1 [template = constants.%int_-3] +// CHECK:STDOUT: %int.snegate.loc14_49: init %i32 = call %Negate.ref.loc14_17(%.loc14_48.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_12.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_12.2: type = converted %int.make_type_signed.loc14, %.loc14_12.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc14_49: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc14_49: = bound_method %int.snegate.loc14_49, %impl.elem0.loc14_49 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc14_49: = specific_function %Convert.bound.loc14_49, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %.loc14_49.1: %i32 = value_of_initializer %int.snegate.loc14_49 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_49.2: %i32 = converted %int.snegate.loc14_49, %.loc14_49.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc14_49: init Core.IntLiteral = call %Convert.specific_fn.loc14_49(%.loc14_49.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_49.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_49 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_49.4: Core.IntLiteral = converted %int.snegate.loc14_49, %.loc14_49.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type.loc14: type = array_type %.loc14_49.4, %i32 [template = constants.%array_type.2] +// CHECK:STDOUT: %arr2.var: ref %array_type.2 = var arr2 +// CHECK:STDOUT: %arr2: ref %array_type.2 = bind_name arr2, %arr2.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_signed.loc15, %.loc15_14.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc15: type = array_type %int_3, %i32 [template = constants.%array_type.2] +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type.2 [template = constants.%ptr.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; @@ -444,47 +444,47 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr1.ref: ref %.34 = name_ref arr1, file.%arr1 -// CHECK:STDOUT: %.loc11: %.35 = addr_of %arr1.ref -// CHECK:STDOUT: %arr1_p: %.35 = bind_name arr1_p, %.loc11 -// CHECK:STDOUT: %arr2.ref: ref %.50 = name_ref arr2, file.%arr2 -// CHECK:STDOUT: %.loc15: %.51 = addr_of %arr2.ref -// CHECK:STDOUT: %arr2_p: %.51 = bind_name arr2_p, %.loc15 +// CHECK:STDOUT: %arr1.ref: ref %array_type.1 = name_ref arr1, file.%arr1 +// CHECK:STDOUT: %addr.loc11: %ptr.1 = addr_of %arr1.ref +// CHECK:STDOUT: %arr1_p: %ptr.1 = bind_name arr1_p, %addr.loc11 +// CHECK:STDOUT: %arr2.ref: ref %array_type.2 = name_ref arr2, file.%arr2 +// CHECK:STDOUT: %addr.loc15: %ptr.2 = addr_of %arr2.ref +// CHECK:STDOUT: %arr2_p: %ptr.2 = bind_name arr2_p, %addr.loc15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bad_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32.1 [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 31 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_31.1: Core.IntLiteral = int_value 31 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 31 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.35: = bound_method %.1, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 32 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 33 [template] -// CHECK:STDOUT: %.42: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_31.2: %i32 = int_value 31 [template] +// CHECK:STDOUT: %int_0: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] +// CHECK:STDOUT: %int_33.1: Core.IntLiteral = int_value 33 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32.1) [template] +// CHECK:STDOUT: %int_33.2: %i32 = int_value 33 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -515,18 +515,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_18: init type = call constants.%Int(%.loc4_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.2: type = value_of_initializer %int.make_type_signed.loc4_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.3: type = converted %int.make_type_signed.loc4_18, %.loc4_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_26: init type = call constants.%Int(%.loc4_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.2: type = value_of_initializer %int.make_type_signed.loc4_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.3: type = converted %int.make_type_signed.loc4_26, %.loc4_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_34: init type = call constants.%Int(%.loc4_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.2: type = value_of_initializer %int.make_type_signed.loc4_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.3: type = converted %int.make_type_signed.loc4_34, %.loc4_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_18: init type = call constants.%Int(%int_32.loc4_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_18.1: type = value_of_initializer %int.make_type_signed.loc4_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_18.2: type = converted %int.make_type_signed.loc4_18, %.loc4_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_26: init type = call constants.%Int(%int_32.loc4_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int.make_type_signed.loc4_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_26.2: type = converted %int.make_type_signed.loc4_26, %.loc4_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc4_34: init type = call constants.%Int(%int_32.loc4_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_signed.loc4_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_signed.loc4_34, %.loc4_34.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -540,35 +540,35 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%.loc5_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.3: type = converted %int.make_type_signed.loc5_14, %.loc5_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.3: type = converted %int.make_type_signed.loc5_22, %.loc5_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = converted %int.make_type_signed.loc13, %.loc13_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.3: type = converted %int.make_type_signed.loc18, %.loc18_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%.loc24_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_15.2: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_15.3: type = converted %int.make_type_signed.loc24, %.loc24_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed.loc13, %.loc13_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed.loc18, %.loc18_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%int_32.loc24) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_15.1: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] +// CHECK:STDOUT: %.loc24_15.2: type = converted %int.make_type_signed.loc24, %.loc24_15.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; @@ -578,82 +578,82 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_33.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_33.3: = bound_method %.loc8_33.1, %.loc8_33.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_33.4: = specific_function %.loc8_33.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i32 = call %.loc8_33.4(%.loc8_33.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_33.5: %i32 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_33.6: %i32 = converted %.loc8_33.1, %.loc8_33.5 [template = constants.%.33] -// CHECK:STDOUT: %int.right_shift.loc8: init %i32 = call %RightShift.ref.loc8(%.loc8_30.6, %.loc8_33.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_36.1: %i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_36.2: %i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.34] +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] +// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_30: = bound_method %int_1.loc8, %impl.elem0.loc8_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_30: = specific_function %Convert.bound.loc8_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %Convert.specific_fn.loc8_30(%int_1.loc8) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_1.loc8, %.loc8_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc8_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_33: = bound_method %int_31, %impl.elem0.loc8_33 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_33: = specific_function %Convert.bound.loc8_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i32 = call %Convert.specific_fn.loc8_33(%int_31) [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc8_33.1: %i32 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%int_31.2] +// CHECK:STDOUT: %.loc8_33.2: %i32 = converted %int_31, %.loc8_33.1 [template = constants.%int_31.2] +// CHECK:STDOUT: %int.right_shift.loc8: init %i32 = call %RightShift.ref.loc8(%.loc8_30.2, %.loc8_33.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc8_36.1: %i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%int_0] +// CHECK:STDOUT: %.loc8_36.2: %i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%int_0] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_36.2 // CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc13_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_30.3: = bound_method %.loc13_30.1, %.loc13_30.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_30.4: = specific_function %.loc13_30.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_30: init %i32 = call %.loc13_30.4(%.loc13_30.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_30.5: %i32 = value_of_initializer %int.convert_checked.loc13_30 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_30.6: %i32 = converted %.loc13_30.1, %.loc13_30.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_33.3: = bound_method %.loc13_33.1, %.loc13_33.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_33.4: = specific_function %.loc13_33.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc13_33: init %i32 = call %.loc13_33.4(%.loc13_33.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_33.5: %i32 = value_of_initializer %int.convert_checked.loc13_33 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_33.6: %i32 = converted %.loc13_33.1, %.loc13_33.5 [template = constants.%.37] -// CHECK:STDOUT: %int.right_shift.loc13: init %i32 = call %RightShift.ref.loc13(%.loc13_30.6, %.loc13_33.6) [template = ] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %impl.elem0.loc13_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_30: = bound_method %int_1.loc13, %impl.elem0.loc13_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_30: = specific_function %Convert.bound.loc13_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_30: init %i32 = call %Convert.specific_fn.loc13_30(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_30.1: %i32 = value_of_initializer %int.convert_checked.loc13_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_30.2: %i32 = converted %int_1.loc13, %.loc13_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_33: = bound_method %int_32, %impl.elem0.loc13_33 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_33: = specific_function %Convert.bound.loc13_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_33: init %i32 = call %Convert.specific_fn.loc13_33(%int_32) [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.convert_checked.loc13_33 [template = constants.%int_32.2] +// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int_32, %.loc13_33.1 [template = constants.%int_32.2] +// CHECK:STDOUT: %int.right_shift.loc13: init %i32 = call %RightShift.ref.loc13(%.loc13_30.2, %.loc13_33.2) [template = ] // CHECK:STDOUT: %.loc13_36.1: %i32 = value_of_initializer %int.right_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_36.2: %i32 = converted %int.right_shift.loc13, %.loc13_36.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_36.2 // CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc18_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 33 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_30.3: = bound_method %.loc18_30.1, %.loc18_30.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc18_30.4: = specific_function %.loc18_30.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc18_30: init %i32 = call %.loc18_30.4(%.loc18_30.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc18_30.5: %i32 = value_of_initializer %int.convert_checked.loc18_30 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_30.6: %i32 = converted %.loc18_30.1, %.loc18_30.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_33.3: = bound_method %.loc18_33.1, %.loc18_33.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc18_33.4: = specific_function %.loc18_33.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc18_33: init %i32 = call %.loc18_33.4(%.loc18_33.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc18_33.5: %i32 = value_of_initializer %int.convert_checked.loc18_33 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_33.6: %i32 = converted %.loc18_33.1, %.loc18_33.5 [template = constants.%.41] -// CHECK:STDOUT: %int.right_shift.loc18: init %i32 = call %RightShift.ref.loc18(%.loc18_30.6, %.loc18_33.6) [template = ] +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [template = constants.%int_33.1] +// CHECK:STDOUT: %impl.elem0.loc18_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_30: = bound_method %int_1.loc18, %impl.elem0.loc18_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18_30: = specific_function %Convert.bound.loc18_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18_30: init %i32 = call %Convert.specific_fn.loc18_30(%int_1.loc18) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_30.1: %i32 = value_of_initializer %int.convert_checked.loc18_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_30.2: %i32 = converted %int_1.loc18, %.loc18_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc18_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_33: = bound_method %int_33, %impl.elem0.loc18_33 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc18_33: = specific_function %Convert.bound.loc18_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc18_33: init %i32 = call %Convert.specific_fn.loc18_33(%int_33) [template = constants.%int_33.2] +// CHECK:STDOUT: %.loc18_33.1: %i32 = value_of_initializer %int.convert_checked.loc18_33 [template = constants.%int_33.2] +// CHECK:STDOUT: %.loc18_33.2: %i32 = converted %int_33, %.loc18_33.1 [template = constants.%int_33.2] +// CHECK:STDOUT: %int.right_shift.loc18: init %i32 = call %RightShift.ref.loc18(%.loc18_30.2, %.loc18_33.2) [template = ] // CHECK:STDOUT: %.loc18_36.1: %i32 = value_of_initializer %int.right_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_36.2: %i32 = converted %int.right_shift.loc18, %.loc18_36.1 [template = ] // CHECK:STDOUT: %size_3: %i32 = bind_name size_3, %.loc18_36.2 // CHECK:STDOUT: %RightShift.ref.loc24: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc24_32.1: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_1.loc24_32: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc24_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_42.3: = bound_method %.loc24_42.1, %.loc24_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc24_42.4: = specific_function %.loc24_42.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc24_42: init %i32 = call %.loc24_42.4(%.loc24_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc24_42.5: %i32 = value_of_initializer %int.convert_checked.loc24_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_42.6: %i32 = converted %.loc24_42.1, %.loc24_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc24_42.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc24_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_32.3: = bound_method %.loc24_32.1, %.loc24_32.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc24_32.4: = specific_function %.loc24_32.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %.loc24_32.4(%.loc24_32.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc24_32.5: %i32 = value_of_initializer %int.convert_checked.loc24_32 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_32.6: %i32 = converted %.loc24_32.1, %.loc24_32.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%.42] -// CHECK:STDOUT: %.loc24_43.2: %i32 = converted %int.snegate, %.loc24_43.1 [template = constants.%.42] -// CHECK:STDOUT: %int.right_shift.loc24: init %i32 = call %RightShift.ref.loc24(%.loc24_32.6, %.loc24_43.2) [template = ] +// CHECK:STDOUT: %int_1.loc24_42: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc24_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_42: = bound_method %int_1.loc24_42, %impl.elem0.loc24_42 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc24_42: = specific_function %Convert.bound.loc24_42, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc24_42: init %i32 = call %Convert.specific_fn.loc24_42(%int_1.loc24_42) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_42.1: %i32 = value_of_initializer %int.convert_checked.loc24_42 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_42.2: %i32 = converted %int_1.loc24_42, %.loc24_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc24_42.2) [template = constants.%int_-1] +// CHECK:STDOUT: %impl.elem0.loc24_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_32: = bound_method %int_1.loc24_32, %impl.elem0.loc24_32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc24_32: = specific_function %Convert.bound.loc24_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %Convert.specific_fn.loc24_32(%int_1.loc24_32) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_32.1: %i32 = value_of_initializer %int.convert_checked.loc24_32 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_32.2: %i32 = converted %int_1.loc24_32, %.loc24_32.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc24_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1] +// CHECK:STDOUT: %.loc24_43.2: %i32 = converted %int.snegate, %.loc24_43.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.right_shift.loc24: init %i32 = call %RightShift.ref.loc24(%.loc24_32.2, %.loc24_43.2) [template = ] // CHECK:STDOUT: %.loc24_45.1: %i32 = value_of_initializer %int.right_shift.loc24 [template = ] // CHECK:STDOUT: %.loc24_45.2: %i32 = converted %int.right_shift.loc24, %.loc24_45.1 [template = ] // CHECK:STDOUT: %negative: %i32 = bind_name negative, %.loc24_45.2 diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index f8bec4b2e0c8e..a416c54903358 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -92,34 +92,34 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- int_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -150,18 +150,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -169,44 +169,44 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.sadd, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.sadd, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.sadd, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sadd, %.loc4_24.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.sadd, %.loc4_24.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -215,18 +215,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -251,19 +251,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -274,22 +274,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -330,14 +330,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%.loc8_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.3: type = converted %int.make_type_signed.loc8_14, %.loc8_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%.loc8_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.3: type = converted %int.make_type_signed.loc8_22, %.loc8_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%int_32.loc8_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_signed.loc8_14, %.loc8_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%int_32.loc8_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_signed.loc8_22, %.loc8_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -353,22 +353,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%.loc13_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.3: type = converted %int.make_type_signed.loc13_15, %.loc13_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed.loc13_31, %.loc13_31.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%.loc13_39.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.3: type = converted %int.make_type_signed.loc13_39, %.loc13_39.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%int_32.loc13_39) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_signed.loc13_39, %.loc13_39.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -386,14 +386,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%.loc18_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.3: type = converted %int.make_type_signed.loc18_21, %.loc18_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%.loc18_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.2: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.3: type = converted %int.make_type_signed.loc18_29, %.loc18_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed.loc18_21, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%int_32.loc18_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_signed.loc18_29, %.loc18_29.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] @@ -412,18 +412,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%.loc19_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.3: type = converted %int.make_type_signed.loc19_17, %.loc19_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%.loc19_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.3: type = converted %int.make_type_signed.loc19_25, %.loc19_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%.loc19_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.2: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.3: type = converted %int.make_type_signed.loc19_33, %.loc19_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%int_32.loc19_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_signed.loc19_33, %.loc19_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -431,81 +431,81 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc25_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %.loc25_27.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.29] -// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.29] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.6) -// CHECK:STDOUT: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) +// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %.loc30_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.34] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.37] -// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.37] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6, %.loc30_35.6) -// CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) +// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] +// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %.loc35_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.29] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.34] -// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.34] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6, %.loc35_45.6) -// CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) +// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] +// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // 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: %.loc44_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%.loc44_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc44_37: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc44_16.2: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.3: type = converted %int.make_type_signed.loc44, %.loc44_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_39: type = array_type , %i32 [template = ] +// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc44: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] +// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type , %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: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -514,14 +514,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc46_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%.loc46_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.3: type = converted %int.make_type_signed.loc46_25, %.loc46_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%.loc46_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.3: type = converted %int.make_type_signed.loc46_33, %.loc46_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -537,22 +537,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc50_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc50_26: init type = call constants.%Int(%.loc50_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_26.2: type = value_of_initializer %int.make_type_signed.loc50_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_26.3: type = converted %int.make_type_signed.loc50_26, %.loc50_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc50_34: init type = call constants.%Int(%.loc50_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_34.2: type = value_of_initializer %int.make_type_signed.loc50_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_34.3: type = converted %int.make_type_signed.loc50_34, %.loc50_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_42.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc50_42: init type = call constants.%Int(%.loc50_42.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_42.2: type = value_of_initializer %int.make_type_signed.loc50_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_42.3: type = converted %int.make_type_signed.loc50_42, %.loc50_42.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_50.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc50_50: init type = call constants.%Int(%.loc50_50.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_50.2: type = value_of_initializer %int.make_type_signed.loc50_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_50.3: type = converted %int.make_type_signed.loc50_50, %.loc50_50.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc50_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc50_26: init type = call constants.%Int(%int_32.loc50_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc50_26.1: type = value_of_initializer %int.make_type_signed.loc50_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc50_26.2: type = converted %int.make_type_signed.loc50_26, %.loc50_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc50_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc50_34: init type = call constants.%Int(%int_32.loc50_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc50_34.1: type = value_of_initializer %int.make_type_signed.loc50_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc50_34.2: type = converted %int.make_type_signed.loc50_34, %.loc50_34.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc50_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc50_42: init type = call constants.%Int(%int_32.loc50_42) [template = constants.%i32] +// CHECK:STDOUT: %.loc50_42.1: type = value_of_initializer %int.make_type_signed.loc50_42 [template = constants.%i32] +// CHECK:STDOUT: %.loc50_42.2: type = converted %int.make_type_signed.loc50_42, %.loc50_42.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc50_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc50_50: init type = call constants.%Int(%int_32.loc50_50) [template = constants.%i32] +// CHECK:STDOUT: %.loc50_50.1: type = value_of_initializer %int.make_type_signed.loc50_50 [template = constants.%i32] +// CHECK:STDOUT: %.loc50_50.2: type = converted %int.make_type_signed.loc50_50, %.loc50_50.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -570,14 +570,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc54_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc54_32: init type = call constants.%Int(%.loc54_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_32.2: type = value_of_initializer %int.make_type_signed.loc54_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_32.3: type = converted %int.make_type_signed.loc54_32, %.loc54_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc54_40: init type = call constants.%Int(%.loc54_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_40.2: type = value_of_initializer %int.make_type_signed.loc54_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_40.3: type = converted %int.make_type_signed.loc54_40, %.loc54_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc54_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc54_32: init type = call constants.%Int(%int_32.loc54_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc54_32.1: type = value_of_initializer %int.make_type_signed.loc54_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc54_32.2: type = converted %int.make_type_signed.loc54_32, %.loc54_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc54_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc54_40: init type = call constants.%Int(%int_32.loc54_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc54_40.1: type = value_of_initializer %int.make_type_signed.loc54_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc54_40.2: type = converted %int.make_type_signed.loc54_40, %.loc54_40.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc54_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc54_48.2: type = converted %bool.make_type, %.loc54_48.1 [template = bool] @@ -634,29 +634,29 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -684,18 +684,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -703,14 +703,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed.loc10, %.loc10_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; @@ -718,42 +718,42 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref.loc6: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_30.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_30.3: = bound_method %.loc6_30.1, %.loc6_30.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_30.4: = specific_function %.loc6_30.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_30: init %i32 = call %.loc6_30.4(%.loc6_30.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_30.5: %i32 = value_of_initializer %int.convert_checked.loc6_30 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_30.6: %i32 = converted %.loc6_30.1, %.loc6_30.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sadd.loc6: init %i32 = call %Add.ref.loc6(%.loc6_18.6, %.loc6_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_2147483647.loc6, %.loc6_18.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %impl.elem0.loc6_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_30: = bound_method %int_0, %impl.elem0.loc6_30 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_30: = specific_function %Convert.bound.loc6_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_30: init %i32 = call %Convert.specific_fn.loc6_30(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_30.1: %i32 = value_of_initializer %int.convert_checked.loc6_30 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_30.2: %i32 = converted %int_0, %.loc6_30.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.sadd.loc6: init %i32 = call %Add.ref.loc6(%.loc6_18.2, %.loc6_30.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.sadd.loc6 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Add.ref.loc10: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_30.1: Core.IntLiteral = int_value 1 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_30.3: = bound_method %.loc10_30.1, %.loc10_30.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc10_30.4: = specific_function %.loc10_30.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc10_30: init %i32 = call %.loc10_30.4(%.loc10_30.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc10_30.5: %i32 = value_of_initializer %int.convert_checked.loc10_30 [template = constants.%.37] -// CHECK:STDOUT: %.loc10_30.6: %i32 = converted %.loc10_30.1, %.loc10_30.5 [template = constants.%.37] -// CHECK:STDOUT: %int.sadd.loc10: init %i32 = call %Add.ref.loc10(%.loc10_18.6, %.loc10_30.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc10_32.1: %i32 = value_of_initializer %int.sadd.loc10 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_32.2: %i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%.38] +// CHECK:STDOUT: %int_2147483647.loc10: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_2147483647.loc10, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_2147483647.loc10) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_2147483647.loc10, %.loc10_18.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %impl.elem0.loc10_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_30: = bound_method %int_1, %impl.elem0.loc10_30 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc10_30: = specific_function %Convert.bound.loc10_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc10_30: init %i32 = call %Convert.specific_fn.loc10_30(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_30.1: %i32 = value_of_initializer %int.convert_checked.loc10_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_30.2: %i32 = converted %int_1, %.loc10_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.sadd.loc10: init %i32 = call %Add.ref.loc10(%.loc10_18.2, %.loc10_30.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc10_32.1: %i32 = value_of_initializer %int.sadd.loc10 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc10_32.2: %i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc10_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 11226caf2d874..16f03145da43d 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -60,34 +60,34 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -118,18 +118,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -137,44 +137,44 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.sdiv, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.sdiv [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.sdiv, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.sdiv, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sdiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sdiv [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sdiv, %.loc4_24.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.sdiv, %.loc4_24.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -183,18 +183,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -219,40 +219,40 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -283,18 +283,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -310,18 +310,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -335,31 +335,31 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_8.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_8.3: type = converted %int.make_type_signed.loc19, %.loc19_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_8.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_8.2: type = converted %int.make_type_signed.loc19, %.loc19_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; @@ -372,102 +372,102 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%.35] -// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.29] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_1.loc9, %.loc9_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.36] +// CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int_2147483647.loc12, %.loc12_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.1: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.2: %i32 = converted %int_1.loc12_43, %.loc12_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.1: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.2: %i32 = converted %int_1.loc12_47, %.loc12_47.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc19: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc19: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc19_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_29.3: = bound_method %.loc19_29.1, %.loc19_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc19_29.4: = specific_function %.loc19_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %.loc19_29.4(%.loc19_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc19_29.5: %i32 = value_of_initializer %int.convert_checked.loc19_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc19_29.6: %i32 = converted %.loc19_29.1, %.loc19_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc19_40: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc19_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_40.1: %i32 = value_of_initializer %int.snegate.loc19_40 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_40.2: %i32 = converted %int.snegate.loc19_40, %.loc19_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_43.3: = bound_method %.loc19_43.1, %.loc19_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_43.4: = specific_function %.loc19_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %.loc19_43.4(%.loc19_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc19_43.5: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc19_43.6: %i32 = converted %.loc19_43.1, %.loc19_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_40.2, %.loc19_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc19_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_29: = bound_method %int_2147483647.loc19, %impl.elem0.loc19_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc19_29: = specific_function %Convert.bound.loc19_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %Convert.specific_fn.loc19_29(%int_2147483647.loc19) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc19_29.1: %i32 = value_of_initializer %int.convert_checked.loc19_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc19_29.2: %i32 = converted %int_2147483647.loc19, %.loc19_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc19_40: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc19_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc19_40.1: %i32 = value_of_initializer %int.snegate.loc19_40 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc19_40.2: %i32 = converted %int.snegate.loc19_40, %.loc19_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc19_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_43: = bound_method %int_1.loc19_43, %impl.elem0.loc19_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19_43: = specific_function %Convert.bound.loc19_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %Convert.specific_fn.loc19_43(%int_1.loc19_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_43.1: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_43.2: %i32 = converted %int_1.loc19_43, %.loc19_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_40.2, %.loc19_43.2) [template = constants.%int_-2147483648] // CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc19_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_54.3: = bound_method %.loc19_54.1, %.loc19_54.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_54.4: = specific_function %.loc19_54.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %.loc19_54.4(%.loc19_54.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc19_54.5: %i32 = value_of_initializer %int.convert_checked.loc19_54 [template = constants.%.34] -// CHECK:STDOUT: %.loc19_54.6: %i32 = converted %.loc19_54.1, %.loc19_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc19_55: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc19_44.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_44.2: %i32 = converted %int.ssub.loc19, %.loc19_44.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_55.1: %i32 = value_of_initializer %int.snegate.loc19_55 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_55.2: %i32 = converted %int.snegate.loc19_55, %.loc19_55.1 [template = constants.%.35] -// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_44.2, %.loc19_55.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc19_57.1: %i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_57.2: %i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc19_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc19_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_54: = bound_method %int_1.loc19_54, %impl.elem0.loc19_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19_54: = specific_function %Convert.bound.loc19_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %Convert.specific_fn.loc19_54(%int_1.loc19_54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_54.1: %i32 = value_of_initializer %int.convert_checked.loc19_54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_54.2: %i32 = converted %int_1.loc19_54, %.loc19_54.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc19_55: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc19_44.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc19_44.2: %i32 = converted %int.ssub.loc19, %.loc19_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc19_55.1: %i32 = value_of_initializer %int.snegate.loc19_55 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc19_55.2: %i32 = converted %int.snegate.loc19_55, %.loc19_55.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_44.2, %.loc19_55.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc19_57.1: %i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc19_57.2: %i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc19_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -475,24 +475,24 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -520,18 +520,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -539,14 +539,14 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed.loc10, %.loc10_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; @@ -554,40 +554,40 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sdiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.6, %.loc10_21.6) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_1, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_1, %.loc10_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_21: = bound_method %int_0.loc10, %impl.elem0.loc10_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_21: = specific_function %Convert.bound.loc10_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %Convert.specific_fn.loc10_21(%int_0.loc10) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.1: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_0.loc10, %.loc10_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.sdiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.2, %.loc10_21.2) [template = ] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.sdiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.sdiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc10_23.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc15_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sdiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.6, %.loc15_21.6) [template = ] +// CHECK:STDOUT: %int_0.loc15_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc15_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_18: = bound_method %int_0.loc15_18, %impl.elem0.loc15_18 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_18: = specific_function %Convert.bound.loc15_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %Convert.specific_fn.loc15_18(%int_0.loc15_18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_0.loc15_18, %.loc15_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_21: = bound_method %int_0.loc15_21, %impl.elem0.loc15_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_21: = specific_function %Convert.bound.loc15_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %Convert.specific_fn.loc15_21(%int_0.loc15_21) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int_0.loc15_21, %.loc15_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.sdiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.2, %.loc15_21.2) [template = ] // CHECK:STDOUT: %.loc15_23.1: %i32 = value_of_initializer %int.sdiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: %i32 = converted %int.sdiv.loc15, %.loc15_23.1 [template = ] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_23.2 diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 7d0bd6de2de4e..56e1872126d77 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -63,34 +63,34 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -121,18 +121,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -140,44 +140,44 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.smod, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.smod [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.smod, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.smod, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smod [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smod, %.loc4_24.1 [template = constants.%int_2.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.smod, %.loc4_24.3 [template = constants.%int_2.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -186,18 +186,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -222,41 +222,41 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.37: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_0: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -287,18 +287,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -314,18 +314,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -339,31 +339,31 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8.3: type = converted %int.make_type_signed.loc20, %.loc20_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_8.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_8.2: type = converted %int.make_type_signed.loc20, %.loc20_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; @@ -376,102 +376,102 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%.35] -// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_1.loc9, %.loc9_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%int_0] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%int_0] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.36] +// CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int_2147483647.loc12, %.loc12_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.1: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.2: %i32 = converted %int_1.loc12_43, %.loc12_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.1: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.2: %i32 = converted %int_1.loc12_47, %.loc12_47.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%int_0] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc20: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc20: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc20_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc20_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_29.3: = bound_method %.loc20_29.1, %.loc20_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc20_29.4: = specific_function %.loc20_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %.loc20_29.4(%.loc20_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc20_29.5: %i32 = value_of_initializer %int.convert_checked.loc20_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc20_29.6: %i32 = converted %.loc20_29.1, %.loc20_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc20_40: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc20_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_40.1: %i32 = value_of_initializer %int.snegate.loc20_40 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_40.2: %i32 = converted %int.snegate.loc20_40, %.loc20_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_43.3: = bound_method %.loc20_43.1, %.loc20_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc20_43.4: = specific_function %.loc20_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %.loc20_43.4(%.loc20_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc20_43.5: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc20_43.6: %i32 = converted %.loc20_43.1, %.loc20_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_40.2, %.loc20_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc20_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc20_29: = bound_method %int_2147483647.loc20, %impl.elem0.loc20_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc20_29: = specific_function %Convert.bound.loc20_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %Convert.specific_fn.loc20_29(%int_2147483647.loc20) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc20_29.1: %i32 = value_of_initializer %int.convert_checked.loc20_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc20_29.2: %i32 = converted %int_2147483647.loc20, %.loc20_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc20_40: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc20_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc20_40.1: %i32 = value_of_initializer %int.snegate.loc20_40 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc20_40.2: %i32 = converted %int.snegate.loc20_40, %.loc20_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc20_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc20_43: = bound_method %int_1.loc20_43, %impl.elem0.loc20_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc20_43: = specific_function %Convert.bound.loc20_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %Convert.specific_fn.loc20_43(%int_1.loc20_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc20_43.1: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc20_43.2: %i32 = converted %int_1.loc20_43, %.loc20_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_40.2, %.loc20_43.2) [template = constants.%int_-2147483648] // CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc20_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_54.3: = bound_method %.loc20_54.1, %.loc20_54.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc20_54.4: = specific_function %.loc20_54.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %.loc20_54.4(%.loc20_54.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc20_54.5: %i32 = value_of_initializer %int.convert_checked.loc20_54 [template = constants.%.34] -// CHECK:STDOUT: %.loc20_54.6: %i32 = converted %.loc20_54.1, %.loc20_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc20_55: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc20_44.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.37] -// CHECK:STDOUT: %.loc20_44.2: %i32 = converted %int.ssub.loc20, %.loc20_44.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc20_55.1: %i32 = value_of_initializer %int.snegate.loc20_55 [template = constants.%.35] -// CHECK:STDOUT: %.loc20_55.2: %i32 = converted %int.snegate.loc20_55, %.loc20_55.1 [template = constants.%.35] -// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_44.2, %.loc20_55.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc20_57.1: %i32 = value_of_initializer %int.smod.loc20 [template = constants.%.36] -// CHECK:STDOUT: %.loc20_57.2: %i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc20_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc20_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc20_54: = bound_method %int_1.loc20_54, %impl.elem0.loc20_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc20_54: = specific_function %Convert.bound.loc20_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %Convert.specific_fn.loc20_54(%int_1.loc20_54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc20_54.1: %i32 = value_of_initializer %int.convert_checked.loc20_54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc20_54.2: %i32 = converted %int_1.loc20_54, %.loc20_54.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate.loc20_55: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc20_44.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc20_44.2: %i32 = converted %int.ssub.loc20, %.loc20_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc20_55.1: %i32 = value_of_initializer %int.snegate.loc20_55 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc20_55.2: %i32 = converted %int.snegate.loc20_55, %.loc20_55.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_44.2, %.loc20_55.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc20_57.1: %i32 = value_of_initializer %int.smod.loc20 [template = constants.%int_0] +// CHECK:STDOUT: %.loc20_57.2: %i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%int_0] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc20_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -479,24 +479,24 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -524,18 +524,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -543,14 +543,14 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.3: type = converted %int.make_type_signed.loc17, %.loc17_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; @@ -558,40 +558,40 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc12_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.6, %.loc12_21.6) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_18: = bound_method %int_1, %impl.elem0.loc12_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_18: = specific_function %Convert.bound.loc12_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %Convert.specific_fn.loc12_18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int_0.loc12, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %Convert.specific_fn.loc12_21(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int_0.loc12, %.loc12_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.2, %.loc12_21.2) [template = ] // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.smod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.smod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc12_23.2 // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.6, %.loc17_21.6) [template = ] +// CHECK:STDOUT: %int_0.loc17_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc17_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_18: = bound_method %int_0.loc17_18, %impl.elem0.loc17_18 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_18: = specific_function %Convert.bound.loc17_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %Convert.specific_fn.loc17_18(%int_0.loc17_18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_18.1: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_18.2: %i32 = converted %int_0.loc17_18, %.loc17_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_21: = bound_method %int_0.loc17_21, %impl.elem0.loc17_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_21: = specific_function %Convert.bound.loc17_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %Convert.specific_fn.loc17_21(%int_0.loc17_21) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.1: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.2: %i32 = converted %int_0.loc17_21, %.loc17_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.smod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.2, %.loc17_21.2) [template = ] // CHECK:STDOUT: %.loc17_23.1: %i32 = value_of_initializer %int.smod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: %i32 = converted %int.smod.loc17, %.loc17_23.1 [template = ] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc17_23.2 diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 9667ab2beef8d..7b66682a17549 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -34,34 +34,34 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- int_mul.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -92,18 +92,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -111,44 +111,44 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.smul, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.smul [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.smul, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.smul, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smul [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smul, %.loc4_24.1 [template = constants.%int_6.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.smul, %.loc4_24.3 [template = constants.%int_6.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -157,18 +157,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -193,39 +193,39 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32767 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 65536 [template] +// CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] +// CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %int_2147418112: %i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -253,18 +253,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -272,14 +272,14 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed.loc10, %.loc10_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; @@ -287,42 +287,42 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32767 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.smul.loc6 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.34] +// CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] +// CHECK:STDOUT: %int_65536.loc6: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_32767, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_32767) [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_32767, %.loc6_18.1 [template = constants.%int_32767.2] +// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_26: = bound_method %int_65536.loc6, %impl.elem0.loc6_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_26: = specific_function %Convert.bound.loc6_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Convert.specific_fn.loc6_26(%int_65536.loc6) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc6_26.1: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc6_26.2: %i32 = converted %int_65536.loc6, %.loc6_26.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.smul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.2, %.loc6_26.2) [template = constants.%int_2147418112] +// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.smul.loc6 [template = constants.%int_2147418112] +// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%int_2147418112] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc10: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.35] -// CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] -// CHECK:STDOUT: %int.smul.loc10: init %i32 = call %Mul.ref.loc10(%.loc10_18.6, %.loc10_26.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.smul.loc10 [template = constants.%.39] -// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%.39] +// CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %int_65536.loc10: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_32768, %impl.elem0.loc10_18 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_32768) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_32768, %.loc10_18.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_65536.loc10, %impl.elem0.loc10_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_65536.loc10) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_65536.loc10, %.loc10_26.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.smul.loc10: init %i32 = call %Mul.ref.loc10(%.loc10_18.2, %.loc10_26.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.smul.loc10 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc10_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 43b07646572b0..f4019fdfa8092 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -119,34 +119,34 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- int_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 123 [template] +// CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 123 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] +// CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -176,58 +176,58 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%.loc2_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.3: type = converted %int.make_type_signed.loc2_14, %.loc2_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%.loc2_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.3: type = converted %int.make_type_signed.loc2_22, %.loc2_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc4_30.1: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.snegate.loc4_33 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.snegate.loc4_33, %.loc4_33.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_34.2: = bound_method %int.snegate.loc4_34, %.loc4_34.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_34.3: = specific_function %.loc4_34.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_34.4: %i32 = value_of_initializer %int.snegate.loc4_34 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_34.5: %i32 = converted %int.snegate.loc4_34, %.loc4_34.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %.loc4_34.3(%.loc4_34.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc4_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_34.7: Core.IntLiteral = converted %int.snegate.loc4_34, %.loc4_34.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_34.7, %i32 [template = constants.%.34] -// CHECK:STDOUT: %arr.var: ref %.34 = var arr -// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.34] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.34 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int_123.loc4, %.loc4_30.1 [template = constants.%int_123.2] +// CHECK:STDOUT: %int.snegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.2) [template = constants.%int_-123] +// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.snegate.loc4_33 [template = constants.%int_-123] +// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.snegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] +// CHECK:STDOUT: %int.snegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.snegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.snegate.loc4_34 [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.snegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] +// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc4_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc4_34.4: Core.IntLiteral = converted %int.snegate.loc4_34, %.loc4_34.3 [template = constants.%int_123.1] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_34.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -236,18 +236,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%.loc9_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_signed.loc9_19, %.loc9_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%.loc9_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.2: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.3: type = converted %int.make_type_signed.loc9_27, %.loc9_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%.loc9_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.2: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.3: type = converted %int.make_type_signed.loc9_35, %.loc9_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%int_32.loc9_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%int_32.loc9_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_signed.loc9_27, %.loc9_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%int_32.loc9_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_signed.loc9_35, %.loc9_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -271,20 +271,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.34 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.35 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.35 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] -// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.39] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.snegate [template = constants.%.40] -// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%.40] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int_1, %.loc7_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc7_21.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1] +// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%int_-1] // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -292,10 +292,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -306,18 +306,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -356,10 +356,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.3: type = converted %int.make_type_signed, %.loc8_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_signed, %.loc8_16.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -371,18 +371,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%.loc13_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.3: type = converted %int.make_type_signed.loc13_15, %.loc13_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed.loc13_31, %.loc13_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -396,10 +396,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.3: type = converted %int.make_type_signed, %.loc18_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed, %.loc18_21.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] @@ -414,72 +414,72 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%.loc19_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.3: type = converted %int.make_type_signed.loc19_17, %.loc19_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%.loc19_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.3: type = converted %int.make_type_signed.loc19_25, %.loc19_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc25_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] // 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: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %.loc30_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.33] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6) -// CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) +// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] +// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %.loc35_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.30] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6) -// CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) +// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] +// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // 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: %.loc44_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%.loc44_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_16.2: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.3: type = converted %int.make_type_signed.loc44, %.loc44_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_36: type = array_type , %i32 [template = ] +// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] +// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type , %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: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -488,14 +488,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc46_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%.loc46_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.3: type = converted %int.make_type_signed.loc46_25, %.loc46_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%.loc46_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.3: type = converted %int.make_type_signed.loc46_33, %.loc46_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -511,22 +511,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc57_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%.loc57_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.2: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.3: type = converted %int.make_type_signed.loc57_26, %.loc57_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%.loc57_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.2: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.3: type = converted %int.make_type_signed.loc57_34, %.loc57_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%.loc57_42.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.2: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.3: type = converted %int.make_type_signed.loc57_42, %.loc57_42.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%.loc57_50.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.2: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.3: type = converted %int.make_type_signed.loc57_50, %.loc57_50.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%int_32.loc57_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_signed.loc57_26, %.loc57_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%int_32.loc57_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_signed.loc57_34, %.loc57_34.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%int_32.loc57_42) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_signed.loc57_42, %.loc57_42.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%int_32.loc57_50) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_signed.loc57_50, %.loc57_50.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -544,14 +544,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc68_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%.loc68_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.2: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.3: type = converted %int.make_type_signed.loc68_32, %.loc68_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%.loc68_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.2: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.3: type = converted %int.make_type_signed.loc68_40, %.loc68_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%int_32.loc68_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_signed.loc68_32, %.loc68_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%int_32.loc68_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_signed.loc68_40, %.loc68_40.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] @@ -599,28 +599,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -647,14 +647,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%.loc4_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.3: type = converted %int.make_type_signed.loc4_14, %.loc4_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%.loc4_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.3: type = converted %int.make_type_signed.loc4_22, %.loc4_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%int_32.loc4_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed.loc4_14, %.loc4_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -668,18 +668,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -687,14 +687,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.3: type = converted %int.make_type_signed.loc14, %.loc14_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; @@ -705,46 +705,46 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.snegate.loc8_38 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.snegate.loc8_38, %.loc8_38.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_39 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_39, %.loc8_40.1 [template = constants.%.29] +// CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2147483647.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2147483647.loc8) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_28.1: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_28.2: %i32 = converted %int_2147483647.loc8, %.loc8_28.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.snegate.loc8_38 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.snegate.loc8_38, %.loc8_38.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int.snegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_39 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_39, %.loc8_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc14_32.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_32.3: = bound_method %.loc14_32.1, %.loc14_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_32.4: = specific_function %.loc14_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %.loc14_32.4(%.loc14_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_32.5: %i32 = value_of_initializer %int.convert_checked.loc14_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_32.6: %i32 = converted %.loc14_32.1, %.loc14_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc14_42: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.snegate.loc14_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int.snegate.loc14_42, %.loc14_42.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_45.3: = bound_method %.loc14_45.1, %.loc14_45.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_45.4: = specific_function %.loc14_45.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %.loc14_45.4(%.loc14_45.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_45.5: %i32 = value_of_initializer %int.convert_checked.loc14_45 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_45.6: %i32 = converted %.loc14_45.1, %.loc14_45.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_42.2, %.loc14_45.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc14_46.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc14_46.2: %i32 = converted %int.ssub, %.loc14_46.1 [template = constants.%.35] -// CHECK:STDOUT: %int.snegate.loc14_47: init %i32 = call %Negate.ref.loc14_14(%.loc14_46.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_47, %.loc14_48.1 [template = constants.%.35] +// CHECK:STDOUT: %int_2147483647.loc14: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc14_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_32: = bound_method %int_2147483647.loc14, %impl.elem0.loc14_32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_32: = specific_function %Convert.bound.loc14_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %Convert.specific_fn.loc14_32(%int_2147483647.loc14) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_32.1: %i32 = value_of_initializer %int.convert_checked.loc14_32 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc14_32.2: %i32 = converted %int_2147483647.loc14, %.loc14_32.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.snegate.loc14_42: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.snegate.loc14_42 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int.snegate.loc14_42, %.loc14_42.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc14_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_45: = bound_method %int_1, %impl.elem0.loc14_45 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_45: = specific_function %Convert.bound.loc14_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %Convert.specific_fn.loc14_45(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_45.1: %i32 = value_of_initializer %int.convert_checked.loc14_45 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_45.2: %i32 = converted %int_1, %.loc14_45.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_42.2, %.loc14_45.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc14_46.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc14_46.2: %i32 = converted %int.ssub, %.loc14_46.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int.snegate.loc14_47: init %i32 = call %Negate.ref.loc14_14(%.loc14_46.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_47 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_47, %.loc14_48.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc14_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 36d2582d4d782..37ceb09c81dbd 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -35,34 +35,34 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- int_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -93,18 +93,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -112,44 +112,44 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.ssub, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.ssub [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.ssub, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.ssub, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.ssub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.ssub, %.loc4_24.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.ssub, %.loc4_24.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -158,18 +158,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -194,43 +194,43 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -259,18 +259,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -278,18 +278,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; @@ -297,83 +297,83 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_21.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.34] +// CHECK:STDOUT: %int_0.loc6: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_0.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_0.loc6) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_0.loc6, %.loc6_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_21: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_21: = specific_function %Convert.bound.loc6_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %Convert.specific_fn.loc6_21(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_21.1: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_21.2: %i32 = converted %int_2147483647.loc6, %.loc6_21.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.ssub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.2, %.loc6_21.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.ssub.loc6 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc7_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.ssub.loc7_35 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.ssub.loc7_35, %.loc7_35.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] -// CHECK:STDOUT: %int.ssub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_39 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_39, %.loc7_40.1 [template = constants.%.39] +// CHECK:STDOUT: %int_0.loc7: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_22: = bound_method %int_0.loc7, %impl.elem0.loc7_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc7_22: = specific_function %Convert.bound.loc7_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %Convert.specific_fn.loc7_22(%int_0.loc7) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_22.1: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_22.2: %i32 = converted %int_0.loc7, %.loc7_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_25: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_25 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_25: = specific_function %Convert.bound.loc7_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %Convert.specific_fn.loc7_25(%int_2147483647.loc7) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_25.1: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_25.2: %i32 = converted %int_2147483647.loc7, %.loc7_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.ssub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.2, %.loc7_25.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.ssub.loc7_35 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.ssub.loc7_35, %.loc7_35.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_38: = bound_method %int_1, %impl.elem0.loc7_38 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc7_38: = specific_function %Convert.bound.loc7_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %Convert.specific_fn.loc7_38(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_38.1: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_38.2: %i32 = converted %int_1, %.loc7_38.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.ssub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_39 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_39, %.loc7_40.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub.loc11_35: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.6, %.loc11_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_35.1: %i32 = value_of_initializer %int.ssub.loc11_35 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_35.2: %i32 = converted %int.ssub.loc11_35, %.loc11_35.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_38.3: = bound_method %.loc11_38.1, %.loc11_38.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc11_38.4: = specific_function %.loc11_38.3, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %.loc11_38.4(%.loc11_38.1) [template = constants.%.43] -// CHECK:STDOUT: %.loc11_38.5: %i32 = value_of_initializer %int.convert_checked.loc11_38 [template = constants.%.43] -// CHECK:STDOUT: %.loc11_38.6: %i32 = converted %.loc11_38.1, %.loc11_38.5 [template = constants.%.43] -// CHECK:STDOUT: %int.ssub.loc11_39: init %i32 = call %Sub.ref.loc11_14(%.loc11_35.2, %.loc11_38.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_39, %.loc11_40.1 [template = constants.%.33] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc11: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_22: = bound_method %int_0.loc11, %impl.elem0.loc11_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_22: = specific_function %Convert.bound.loc11_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %Convert.specific_fn.loc11_22(%int_0.loc11) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_22.1: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_22.2: %i32 = converted %int_0.loc11, %.loc11_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_25: = bound_method %int_2147483647.loc11, %impl.elem0.loc11_25 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_25: = specific_function %Convert.bound.loc11_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %Convert.specific_fn.loc11_25(%int_2147483647.loc11) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_2147483647.loc11, %.loc11_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.ssub.loc11_35: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.2, %.loc11_25.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_35.1: %i32 = value_of_initializer %int.ssub.loc11_35 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc11_35.2: %i32 = converted %int.ssub.loc11_35, %.loc11_35.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc11_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_38: = bound_method %int_2, %impl.elem0.loc11_38 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc11_38: = specific_function %Convert.bound.loc11_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %Convert.specific_fn.loc11_38(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_38.1: %i32 = value_of_initializer %int.convert_checked.loc11_38 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_38.2: %i32 = converted %int_2, %.loc11_38.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.ssub.loc11_39: init %i32 = call %Sub.ref.loc11_14(%.loc11_35.2, %.loc11_38.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_39 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_39, %.loc11_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc11_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 2b8b858b1fdc6..85ad072365d18 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -89,34 +89,34 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- int_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -147,18 +147,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -166,44 +166,44 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.uadd, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.uadd [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.uadd, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.uadd, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.uadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.uadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.uadd, %.loc4_24.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.uadd, %.loc4_24.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -212,18 +212,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -248,19 +248,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -271,22 +271,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -327,14 +327,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%.loc8_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.3: type = converted %int.make_type_signed.loc8_14, %.loc8_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%.loc8_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.3: type = converted %int.make_type_signed.loc8_22, %.loc8_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%int_32.loc8_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_signed.loc8_14, %.loc8_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%int_32.loc8_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_signed.loc8_22, %.loc8_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -350,22 +350,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%.loc13_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.3: type = converted %int.make_type_signed.loc13_15, %.loc13_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed.loc13_31, %.loc13_31.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%.loc13_39.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.3: type = converted %int.make_type_signed.loc13_39, %.loc13_39.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%int_32.loc13_39) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_signed.loc13_39, %.loc13_39.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -383,14 +383,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%.loc18_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.3: type = converted %int.make_type_signed.loc18_21, %.loc18_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%.loc18_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.2: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.3: type = converted %int.make_type_signed.loc18_29, %.loc18_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed.loc18_21, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%int_32.loc18_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_signed.loc18_29, %.loc18_29.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] @@ -409,18 +409,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%.loc19_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.3: type = converted %int.make_type_signed.loc19_17, %.loc19_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%.loc19_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.3: type = converted %int.make_type_signed.loc19_25, %.loc19_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%.loc19_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.2: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.3: type = converted %int.make_type_signed.loc19_33, %.loc19_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%int_32.loc19_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_signed.loc19_33, %.loc19_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -428,81 +428,81 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc25_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %.loc25_27.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.29] -// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.29] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.6) -// CHECK:STDOUT: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) +// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %.loc30_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.34] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.37] -// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.37] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6, %.loc30_35.6) -// CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) +// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] +// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %.loc35_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.29] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.34] -// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.34] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6, %.loc35_45.6) -// CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) +// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] +// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // 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: %.loc43_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc43: init type = call constants.%Int(%.loc43_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc43: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc43: init type = call constants.%Int(%int_32.loc43) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc43_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc43_34: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc43_37: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc43_16.2: type = value_of_initializer %int.make_type_signed.loc43 [template = constants.%i32] -// CHECK:STDOUT: %.loc43_16.3: type = converted %int.make_type_signed.loc43, %.loc43_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc43_39: type = array_type , %i32 [template = ] +// CHECK:STDOUT: %int_1.loc43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc43: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc43: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc43_16.1: type = value_of_initializer %int.make_type_signed.loc43 [template = constants.%i32] +// CHECK:STDOUT: %.loc43_16.2: type = converted %int.make_type_signed.loc43, %.loc43_16.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type , %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: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -511,14 +511,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc45_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc45_25: init type = call constants.%Int(%.loc45_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_25.2: type = value_of_initializer %int.make_type_signed.loc45_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_25.3: type = converted %int.make_type_signed.loc45_25, %.loc45_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc45_33: init type = call constants.%Int(%.loc45_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_33.2: type = value_of_initializer %int.make_type_signed.loc45_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_33.3: type = converted %int.make_type_signed.loc45_33, %.loc45_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc45_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc45_25: init type = call constants.%Int(%int_32.loc45_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc45_25.1: type = value_of_initializer %int.make_type_signed.loc45_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc45_25.2: type = converted %int.make_type_signed.loc45_25, %.loc45_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc45_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc45_33: init type = call constants.%Int(%int_32.loc45_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc45_33.1: type = value_of_initializer %int.make_type_signed.loc45_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc45_33.2: type = converted %int.make_type_signed.loc45_33, %.loc45_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -534,22 +534,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc49_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc49_26: init type = call constants.%Int(%.loc49_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_26.2: type = value_of_initializer %int.make_type_signed.loc49_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_26.3: type = converted %int.make_type_signed.loc49_26, %.loc49_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc49_34: init type = call constants.%Int(%.loc49_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_34.2: type = value_of_initializer %int.make_type_signed.loc49_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_34.3: type = converted %int.make_type_signed.loc49_34, %.loc49_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_42.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc49_42: init type = call constants.%Int(%.loc49_42.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_42.2: type = value_of_initializer %int.make_type_signed.loc49_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_42.3: type = converted %int.make_type_signed.loc49_42, %.loc49_42.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_50.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc49_50: init type = call constants.%Int(%.loc49_50.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_50.2: type = value_of_initializer %int.make_type_signed.loc49_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_50.3: type = converted %int.make_type_signed.loc49_50, %.loc49_50.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc49_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc49_26: init type = call constants.%Int(%int_32.loc49_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc49_26.1: type = value_of_initializer %int.make_type_signed.loc49_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_26.2: type = converted %int.make_type_signed.loc49_26, %.loc49_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc49_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc49_34: init type = call constants.%Int(%int_32.loc49_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc49_34.1: type = value_of_initializer %int.make_type_signed.loc49_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_34.2: type = converted %int.make_type_signed.loc49_34, %.loc49_34.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc49_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc49_42: init type = call constants.%Int(%int_32.loc49_42) [template = constants.%i32] +// CHECK:STDOUT: %.loc49_42.1: type = value_of_initializer %int.make_type_signed.loc49_42 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_42.2: type = converted %int.make_type_signed.loc49_42, %.loc49_42.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc49_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc49_50: init type = call constants.%Int(%int_32.loc49_50) [template = constants.%i32] +// CHECK:STDOUT: %.loc49_50.1: type = value_of_initializer %int.make_type_signed.loc49_50 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_50.2: type = converted %int.make_type_signed.loc49_50, %.loc49_50.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -567,14 +567,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc53_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53_32: init type = call constants.%Int(%.loc53_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_32.2: type = value_of_initializer %int.make_type_signed.loc53_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_32.3: type = converted %int.make_type_signed.loc53_32, %.loc53_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53_40: init type = call constants.%Int(%.loc53_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_40.2: type = value_of_initializer %int.make_type_signed.loc53_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_40.3: type = converted %int.make_type_signed.loc53_40, %.loc53_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc53_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53_32: init type = call constants.%Int(%int_32.loc53_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_32.1: type = value_of_initializer %int.make_type_signed.loc53_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_32.2: type = converted %int.make_type_signed.loc53_32, %.loc53_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc53_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53_40: init type = call constants.%Int(%int_32.loc53_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_40.1: type = value_of_initializer %int.make_type_signed.loc53_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_40.2: type = converted %int.make_type_signed.loc53_40, %.loc53_40.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc53_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc53_48.2: type = converted %bool.make_type, %.loc53_48.1 [template = bool] @@ -631,29 +631,29 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -681,18 +681,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -700,14 +700,14 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; @@ -715,42 +715,42 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref.loc7: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_30.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_30.1, %.loc7_30.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc7_30: init %i32 = call %.loc7_30.4(%.loc7_30.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked.loc7_30 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_30.1, %.loc7_30.5 [template = constants.%.33] -// CHECK:STDOUT: %int.uadd.loc7: init %i32 = call %Add.ref.loc7(%.loc7_18.6, %.loc7_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_32.1: %i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_32.2: %i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_18: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc7_18: = specific_function %Convert.bound.loc7_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %Convert.specific_fn.loc7_18(%int_2147483647.loc7) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_18.1: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_18.2: %i32 = converted %int_2147483647.loc7, %.loc7_18.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %impl.elem0.loc7_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_30: = bound_method %int_0, %impl.elem0.loc7_30 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_30: = specific_function %Convert.bound.loc7_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_30: init %i32 = call %Convert.specific_fn.loc7_30(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_30.1: %i32 = value_of_initializer %int.convert_checked.loc7_30 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_30.2: %i32 = converted %int_0, %.loc7_30.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.uadd.loc7: init %i32 = call %Add.ref.loc7(%.loc7_18.2, %.loc7_30.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_32.1: %i32 = value_of_initializer %int.uadd.loc7 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_32.2: %i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc7_32.2 // CHECK:STDOUT: %Add.ref.loc8: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc8_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 1 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_18.3: = bound_method %.loc8_18.1, %.loc8_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_18.4: = specific_function %.loc8_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc8_18: init %i32 = call %.loc8_18.4(%.loc8_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_18.5: %i32 = value_of_initializer %int.convert_checked.loc8_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_18.6: %i32 = converted %.loc8_18.1, %.loc8_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.37] -// CHECK:STDOUT: %int.uadd.loc8: init %i32 = call %Add.ref.loc8(%.loc8_18.6, %.loc8_30.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc8_32.1: %i32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_32.2: %i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%.38] +// CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc8_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_18: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_18: = specific_function %Convert.bound.loc8_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_18: init %i32 = call %Convert.specific_fn.loc8_18(%int_2147483647.loc8) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_18.1: %i32 = value_of_initializer %int.convert_checked.loc8_18 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_18.2: %i32 = converted %int_2147483647.loc8, %.loc8_18.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_30: = bound_method %int_1, %impl.elem0.loc8_30 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc8_30: = specific_function %Convert.bound.loc8_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %Convert.specific_fn.loc8_30(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_1, %.loc8_30.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.uadd.loc8: init %i32 = call %Add.ref.loc8(%.loc8_18.2, %.loc8_30.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc8_32.1: %i32 = value_of_initializer %int.uadd.loc8 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc8_32.2: %i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc8_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index ffb8863b886b1..23a9d6f2fa284 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -56,34 +56,34 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -114,18 +114,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -133,44 +133,44 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.udiv, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.udiv [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.udiv, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.udiv, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.udiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.udiv [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.udiv, %.loc4_24.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.udiv, %.loc4_24.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -179,18 +179,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -215,41 +215,41 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.37: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_0: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -280,18 +280,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -307,18 +307,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -332,31 +332,31 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; @@ -369,102 +369,102 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%.35] -// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_1.loc9, %.loc9_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%int_0] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%int_0] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int_2147483647.loc12, %.loc12_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.1: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.2: %i32 = converted %int_1.loc12_43, %.loc12_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.1: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.2: %i32 = converted %int_1.loc12_47, %.loc12_47.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc15: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_29: = bound_method %int_2147483647.loc15, %impl.elem0.loc15_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc15_29: = specific_function %Convert.bound.loc15_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %Convert.specific_fn.loc15_29(%int_2147483647.loc15) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc15_29.1: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc15_29.2: %i32 = converted %int_2147483647.loc15, %.loc15_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc15_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_43: = bound_method %int_1.loc15_43, %impl.elem0.loc15_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_43: = specific_function %Convert.bound.loc15_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %Convert.specific_fn.loc15_43(%int_1.loc15_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_43.1: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_43.2: %i32 = converted %int_1.loc15_43, %.loc15_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.2) [template = constants.%int_-2147483648] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%.35] -// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc15_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_54: = bound_method %int_1.loc15_54, %impl.elem0.loc15_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_54: = specific_function %Convert.bound.loc15_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %Convert.specific_fn.loc15_54(%int_1.loc15_54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_54.1: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_54.2: %i32 = converted %int_1.loc15_54, %.loc15_54.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.udiv.loc15 [template = constants.%int_0] +// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%int_0] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -472,24 +472,24 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -517,18 +517,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -536,14 +536,14 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed.loc10, %.loc10_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; @@ -551,40 +551,40 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.udiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.6, %.loc10_21.6) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_1, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_1, %.loc10_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_21: = bound_method %int_0.loc10, %impl.elem0.loc10_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_21: = specific_function %Convert.bound.loc10_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %Convert.specific_fn.loc10_21(%int_0.loc10) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.1: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_0.loc10, %.loc10_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.udiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.2, %.loc10_21.2) [template = ] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.udiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.udiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc10_23.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc15_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.6, %.loc15_21.6) [template = ] +// CHECK:STDOUT: %int_0.loc15_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc15_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_18: = bound_method %int_0.loc15_18, %impl.elem0.loc15_18 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_18: = specific_function %Convert.bound.loc15_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %Convert.specific_fn.loc15_18(%int_0.loc15_18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_0.loc15_18, %.loc15_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_21: = bound_method %int_0.loc15_21, %impl.elem0.loc15_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_21: = specific_function %Convert.bound.loc15_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %Convert.specific_fn.loc15_21(%int_0.loc15_21) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int_0.loc15_21, %.loc15_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.2, %.loc15_21.2) [template = ] // CHECK:STDOUT: %.loc15_23.1: %i32 = value_of_initializer %int.udiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: %i32 = converted %int.udiv.loc15, %.loc15_23.1 [template = ] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_23.2 diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 6991cfa4c329d..895dfe6e16d71 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -58,34 +58,34 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -116,18 +116,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -135,44 +135,44 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.umod, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.umod [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.umod, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.umod, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umod [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umod, %.loc4_24.1 [template = constants.%int_2.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.umod, %.loc4_24.3 [template = constants.%int_2.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -181,18 +181,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -217,41 +217,41 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_0: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -282,18 +282,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -309,18 +309,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -334,31 +334,31 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%.loc6_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_14, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%.loc6_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.3: type = converted %int.make_type_signed.loc6_22, %.loc6_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; @@ -371,102 +371,102 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%.35] -// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.30] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_1.loc9, %.loc9_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.37] +// CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int_2147483647.loc12, %.loc12_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.1: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_43.2: %i32 = converted %int_1.loc12_43, %.loc12_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.1: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_47.2: %i32 = converted %int_1.loc12_47, %.loc12_47.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.2) [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%int_0] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%int_0] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc15: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int_2147483647.loc15: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_29: = bound_method %int_2147483647.loc15, %impl.elem0.loc15_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc15_29: = specific_function %Convert.bound.loc15_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %Convert.specific_fn.loc15_29(%int_2147483647.loc15) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc15_29.1: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc15_29.2: %i32 = converted %int_2147483647.loc15, %.loc15_29.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1.loc15_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_43: = bound_method %int_1.loc15_43, %impl.elem0.loc15_43 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_43: = specific_function %Convert.bound.loc15_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %Convert.specific_fn.loc15_43(%int_1.loc15_43) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_43.1: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_43.2: %i32 = converted %int_1.loc15_43, %.loc15_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.2) [template = constants.%int_-2147483648] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%.35] -// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.umod.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.36] +// CHECK:STDOUT: %int_1.loc15_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_54: = bound_method %int_1.loc15_54, %impl.elem0.loc15_54 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_54: = specific_function %Convert.bound.loc15_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %Convert.specific_fn.loc15_54(%int_1.loc15_54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_54.1: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_54.2: %i32 = converted %int_1.loc15_54, %.loc15_54.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%int_-1] +// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%int_-1] +// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.umod.loc15 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -474,24 +474,24 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -519,18 +519,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -538,14 +538,14 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.3: type = converted %int.make_type_signed.loc17, %.loc17_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; @@ -553,40 +553,40 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc12_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.6, %.loc12_21.6) [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_18: = bound_method %int_1, %impl.elem0.loc12_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_18: = specific_function %Convert.bound.loc12_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %Convert.specific_fn.loc12_18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int_0.loc12, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %Convert.specific_fn.loc12_21(%int_0.loc12) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int_0.loc12, %.loc12_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.2, %.loc12_21.2) [template = ] // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.umod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.umod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc12_23.2 // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.6, %.loc17_21.6) [template = ] +// CHECK:STDOUT: %int_0.loc17_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc17_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_18: = bound_method %int_0.loc17_18, %impl.elem0.loc17_18 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_18: = specific_function %Convert.bound.loc17_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %Convert.specific_fn.loc17_18(%int_0.loc17_18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_18.1: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_18.2: %i32 = converted %int_0.loc17_18, %.loc17_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_21: = bound_method %int_0.loc17_21, %impl.elem0.loc17_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_21: = specific_function %Convert.bound.loc17_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %Convert.specific_fn.loc17_21(%int_0.loc17_21) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.1: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.2: %i32 = converted %int_0.loc17_21, %.loc17_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.umod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.2, %.loc17_21.2) [template = ] // CHECK:STDOUT: %.loc17_23.1: %i32 = value_of_initializer %int.umod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: %i32 = converted %int.umod.loc17, %.loc17_23.1 [template = ] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc17_23.2 diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index fcf263687843c..55394d1ac5cbb 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -31,34 +31,34 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- int_mul.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -89,18 +89,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -108,44 +108,44 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.umul, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.umul [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.umul, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.umul, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umul [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umul, %.loc4_24.1 [template = constants.%int_6.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.umul, %.loc4_24.3 [template = constants.%int_6.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -154,18 +154,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -190,39 +190,39 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32767 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 65536 [template] +// CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] +// CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %int_2147418112: %i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -250,18 +250,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -269,14 +269,14 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; @@ -284,42 +284,42 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32767 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.umul.loc6 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.34] +// CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] +// CHECK:STDOUT: %int_65536.loc6: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_32767, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_32767) [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_32767.2] +// CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_32767, %.loc6_18.1 [template = constants.%int_32767.2] +// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_26: = bound_method %int_65536.loc6, %impl.elem0.loc6_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_26: = specific_function %Convert.bound.loc6_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Convert.specific_fn.loc6_26(%int_65536.loc6) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc6_26.1: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc6_26.2: %i32 = converted %int_65536.loc6, %.loc6_26.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.umul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.2, %.loc6_26.2) [template = constants.%int_2147418112] +// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.umul.loc6 [template = constants.%int_2147418112] +// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%int_2147418112] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc7: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_26.3: = bound_method %.loc7_26.1, %.loc7_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_26.4: = specific_function %.loc7_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %.loc7_26.4(%.loc7_26.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_26.5: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_26.6: %i32 = converted %.loc7_26.1, %.loc7_26.5 [template = constants.%.33] -// CHECK:STDOUT: %int.umul.loc7: init %i32 = call %Mul.ref.loc7(%.loc7_18.6, %.loc7_26.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_34.1: %i32 = value_of_initializer %int.umul.loc7 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_34.2: %i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%.39] +// CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] +// CHECK:STDOUT: %int_65536.loc7: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] +// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_18: = bound_method %int_32768, %impl.elem0.loc7_18 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc7_18: = specific_function %Convert.bound.loc7_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %Convert.specific_fn.loc7_18(%int_32768) [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc7_18.1: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%int_32768.2] +// CHECK:STDOUT: %.loc7_18.2: %i32 = converted %int_32768, %.loc7_18.1 [template = constants.%int_32768.2] +// CHECK:STDOUT: %impl.elem0.loc7_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_26: = bound_method %int_65536.loc7, %impl.elem0.loc7_26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_26: = specific_function %Convert.bound.loc7_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %Convert.specific_fn.loc7_26(%int_65536.loc7) [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc7_26.1: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%int_65536.2] +// CHECK:STDOUT: %.loc7_26.2: %i32 = converted %int_65536.loc7, %.loc7_26.1 [template = constants.%int_65536.2] +// CHECK:STDOUT: %int.umul.loc7: init %i32 = call %Mul.ref.loc7(%.loc7_18.2, %.loc7_26.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_34.1: %i32 = value_of_initializer %int.umul.loc7 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_34.2: %i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index e59b33550d442..64b29a835526c 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -115,34 +115,34 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- int_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 123 [template] +// CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 123 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] +// CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -172,58 +172,58 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%.loc2_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.3: type = converted %int.make_type_signed.loc2_14, %.loc2_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%.loc2_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.3: type = converted %int.make_type_signed.loc2_22, %.loc2_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc4_30.1: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.unegate.loc4_33 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.unegate.loc4_33, %.loc4_33.1 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_34.2: = bound_method %int.unegate.loc4_34, %.loc4_34.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_34.3: = specific_function %.loc4_34.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_34.4: %i32 = value_of_initializer %int.unegate.loc4_34 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_34.5: %i32 = converted %int.unegate.loc4_34, %.loc4_34.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %.loc4_34.3(%.loc4_34.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc4_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_34.7: Core.IntLiteral = converted %int.unegate.loc4_34, %.loc4_34.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_34.7, %i32 [template = constants.%.34] -// CHECK:STDOUT: %arr.var: ref %.34 = var arr -// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.34] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.34 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int_123.loc4, %.loc4_30.1 [template = constants.%int_123.2] +// CHECK:STDOUT: %int.unegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.2) [template = constants.%int_-123] +// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.unegate.loc4_33 [template = constants.%int_-123] +// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.unegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] +// CHECK:STDOUT: %int.unegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.unegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.unegate.loc4_34 [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.unegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] +// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc4_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc4_34.4: Core.IntLiteral = converted %int.unegate.loc4_34, %.loc4_34.3 [template = constants.%int_123.1] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_34.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -232,18 +232,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%.loc9_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.3: type = converted %int.make_type_signed.loc9_19, %.loc9_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%.loc9_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.2: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.3: type = converted %int.make_type_signed.loc9_27, %.loc9_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%.loc9_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.2: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.3: type = converted %int.make_type_signed.loc9_35, %.loc9_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%int_32.loc9_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%int_32.loc9_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_signed.loc9_27, %.loc9_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%int_32.loc9_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_signed.loc9_35, %.loc9_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -267,20 +267,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.34 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.35 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.35 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] -// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.39] -// CHECK:STDOUT: %int.unegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.unegate [template = constants.%.40] -// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%.40] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int_1, %.loc7_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.unegate: init %i32 = call %Negate.ref(%.loc7_21.2) [template = constants.%int_-1] +// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.unegate [template = constants.%int_-1] +// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%int_-1] // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -288,10 +288,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -302,18 +302,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -352,10 +352,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.3: type = converted %int.make_type_signed, %.loc8_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_signed, %.loc8_16.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -367,18 +367,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%.loc13_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.3: type = converted %int.make_type_signed.loc13_15, %.loc13_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed.loc13_31, %.loc13_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -392,10 +392,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.3: type = converted %int.make_type_signed, %.loc18_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed, %.loc18_21.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] @@ -410,72 +410,72 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%.loc19_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.3: type = converted %int.make_type_signed.loc19_17, %.loc19_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%.loc19_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.3: type = converted %int.make_type_signed.loc19_25, %.loc19_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc25_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] // 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: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %.loc30_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.33] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6) -// CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) +// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] +// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %.loc35_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.30] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6) -// CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) +// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] +// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // 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: %.loc44_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%.loc44_16.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_16.2: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.3: type = converted %int.make_type_signed.loc44, %.loc44_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_36: type = array_type , %i32 [template = ] +// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] +// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type , %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: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -484,14 +484,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc46_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%.loc46_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.3: type = converted %int.make_type_signed.loc46_25, %.loc46_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%.loc46_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.3: type = converted %int.make_type_signed.loc46_33, %.loc46_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -507,22 +507,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc57_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%.loc57_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.2: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.3: type = converted %int.make_type_signed.loc57_26, %.loc57_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%.loc57_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.2: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.3: type = converted %int.make_type_signed.loc57_34, %.loc57_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%.loc57_42.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.2: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.3: type = converted %int.make_type_signed.loc57_42, %.loc57_42.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%.loc57_50.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.2: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.3: type = converted %int.make_type_signed.loc57_50, %.loc57_50.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%int_32.loc57_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_signed.loc57_26, %.loc57_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%int_32.loc57_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_signed.loc57_34, %.loc57_34.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%int_32.loc57_42) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_signed.loc57_42, %.loc57_42.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%int_32.loc57_50) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] +// CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_signed.loc57_50, %.loc57_50.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -540,14 +540,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc68_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%.loc68_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.2: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.3: type = converted %int.make_type_signed.loc68_32, %.loc68_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%.loc68_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.2: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.3: type = converted %int.make_type_signed.loc68_40, %.loc68_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%int_32.loc68_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_signed.loc68_32, %.loc68_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%int_32.loc68_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_signed.loc68_40, %.loc68_40.1 [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] @@ -595,28 +595,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -643,14 +643,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%.loc4_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.3: type = converted %int.make_type_signed.loc4_14, %.loc4_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%.loc4_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.3: type = converted %int.make_type_signed.loc4_22, %.loc4_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%int_32.loc4_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed.loc4_14, %.loc4_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -664,18 +664,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5_11, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5_19, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%.loc5_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.3: type = converted %int.make_type_signed.loc5_27, %.loc5_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -683,14 +683,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.unegate"; @@ -701,46 +701,46 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.unegate.loc8_38 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.unegate.loc8_38, %.loc8_38.1 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_39 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_39, %.loc8_40.1 [template = constants.%.29] +// CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2147483647.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2147483647.loc8) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_28.1: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_28.2: %i32 = converted %int_2147483647.loc8, %.loc8_28.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.unegate.loc8_38 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.unegate.loc8_38, %.loc8_38.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int.unegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_39 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_39, %.loc8_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc11_32.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_32.3: = bound_method %.loc11_32.1, %.loc11_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_32.4: = specific_function %.loc11_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %.loc11_32.4(%.loc11_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_32.5: %i32 = value_of_initializer %int.convert_checked.loc11_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_32.6: %i32 = converted %.loc11_32.1, %.loc11_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc11_42: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_42.1: %i32 = value_of_initializer %int.unegate.loc11_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_42.2: %i32 = converted %int.unegate.loc11_42, %.loc11_42.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_45.1, %.loc11_45.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %.loc11_45.4(%.loc11_45.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_45.5: %i32 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_45.6: %i32 = converted %.loc11_45.1, %.loc11_45.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_42.2, %.loc11_45.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_46.1: %i32 = value_of_initializer %int.usub [template = constants.%.35] -// CHECK:STDOUT: %.loc11_46.2: %i32 = converted %int.usub, %.loc11_46.1 [template = constants.%.35] -// CHECK:STDOUT: %int.unegate.loc11_47: init %i32 = call %Negate.ref.loc11_14(%.loc11_46.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_47 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_47, %.loc11_48.1 [template = constants.%.35] +// CHECK:STDOUT: %int_2147483647.loc11: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc11_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_32: = bound_method %int_2147483647.loc11, %impl.elem0.loc11_32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_32: = specific_function %Convert.bound.loc11_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %Convert.specific_fn.loc11_32(%int_2147483647.loc11) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_32.1: %i32 = value_of_initializer %int.convert_checked.loc11_32 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc11_32.2: %i32 = converted %int_2147483647.loc11, %.loc11_32.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.unegate.loc11_42: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_42.1: %i32 = value_of_initializer %int.unegate.loc11_42 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc11_42.2: %i32 = converted %int.unegate.loc11_42, %.loc11_42.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc11_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_45: = bound_method %int_1, %impl.elem0.loc11_45 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_45: = specific_function %Convert.bound.loc11_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %Convert.specific_fn.loc11_45(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_45.1: %i32 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_45.2: %i32 = converted %int_1, %.loc11_45.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_42.2, %.loc11_45.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc11_46.1: %i32 = value_of_initializer %int.usub [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc11_46.2: %i32 = converted %int.usub, %.loc11_46.1 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %int.unegate.loc11_47: init %i32 = call %Negate.ref.loc11_14(%.loc11_46.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_47 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_47, %.loc11_48.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc11_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 916aee3ed838e..613188df4255c 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -32,34 +32,34 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- int_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -90,18 +90,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -109,44 +109,44 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.usub, %.loc4_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.usub [template = constants.%.34] -// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.usub, %.loc4_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.usub, %.loc4_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.usub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.usub [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.usub, %.loc4_24.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.usub, %.loc4_24.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -155,18 +155,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -191,43 +191,43 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -256,18 +256,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%.loc4_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.3: type = converted %int.make_type_signed.loc4_19, %.loc4_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed.loc4_27, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -275,18 +275,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; @@ -294,83 +294,83 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_21.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.usub.loc6 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.34] +// CHECK:STDOUT: %int_0.loc6: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_0.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_0.loc6) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_0.loc6, %.loc6_18.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_21: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_21: = specific_function %Convert.bound.loc6_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %Convert.specific_fn.loc6_21(%int_2147483647.loc6) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_21.1: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc6_21.2: %i32 = converted %int_2147483647.loc6, %.loc6_21.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.usub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.2, %.loc6_21.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.usub.loc6 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc7_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.usub.loc7_35 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.usub.loc7_35, %.loc7_35.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] -// CHECK:STDOUT: %int.usub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_39 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_39, %.loc7_40.1 [template = constants.%.39] +// CHECK:STDOUT: %int_0.loc7: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_22: = bound_method %int_0.loc7, %impl.elem0.loc7_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc7_22: = specific_function %Convert.bound.loc7_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %Convert.specific_fn.loc7_22(%int_0.loc7) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_22.1: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_22.2: %i32 = converted %int_0.loc7, %.loc7_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_25: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_25 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_25: = specific_function %Convert.bound.loc7_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %Convert.specific_fn.loc7_25(%int_2147483647.loc7) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_25.1: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc7_25.2: %i32 = converted %int_2147483647.loc7, %.loc7_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.usub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.2, %.loc7_25.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.usub.loc7_35 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.usub.loc7_35, %.loc7_35.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_38: = bound_method %int_1, %impl.elem0.loc7_38 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc7_38: = specific_function %Convert.bound.loc7_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %Convert.specific_fn.loc7_38(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_38.1: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_38.2: %i32 = converted %int_1, %.loc7_38.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.usub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.2) [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_39 [template = constants.%int_-2147483648] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_39, %.loc7_40.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_25.1, %.loc8_25.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %.loc8_25.4(%.loc8_25.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_25.1, %.loc8_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub.loc8_35: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.6, %.loc8_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.usub.loc8_35 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.usub.loc8_35, %.loc8_35.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_38.3: = bound_method %.loc8_38.1, %.loc8_38.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_38.4: = specific_function %.loc8_38.3, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %.loc8_38.4(%.loc8_38.1) [template = constants.%.43] -// CHECK:STDOUT: %.loc8_38.5: %i32 = value_of_initializer %int.convert_checked.loc8_38 [template = constants.%.43] -// CHECK:STDOUT: %.loc8_38.6: %i32 = converted %.loc8_38.1, %.loc8_38.5 [template = constants.%.43] -// CHECK:STDOUT: %int.usub.loc8_39: init %i32 = call %Sub.ref.loc8_14(%.loc8_35.2, %.loc8_38.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_39, %.loc8_40.1 [template = constants.%.33] +// CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_22: = bound_method %int_0.loc8, %impl.elem0.loc8_22 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_22: = specific_function %Convert.bound.loc8_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %Convert.specific_fn.loc8_22(%int_0.loc8) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_0.loc8, %.loc8_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc8_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_25: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_25 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_25: = specific_function %Convert.bound.loc8_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %Convert.specific_fn.loc8_25(%int_2147483647.loc8) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2147483647.loc8, %.loc8_25.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %int.usub.loc8_35: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.2, %.loc8_25.2) [template = constants.%int_-2147483647] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.usub.loc8_35 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.usub.loc8_35, %.loc8_35.1 [template = constants.%int_-2147483647] +// CHECK:STDOUT: %impl.elem0.loc8_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_38: = bound_method %int_2, %impl.elem0.loc8_38 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc8_38: = specific_function %Convert.bound.loc8_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %Convert.specific_fn.loc8_38(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.convert_checked.loc8_38 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int_2, %.loc8_38.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.usub.loc8_39: init %i32 = call %Sub.ref.loc8_14(%.loc8_35.2, %.loc8_38.2) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_39 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_39, %.loc8_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc8_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index a905e933bc33c..0834a7b9cd303 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -22,34 +22,34 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_xor.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Xor.type: type = fn_type @Xor [template] // CHECK:STDOUT: %Xor: %Xor.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] +// CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] -// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,18 +80,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%.loc2_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.3: type = converted %int.make_type_signed.loc2_11, %.loc2_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%.loc2_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.3: type = converted %int.make_type_signed.loc2_19, %.loc2_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%.loc2_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.3: type = converted %int.make_type_signed.loc2_27, %.loc2_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -99,44 +99,44 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] -// CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_24.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.33] -// CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.xor, %.loc4_26.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.xor [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.xor, %.loc4_26.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.xor, %.loc4_26.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var -// CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] +// CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.xor, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.xor [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.xor, %.loc4_26.1 [template = constants.%int_6.1] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_26.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc4_26.4: Core.IntLiteral = converted %int.xor, %.loc4_26.3 [template = constants.%int_6.2] +// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_26.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -145,18 +145,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.3: type = converted %int.make_type_signed.loc7_19, %.loc7_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%.loc7_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.3: type = converted %int.make_type_signed.loc7_27, %.loc7_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%.loc7_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.3: type = converted %int.make_type_signed.loc7_35, %.loc7_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr +// CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/print.carbon b/toolchain/check/testdata/builtins/print.carbon index 007b886972cbd..3e1c342ede10b 100644 --- a/toolchain/check/testdata/builtins/print.carbon +++ b/toolchain/check/testdata/builtins/print.carbon @@ -19,29 +19,29 @@ fn Main() { // CHECK:STDOUT: --- print.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Print.type.1: type = fn_type @Print.1 [template] // CHECK:STDOUT: %Print.1: %Print.type.1 = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Print.type.2: type = fn_type @Print.2 [template] // CHECK:STDOUT: %Print.2: %Print.type.2 = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,10 +66,10 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed, %.loc11_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed, %.loc11_13.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -81,24 +81,24 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc14: %Print.type.1 = name_ref Print, file.%Print.decl [template = constants.%Print.1] -// CHECK:STDOUT: %.loc14_9.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_9.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_9.3: = bound_method %.loc14_9.1, %.loc14_9.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_9.4: = specific_function %.loc14_9.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_9.4(%.loc14_9.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_9.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_9.6: %i32 = converted %.loc14_9.1, %.loc14_9.5 [template = constants.%.29] -// CHECK:STDOUT: %print.int.loc14: init %empty_tuple.type = call %Print.ref.loc14(%.loc14_9.6) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1, %impl.elem0.loc14 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_9.1: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_9.2: %i32 = converted %int_1, %.loc14_9.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %print.int.loc14: init %empty_tuple.type = call %Print.ref.loc14(%.loc14_9.2) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Print.ref.loc16: %Print.type.2 = name_ref Print, imports.%import_ref.38 [template = constants.%Print.2] -// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_14.3: = bound_method %.loc16_14.1, %.loc16_14.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc16_14.4: = specific_function %.loc16_14.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_14.4(%.loc16_14.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc16_14.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.33] -// CHECK:STDOUT: %.loc16_14.6: %i32 = converted %.loc16_14.1, %.loc16_14.5 [template = constants.%.33] -// CHECK:STDOUT: %print.int.loc16: init %empty_tuple.type = call %Print.ref.loc16(%.loc16_14.6) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_2, %impl.elem0.loc16 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_14.1: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_14.2: %i32 = converted %int_2, %.loc16_14.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %print.int.loc16: init %empty_tuple.type = call %Print.ref.loc16(%.loc16_14.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 00305d2b765f8..edd059202103f 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -149,31 +149,31 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Circle, %i32 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %i32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] // CHECK:STDOUT: %SomeInternalFunction: %SomeInternalFunction.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.31: type = struct_type {.radius: %i32} [template] -// CHECK:STDOUT: %.32: = complete_type_witness %.31 [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.38: type = struct_type {.radius: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %Circle = struct_value (%.30) [template] +// CHECK:STDOUT: %struct_type.radius.1: type = struct_type {.radius: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius.1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %struct_type.radius.2: type = struct_type {.radius: Core.IntLiteral} [template] +// CHECK:STDOUT: %Circle.val: %Circle = struct_value (%int_5.2) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -199,31 +199,31 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { -// CHECK:STDOUT: %.loc5_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.3: type = converted %int.make_type_signed.loc5, %.loc5_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %.2 = field_decl radius, element0 [template] -// CHECK:STDOUT: %.loc6_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_39.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_39.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_39.3: type = converted %int.make_type_signed.loc6, %.loc6_39.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_45: Core.IntLiteral = int_value 5 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_46.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_46.2: = bound_method %.loc6_45, %.loc6_46.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_46.3: = specific_function %.loc6_46.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_46.3(%.loc6_45) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_46.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc6_46.5: %i32 = converted %.loc6_45, %.loc6_46.4 [template = constants.%.30] -// CHECK:STDOUT: %SOME_INTERNAL_CONSTANT: %i32 = bind_name SOME_INTERNAL_CONSTANT, %.loc6_46.5 +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_signed.loc5, %.loc5_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_21: %Circle.elem = field_decl radius, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_39.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_39.2: type = converted %int.make_type_signed.loc6, %.loc6_39.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_46.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_46.2: %i32 = converted %int_5, %.loc6_46.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %SOME_INTERNAL_CONSTANT: %i32 = bind_name SOME_INTERNAL_CONSTANT, %.loc6_46.2 // CHECK:STDOUT: %SomeInternalFunction.decl: %SomeInternalFunction.type = fn_decl @SomeInternalFunction [template = constants.%SomeInternalFunction] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_40.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_40.3: type = converted %int.make_type_signed, %.loc8_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_40.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_40.2: type = converted %int.make_type_signed, %.loc8_40.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -235,7 +235,7 @@ class A { // CHECK:STDOUT: %return.param: ref %Circle = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Circle = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.31 [template = constants.%.32] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -243,34 +243,34 @@ class A { // CHECK:STDOUT: .SOME_INTERNAL_CONSTANT [private] = %SOME_INTERNAL_CONSTANT // CHECK:STDOUT: .SomeInternalFunction [private] = %SomeInternalFunction.decl // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_12: Core.IntLiteral = int_value 0 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_13.2: = bound_method %.loc9_12, %.loc9_13.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_13.3: = specific_function %.loc9_13.2, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_13.3(%.loc9_12) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.36] -// CHECK:STDOUT: %.loc9_13.5: %i32 = converted %.loc9_12, %.loc9_13.4 [template = constants.%.36] -// CHECK:STDOUT: return %.loc9_13.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_13.2: %i32 = converted %int_0, %.loc9_13.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc9_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Circle { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_23: Core.IntLiteral = int_value 5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_24.1: %.38 = struct_literal (%.loc13_23) -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_23, %.loc13_24.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_24.4(%.loc13_23) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_24.5: init %i32 = converted %.loc13_23, %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc13_24.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc13_24.7: init %i32 = initialize_from %.loc13_24.5 to %.loc13_24.6 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_24.8: init %Circle = class_init (%.loc13_24.7), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc13_25: init %Circle = converted %.loc13_24.1, %.loc13_24.8 [template = constants.%struct] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.2 = struct_literal (%int_5) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc13_24.2: init %i32 = converted %int_5, %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc13_24.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc13_24.4: init %i32 = initialize_from %.loc13_24.2 to %.loc13_24.3 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc13_24.5: init %Circle = class_init (%.loc13_24.4), %return [template = constants.%Circle.val] +// CHECK:STDOUT: %.loc13_25: init %Circle = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%Circle.val] // CHECK:STDOUT: return %.loc13_25 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -284,16 +284,16 @@ class A { // CHECK:STDOUT: %.loc18_36.2: ref %Circle = temporary %.loc18_36.1, %Make.call // CHECK:STDOUT: %.loc18_36.3: %Circle = bind_value %.loc18_36.2 // CHECK:STDOUT: %circle: %Circle = bind_name circle, %.loc18_36.3 -// CHECK:STDOUT: %.loc26_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc26_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc26_15.3: type = converted %int.make_type_signed, %.loc26_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc26_15.2: type = converted %int.make_type_signed, %.loc26_15.1 [template = constants.%i32] // CHECK:STDOUT: %circle.ref.loc26: %Circle = name_ref circle, %circle // CHECK:STDOUT: %radius.ref.loc26: = name_ref radius, [template = ] // CHECK:STDOUT: %radius: %i32 = bind_name radius, // CHECK:STDOUT: %circle.ref.loc34: %Circle = name_ref circle, %circle // CHECK:STDOUT: %radius.ref.loc34: = name_ref radius, [template = ] -// CHECK:STDOUT: %.loc34: Core.IntLiteral = int_value 5 [template = constants.%.3] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: assign %radius.ref.loc34, // CHECK:STDOUT: %circle.ref.loc42: %Circle = name_ref circle, %circle // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT.ref: = name_ref SOME_INTERNAL_CONSTANT, [template = ] @@ -306,13 +306,13 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -337,25 +337,25 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.3: type = converted %int.make_type_signed, %.loc5_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed, %.loc5_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x [protected] = %.loc5_18 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.3: type = converted %int.make_type_signed, %.loc16_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: %x: %i32 = bind_name x, @@ -366,27 +366,27 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Circle, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %i32 [template] // CHECK:STDOUT: %GetRadius.type: type = fn_type @GetRadius [template] // CHECK:STDOUT: %GetRadius: %GetRadius.type = struct_value () [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] // CHECK:STDOUT: %SomeInternalFunction: %SomeInternalFunction.type = struct_value () [template] // CHECK:STDOUT: %Compute.type: type = fn_type @Compute [template] // CHECK:STDOUT: %Compute: %Compute.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.radius: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %struct_type.radius: type = struct_type {.radius: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -408,11 +408,11 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { -// CHECK:STDOUT: %.loc5_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.3: type = converted %int.make_type_signed, %.loc5_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %.2 = field_decl radius, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_signed, %.loc5_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_21: %Circle.elem = field_decl radius, element0 [template] // CHECK:STDOUT: %GetRadius.decl: %GetRadius.type = fn_decl @GetRadius [template = constants.%GetRadius] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Circle = value_param_pattern %self.patt, runtime_param0 @@ -420,10 +420,10 @@ class A { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %.loc7_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_33.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_33.3: type = converted %int.make_type_signed, %.loc7_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc7_33.2: type = converted %int.make_type_signed, %.loc7_33.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -433,10 +433,10 @@ class A { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_40.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_40.3: type = converted %int.make_type_signed, %.loc11_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_40.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_40.2: type = converted %int.make_type_signed, %.loc11_40.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -447,16 +447,16 @@ class A { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %.loc15_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_31.3: type = converted %int.make_type_signed, %.loc15_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_31.2: type = converted %int.make_type_signed, %.loc15_31.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -464,13 +464,13 @@ class A { // CHECK:STDOUT: .GetRadius = %GetRadius.decl // CHECK:STDOUT: .SomeInternalFunction [private] = %SomeInternalFunction.decl // CHECK:STDOUT: .Compute = %Compute.decl -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @GetRadius[%self.param_patt: %Circle]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Circle = name_ref self, %self -// CHECK:STDOUT: %radius.ref: %.2 = name_ref radius, @Circle.%.loc5_21 [template = @Circle.%.loc5_21] +// CHECK:STDOUT: %radius.ref: %Circle.elem = name_ref radius, @Circle.%.loc5_21 [template = @Circle.%.loc5_21] // CHECK:STDOUT: %.loc8_16.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc8_16.2: %i32 = bind_value %.loc8_16.1 // CHECK:STDOUT: return %.loc8_16.2 @@ -478,14 +478,14 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_12: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_13.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_13.2: = bound_method %.loc12_12, %.loc12_13.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_13.3: = specific_function %.loc12_13.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_13.3(%.loc12_12) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.5: %i32 = converted %.loc12_12, %.loc12_13.4 [template = constants.%.33] -// CHECK:STDOUT: return %.loc12_13.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_13.2: %i32 = converted %int_0, %.loc12_13.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc12_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Compute[%self.param_patt: %Circle]() -> %i32 { @@ -502,20 +502,20 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.30: type = struct_type {} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -535,31 +535,31 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed, %.loc8_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed, %.loc8_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_16: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_17.2: = bound_method %.loc5_16, %.loc5_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_17.3: = specific_function %.loc5_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_17.3(%.loc5_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc5_17.5: %i32 = converted %.loc5_16, %.loc5_17.4 [template = constants.%.29] -// CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_17.5 -// CHECK:STDOUT: %.loc6: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_17.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_17.2: %i32 = converted %int_5, %.loc5_17.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_17.2 +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x = %x -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -574,20 +574,20 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.30: type = struct_type {} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -608,48 +608,48 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %.loc16_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.3: type = converted %int.make_type_signed.loc16, %.loc16_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.3: type = converted %int.make_type_signed.loc23, %.loc23_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed.loc23, %.loc23_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.3: type = converted %int.make_type_signed.loc5, %.loc5_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_26: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_27.2: = bound_method %.loc5_26, %.loc5_27.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_27.3: = specific_function %.loc5_27.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_27.3(%.loc5_26) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_27.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_27.5: %i32 = converted %.loc5_26, %.loc5_27.4 [template = constants.%.29] -// CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_27.5 -// CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.3: type = converted %int.make_type_signed.loc6, %.loc6_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.2: = bound_method %.loc6_24, %.loc6_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_25.3: = specific_function %.loc6_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_25.3(%.loc6_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %.loc6_24, %.loc6_25.4 [template = constants.%.29] -// CHECK:STDOUT: %y: %i32 = bind_name y, %.loc6_25.5 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed.loc5, %.loc5_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_27.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_27.2: %i32 = converted %int_5.loc5, %.loc5_27.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_27.2 +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_signed.loc6, %.loc6_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_25.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_25.2: %i32 = converted %int_5.loc6, %.loc6_25.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %y: %i32 = bind_name y, %.loc6_25.2 +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x [protected] = %x // CHECK:STDOUT: .y [private] = %y -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -672,8 +672,8 @@ class A { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -695,13 +695,13 @@ class A { // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .F [private] = %F.decl // CHECK:STDOUT: .G [private] = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index dcaafe8258809..57defef8f2a54 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -49,13 +49,13 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %SomeClass, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] // CHECK:STDOUT: } @@ -82,51 +82,51 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %SomeClass.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass // CHECK:STDOUT: .a = %.loc5_8 // CHECK:STDOUT: .b = %.loc6_8 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // 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.ref [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { -// CHECK:STDOUT: %.loc14_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%.loc14_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.2: type = value_of_initializer %int.make_type_signed.loc14_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.3: type = converted %int.make_type_signed.loc14_14, %.loc14_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_23: init type = call constants.%Int(%.loc14_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.2: type = value_of_initializer %int.make_type_signed.loc14_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.3: type = converted %int.make_type_signed.loc14_23, %.loc14_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.3] -// CHECK:STDOUT: adapt_decl %.loc14_26 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_signed.loc14_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_signed.loc14_14, %.loc14_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_23: init type = call constants.%Int(%int_32.loc14_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_signed.loc14_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_signed.loc14_23, %.loc14_23.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] +// CHECK:STDOUT: adapt_decl %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_not_extend.carbon @@ -135,8 +135,8 @@ 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: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptNotExtend: type = class_type @AdaptNotExtend [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -171,22 +171,22 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: class @Adapted { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapted // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptNotExtend -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 9256a6dd58439..7d99a0328d70f 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -48,36 +48,36 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.b.1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: %i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Base, .d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.13: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.14: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.15: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.16: type = struct_type {.base: %.14, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %struct_type.b.2, .d: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.40: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.41: = bound_method %.13, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.43) [template] -// CHECK:STDOUT: %.44: = bound_method %.15, %Convert.14 [template] -// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.46: %i32 = int_value 7 [template] -// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.46) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %Base.val: %Base = struct_value (%int_4.2) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] +// CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val, %int_7.2) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] @@ -119,10 +119,10 @@ class Derived { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%.loc17_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%.loc17_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%int_32.loc17_27) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%int_32.loc17_32) [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_27, %int.make_type_signed.loc17_32) // CHECK:STDOUT: %.loc17_35.2: type = value_of_initializer %int.make_type_signed.loc17_27 [template = constants.%i32] // CHECK:STDOUT: %.loc17_35.3: type = converted %int.make_type_signed.loc17_27, %.loc17_35.2 [template = constants.%i32] @@ -137,85 +137,85 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc4_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.3: type = converted %int.make_type_signed, %.loc4_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8: %.2 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_signed, %.loc4_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8: %Base.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .b = %.loc4_8 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc8: %.6 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc10_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed, %.loc10_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: .d = %.loc10_8 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_25: Core.IntLiteral = int_value 4 [template = constants.%.13] -// CHECK:STDOUT: %.loc14_26.1: %.14 = struct_literal (%.loc14_25) -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 7 [template = constants.%.15] -// CHECK:STDOUT: %.loc14_35.1: %.16 = struct_literal (%.loc14_26.1, %.loc14_34) -// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_25, %.loc14_26.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_25) [template = constants.%.43] -// CHECK:STDOUT: %.loc14_26.5: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_26 [template = constants.%.43] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc14_26.1: %struct_type.b.2 = struct_literal (%int_4) +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.3 = struct_literal (%.loc14_26.1, %int_7) +// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_26: = bound_method %int_4, %impl.elem0.loc14_26 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_26: = specific_function %Convert.bound.loc14_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %Convert.specific_fn.loc14_26(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_26.2: init %i32 = converted %int_4, %int.convert_checked.loc14_26 [template = constants.%int_4.2] // CHECK:STDOUT: %.loc14_35.2: ref %Base = class_element_access %return, element0 -// CHECK:STDOUT: %.loc14_26.6: ref %i32 = class_element_access %.loc14_35.2, element0 -// CHECK:STDOUT: %.loc14_26.7: init %i32 = initialize_from %.loc14_26.5 to %.loc14_26.6 [template = constants.%.43] -// CHECK:STDOUT: %.loc14_26.8: init %Base = class_init (%.loc14_26.7), %.loc14_35.2 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.8 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc14_35.4: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.5: = bound_method %.loc14_34, %.loc14_35.4 [template = constants.%.44] -// CHECK:STDOUT: %.loc14_35.6: = specific_function %.loc14_35.5, @Convert.2(constants.%.1) [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %.loc14_35.6(%.loc14_34) [template = constants.%.46] -// CHECK:STDOUT: %.loc14_35.7: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35 [template = constants.%.46] -// CHECK:STDOUT: %.loc14_35.8: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc14_35.9: init %i32 = initialize_from %.loc14_35.7 to %.loc14_35.8 [template = constants.%.46] -// CHECK:STDOUT: %.loc14_35.10: init %Derived = class_init (%.loc14_35.3, %.loc14_35.9), %return [template = constants.%struct.2] -// CHECK:STDOUT: %.loc14_36: init %Derived = converted %.loc14_35.1, %.loc14_35.10 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc14_26.3: ref %i32 = class_element_access %.loc14_35.2, element0 +// CHECK:STDOUT: %.loc14_26.4: init %i32 = initialize_from %.loc14_26.2 to %.loc14_26.3 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_26.5: init %Base = class_init (%.loc14_26.4), %.loc14_35.2 [template = constants.%Base.val] +// CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%Base.val] +// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_35: = bound_method %int_7, %impl.elem0.loc14_35 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_35: = specific_function %Convert.bound.loc14_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %Convert.specific_fn.loc14_35(%int_7) [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc14_35.4: init %i32 = converted %int_7, %int.convert_checked.loc14_35 [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc14_35.5: ref %i32 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc14_35.6: init %i32 = initialize_from %.loc14_35.4 to %.loc14_35.5 [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc14_35.7: init %Derived = class_init (%.loc14_35.3, %.loc14_35.6), %return [template = constants.%Derived.val] +// CHECK:STDOUT: %.loc14_36: init %Derived = converted %.loc14_35.1, %.loc14_35.7 [template = constants.%Derived.val] // CHECK:STDOUT: return %.loc14_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc18_11: %Derived = name_ref d, %d -// CHECK:STDOUT: %d.ref.loc18_12: %.7 = name_ref d, @Derived.%.loc10_8 [template = @Derived.%.loc10_8] +// CHECK:STDOUT: %d.ref.loc18_12: %Derived.elem.2 = name_ref d, @Derived.%.loc10_8 [template = @Derived.%.loc10_8] // CHECK:STDOUT: %.loc18_12.1: ref %i32 = class_element_access %d.ref.loc18_11, element1 // CHECK:STDOUT: %.loc18_12.2: %i32 = bind_value %.loc18_12.1 // CHECK:STDOUT: %d.ref.loc18_16: %Derived = name_ref d, %d -// CHECK:STDOUT: %base.ref: %.6 = name_ref base, @Derived.%.loc8 [template = @Derived.%.loc8] +// CHECK:STDOUT: %base.ref: %Derived.elem.1 = name_ref base, @Derived.%.loc8 [template = @Derived.%.loc8] // CHECK:STDOUT: %.loc18_17.1: ref %Base = class_element_access %d.ref.loc18_16, element0 // CHECK:STDOUT: %.loc18_17.2: %Base = bind_value %.loc18_17.1 -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc4_8 [template = @Base.%.loc4_8] +// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc4_8 [template = @Base.%.loc4_8] // CHECK:STDOUT: %.loc18_22.1: ref %i32 = class_element_access %.loc18_17.2, element0 // CHECK:STDOUT: %.loc18_22.2: %i32 = bind_value %.loc18_22.1 // CHECK:STDOUT: %.loc18_24.1: %tuple.type.2 = tuple_literal (%.loc18_12.2, %.loc18_22.2) -// CHECK:STDOUT: %.loc18_24.2: ref %i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc18_24.3: init %i32 = initialize_from %.loc18_12.2 to %.loc18_24.2 -// CHECK:STDOUT: %.loc18_24.4: ref %i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc18_24.5: init %i32 = initialize_from %.loc18_22.2 to %.loc18_24.4 -// CHECK:STDOUT: %.loc18_24.6: init %tuple.type.2 = tuple_init (%.loc18_24.3, %.loc18_24.5) to %return -// CHECK:STDOUT: %.loc18_25: init %tuple.type.2 = converted %.loc18_24.1, %.loc18_24.6 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 +// CHECK:STDOUT: %.loc18_24.2: init %i32 = initialize_from %.loc18_12.2 to %tuple.elem0 +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return, element1 +// CHECK:STDOUT: %.loc18_24.3: init %i32 = initialize_from %.loc18_22.2 to %tuple.elem1 +// CHECK:STDOUT: %.loc18_24.4: init %tuple.type.2 = tuple_init (%.loc18_24.2, %.loc18_24.3) to %return +// CHECK:STDOUT: %.loc18_25: init %tuple.type.2 = converted %.loc18_24.1, %.loc18_24.4 // CHECK:STDOUT: return %.loc18_25 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -223,16 +223,16 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.d: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.d: type = struct_type {.d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.d [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -255,25 +255,25 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed, %.loc7_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8: %.4 = field_decl d, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8: %Derived.elem = field_decl d, element0 [template] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .d = %.loc7_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 57918c884b53d..135c9e53d683b 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -29,20 +29,20 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.c [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] -// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] -// CHECK:STDOUT: %.11: type = ptr_type %i32 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d.e.1: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.e.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %Derived [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } @@ -66,65 +66,65 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.11 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.11 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc24_21: type = ptr_type %Derived [template = constants.%.10] -// CHECK:STDOUT: %.loc24_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_27) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc24_21: type = ptr_type %Derived [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc24_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc24_30.2: type = converted %int.make_type_signed, %.loc24_30.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_30.3: type = ptr_type %i32 [template = constants.%.11] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.11 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.11 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc24_30: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed.loc14, %.loc14_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Base.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8: %Base.elem = field_decl c, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 // CHECK:STDOUT: .c = %.loc14_8 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc18: %.6 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc20_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.3: type = converted %int.make_type_signed.loc20, %.loc20_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc21_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.3: type = converted %int.make_type_signed.loc21, %.loc21_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %.7 = field_decl e, element2 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed.loc20, %.loc20_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8: %Derived.elem.2 = field_decl e, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -132,18 +132,18 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: .d = %.loc20_8 // CHECK:STDOUT: .e = %.loc21_8 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%p.param_patt: %.10) -> %.11 { +// CHECK:STDOUT: fn @Access(%p.param_patt: %ptr.2) -> %ptr.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc25_12: ref %Derived = deref %p.ref -// CHECK:STDOUT: %c.ref: %.2 = name_ref c, @Base.%.loc14_8 [template = @Base.%.loc14_8] +// CHECK:STDOUT: %c.ref: %Base.elem = name_ref c, @Base.%.loc14_8 [template = @Base.%.loc14_8] // CHECK:STDOUT: %.loc25_15.1: ref %Base = class_element_access %.loc25_12, element0 // CHECK:STDOUT: %.loc25_15.2: ref %Base = converted %.loc25_12, %.loc25_15.1 // CHECK:STDOUT: %.loc25_15.3: ref %i32 = class_element_access %.loc25_15.2, element2 -// CHECK:STDOUT: %.loc25_10: %.11 = addr_of %.loc25_15.3 -// CHECK:STDOUT: return %.loc25_10 +// CHECK:STDOUT: %addr: %ptr.3 = addr_of %.loc25_15.3 +// CHECK:STDOUT: return %addr // 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 896c458e92a20..8532128eec6c5 100644 --- a/toolchain/check/testdata/class/base_function_unqualified.carbon +++ b/toolchain/check/testdata/class/base_function_unqualified.carbon @@ -30,16 +30,16 @@ fn Derived.H() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,20 +63,20 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: %.4 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %.loc16: %Derived.elem = base_decl %Base.ref, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -84,7 +84,7 @@ fn Derived.H() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index b65ba56e111a5..f72f7dedc6a41 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -30,30 +30,30 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Base [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.35: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.36: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.37: = complete_type_witness %.36 [template] -// CHECK:STDOUT: %.38: type = ptr_type %Derived [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: } @@ -77,92 +77,92 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc17_26: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param.loc17: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc17: %.3 = bind_name self, %self.param.loc17 +// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param.loc17: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc17: %ptr.1 = bind_name self, %self.param.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.38 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.38 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.38] -// CHECK:STDOUT: %p.param: %.38 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.38 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc14: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param.loc14: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc14: %.3 = bind_name self, %self.param.loc14 +// CHECK:STDOUT: %ptr.loc14: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param.loc14: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc14: %ptr.1 = bind_name self, %self.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc22: %.35 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc23: = complete_type_witness %.36 [template = constants.%.37] +// CHECK:STDOUT: %.loc22: %Derived.elem = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc22 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt: %.3]() { +// CHECK:STDOUT: fn @F[addr %self.param_patt: %ptr.1]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.3 = name_ref self, %self.loc17 +// CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self.loc17 // CHECK:STDOUT: %.loc18_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = 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: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_13.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_13.2: = bound_method %.loc18_15, %.loc18_13.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc18_13.3: = specific_function %.loc18_13.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_13.3(%.loc18_15) [template = constants.%.34] -// CHECK:STDOUT: %.loc18_13.4: init %i32 = converted %.loc18_15, %int.convert_checked [template = constants.%.34] -// CHECK:STDOUT: assign %.loc18_10, %.loc18_13.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_13: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %.loc18_10, %.loc18_13 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.38) { +// CHECK:STDOUT: fn @Call(%p.param_patt: %ptr.3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.38 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.3 = 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: %.38 = addr_of %.loc26_4.1 -// CHECK:STDOUT: %.loc26_4.3: ref %Derived = deref %.loc26_4.2 -// CHECK:STDOUT: %.loc26_4.4: ref %Base = class_element_access %.loc26_4.3, element0 -// CHECK:STDOUT: %.loc26_4.5: %.3 = addr_of %.loc26_4.4 -// CHECK:STDOUT: %.loc26_4.6: %.3 = converted %.loc26_4.2, %.loc26_4.5 -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc26_7(%.loc26_4.6) +// CHECK:STDOUT: %F.bound: = bound_method %.loc26_4.1, %F.ref +// CHECK:STDOUT: %addr.loc26_4.1: %ptr.3 = addr_of %.loc26_4.1 +// CHECK:STDOUT: %.loc26_4.2: ref %Derived = deref %addr.loc26_4.1 +// CHECK:STDOUT: %.loc26_4.3: ref %Base = class_element_access %.loc26_4.2, element0 +// CHECK:STDOUT: %addr.loc26_4.2: %ptr.1 = addr_of %.loc26_4.3 +// CHECK:STDOUT: %.loc26_4.4: %ptr.1 = converted %addr.loc26_4.1, %addr.loc26_4.2 +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc26_4.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 504ac88410b2f..a0eeac0e13a2f 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -43,26 +43,26 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [template] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [template] // CHECK:STDOUT: %PassDerivedToBase.type: type = fn_type @PassDerivedToBase [template] @@ -100,29 +100,29 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc25_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_24.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_24.3: type = converted %int.make_type_signed, %.loc25_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc25_24.2: type = converted %int.make_type_signed, %.loc25_24.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [template = constants.%CallIndirect] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc29_27: type = ptr_type %Derived [template = constants.%.10] -// CHECK:STDOUT: %.loc29_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc29_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_33.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc29_33.3: type = converted %int.make_type_signed, %.loc29_33.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc29_33.2: type = converted %int.make_type_signed, %.loc29_33.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -133,29 +133,29 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc33_37.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc33_37.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc33_37.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc33_37.3: type = converted %int.make_type_signed, %.loc33_37.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc33_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc33_37.2: type = converted %int.make_type_signed, %.loc33_37.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: %PassDerivedToBaseIndirect.type = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc37_40: type = ptr_type %Derived [template = constants.%.10] -// CHECK:STDOUT: %.loc37_46.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc37_46.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc37_46.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc37_46.3: type = converted %int.make_type_signed, %.loc37_46.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc37_46.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc37_46.2: type = converted %int.make_type_signed, %.loc37_46.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -163,7 +163,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc19: %.5 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %.loc19: %Derived.elem = base_decl %Base.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: %Derived = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Derived = value_param_pattern %self.patt, runtime_param0 @@ -180,7 +180,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -188,7 +188,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -199,10 +199,10 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed, %.loc14_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_signed, %.loc14_25.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %Base = value_param runtime_param0 // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -215,22 +215,22 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_28.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_28.3: type = converted %int.make_type_signed, %.loc15_28.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_28.2: type = converted %int.make_type_signed, %.loc15_28.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1[%self.param_patt: %Base]() -> %i32; @@ -246,27 +246,27 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // 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: %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: %F.bound: = bound_method %a.ref, %F.ref // CHECK:STDOUT: %.loc26_10.1: ref %Base = class_element_access %a.ref, element0 // CHECK:STDOUT: %.loc26_10.2: ref %Base = converted %a.ref, %.loc26_10.1 // CHECK:STDOUT: %.loc26_10.3: %Base = bind_value %.loc26_10.2 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc26_11(%.loc26_10.3) +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc26_10.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.param_patt: %.10) -> %i32 { +// CHECK:STDOUT: fn @CallIndirect(%p.param_patt: %ptr.3) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.3 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @Base.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc30_11.1: ref %Derived = deref %p.ref -// CHECK:STDOUT: %.loc30_11.2: = bound_method %.loc30_11.1, %F.ref -// CHECK:STDOUT: %.loc30_11.3: ref %Base = class_element_access %.loc30_11.1, element0 -// CHECK:STDOUT: %.loc30_11.4: ref %Base = converted %.loc30_11.1, %.loc30_11.3 -// CHECK:STDOUT: %.loc30_11.5: %Base = bind_value %.loc30_11.4 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc30_11.2(%.loc30_11.5) +// CHECK:STDOUT: %F.bound: = bound_method %.loc30_11.1, %F.ref +// CHECK:STDOUT: %.loc30_11.2: ref %Base = class_element_access %.loc30_11.1, element0 +// CHECK:STDOUT: %.loc30_11.3: ref %Base = converted %.loc30_11.1, %.loc30_11.2 +// CHECK:STDOUT: %.loc30_11.4: %Base = bind_value %.loc30_11.3 +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc30_11.4) // 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 @@ -277,22 +277,22 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // 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: %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: %G.bound: = bound_method %a.ref, %G.ref +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%a.ref) // CHECK:STDOUT: %.loc34_22.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc34_22.2: %i32 = converted %G.call, %.loc34_22.1 // CHECK:STDOUT: return %.loc34_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p.param_patt: %.10) -> %i32 { +// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p.param_patt: %ptr.3) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.3 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %G.ref: %G.type.1 = name_ref G, @Base.%G.decl [template = constants.%G.1] // CHECK:STDOUT: %.loc38_11.1: ref %Derived = deref %p.ref -// 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: %G.call: init %i32 = call %.loc38_11.2(%.loc38_11.3) +// CHECK:STDOUT: %G.bound: = bound_method %.loc38_11.1, %G.ref +// CHECK:STDOUT: %.loc38_11.2: %Derived = bind_value %.loc38_11.1 +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%.loc38_11.2) // CHECK:STDOUT: %.loc38_23.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc38_23.2: %i32 = converted %G.call, %.loc38_23.1 // CHECK:STDOUT: return %.loc38_23.2 diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index e497e75d093b2..63cfe6d4e61c5 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -37,29 +37,29 @@ 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: %ptr.1: type = ptr_type %A [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.6: type = ptr_type %B [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %B [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.11: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.12: type = ptr_type %C [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %ptr.5: type = ptr_type %C [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.14: = complete_type_witness %.13 [template] +// CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.3 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.15: type = unbound_element_type %D, %B [template] -// CHECK:STDOUT: %.16: type = ptr_type %D [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %ptr.6: type = ptr_type %D [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: } @@ -86,147 +86,147 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // 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: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %a.patt: %.1 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %b.patt: %.6 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.6 = value_param_pattern %b.patt, runtime_param1 -// CHECK:STDOUT: %c.patt: %.12 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.12 = value_param_pattern %c.patt, runtime_param2 -// CHECK:STDOUT: %d.patt: %.16 = binding_pattern d -// CHECK:STDOUT: %d.param_patt: %.16 = value_param_pattern %d.patt, runtime_param3 +// CHECK:STDOUT: %a.patt: %ptr.1 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.1 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %ptr.3 = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %ptr.3 = value_param_pattern %b.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %ptr.5 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %ptr.5 = value_param_pattern %c.patt, runtime_param2 +// CHECK:STDOUT: %d.patt: %ptr.6 = binding_pattern d +// CHECK:STDOUT: %d.param_patt: %ptr.6 = value_param_pattern %d.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc29_13: type = ptr_type %A [template = constants.%.1] +// CHECK:STDOUT: %ptr.loc29_13: type = ptr_type %A [template = constants.%ptr.1] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc29_20: type = ptr_type %B [template = constants.%.6] +// CHECK:STDOUT: %ptr.loc29_20: type = ptr_type %B [template = constants.%ptr.3] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc29_27: type = ptr_type %C [template = constants.%.12] +// CHECK:STDOUT: %ptr.loc29_27: type = ptr_type %C [template = constants.%ptr.5] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc29_34: type = ptr_type %D [template = constants.%.16] -// CHECK:STDOUT: %a.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.1 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %.6 = value_param runtime_param1 -// CHECK:STDOUT: %b: %.6 = bind_name b, %b.param -// CHECK:STDOUT: %c.param: %.12 = value_param runtime_param2 -// CHECK:STDOUT: %c: %.12 = bind_name c, %c.param -// CHECK:STDOUT: %d.param: %.16 = value_param runtime_param3 -// CHECK:STDOUT: %d: %.16 = bind_name d, %d.param +// CHECK:STDOUT: %ptr.loc29_34: type = ptr_type %D [template = constants.%ptr.6] +// CHECK:STDOUT: %a.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.1 = bind_name a, %a.param +// CHECK:STDOUT: %b.param: %ptr.3 = value_param runtime_param1 +// CHECK:STDOUT: %b: %ptr.3 = bind_name b, %b.param +// CHECK:STDOUT: %c.param: %ptr.5 = value_param runtime_param2 +// CHECK:STDOUT: %c: %ptr.5 = bind_name c, %c.param +// CHECK:STDOUT: %d.param: %ptr.6 = value_param runtime_param3 +// CHECK:STDOUT: %d: %ptr.6 = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // 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.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.5 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc16: %B.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.3 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %.loc17_23: type = ptr_type %B [template = constants.%.6] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %B [template = constants.%ptr.3] +// CHECK:STDOUT: %self.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc16 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21: %.11 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %.loc21: %C.elem = base_decl %B.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { -// CHECK:STDOUT: %self.patt: %.12 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.12 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc22_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc22: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc22_23: type = ptr_type %C [template = constants.%.12] -// CHECK:STDOUT: %self.param: %.12 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.12 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.5] +// CHECK:STDOUT: %self.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.5 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.13 [template = constants.%.14] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc21 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc26: %.15 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc27: = complete_type_witness %.13 [template = constants.%.14] +// CHECK:STDOUT: %.loc26: %D.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .base = %.loc26 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc27 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %.1](); +// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[addr %self.param_patt: %.6](); +// CHECK:STDOUT: fn @F.2[addr %self.param_patt: %ptr.3](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3[addr %self.param_patt: %.12](); +// CHECK:STDOUT: fn @F.3[addr %self.param_patt: %ptr.5](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%a.param_patt: %.1, %b.param_patt: %.6, %c.param_patt: %.12, %d.param_patt: %.16) { +// CHECK:STDOUT: fn @Call(%a.param_patt: %ptr.1, %b.param_patt: %ptr.3, %c.param_patt: %ptr.5, %d.param_patt: %ptr.6) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a -// CHECK:STDOUT: %.loc30_4.1: ref %A = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.1 = name_ref a, %a +// CHECK:STDOUT: %.loc30: ref %A = deref %a.ref // CHECK:STDOUT: %F.ref.loc30: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] -// CHECK:STDOUT: %.loc30_7: = bound_method %.loc30_4.1, %F.ref.loc30 -// CHECK:STDOUT: %.loc30_4.2: %.1 = addr_of %.loc30_4.1 -// CHECK:STDOUT: %F.call.loc30: init %empty_tuple.type = call %.loc30_7(%.loc30_4.2) -// CHECK:STDOUT: %b.ref: %.6 = name_ref b, %b -// CHECK:STDOUT: %.loc31_4.1: ref %B = deref %b.ref +// CHECK:STDOUT: %F.bound.loc30: = bound_method %.loc30, %F.ref.loc30 +// CHECK:STDOUT: %addr.loc30: %ptr.1 = addr_of %.loc30 +// CHECK:STDOUT: %F.call.loc30: init %empty_tuple.type = call %F.bound.loc30(%addr.loc30) +// CHECK:STDOUT: %b.ref: %ptr.3 = name_ref b, %b +// CHECK:STDOUT: %.loc31: 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: %.6 = addr_of %.loc31_4.1 -// CHECK:STDOUT: %F.call.loc31: init %empty_tuple.type = call %.loc31_7(%.loc31_4.2) -// CHECK:STDOUT: %c.ref: %.12 = name_ref c, %c -// CHECK:STDOUT: %.loc32_4.1: ref %C = deref %c.ref +// CHECK:STDOUT: %F.bound.loc31: = bound_method %.loc31, %F.ref.loc31 +// CHECK:STDOUT: %addr.loc31: %ptr.3 = addr_of %.loc31 +// CHECK:STDOUT: %F.call.loc31: init %empty_tuple.type = call %F.bound.loc31(%addr.loc31) +// CHECK:STDOUT: %c.ref: %ptr.5 = name_ref c, %c +// CHECK:STDOUT: %.loc32: 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: %.12 = addr_of %.loc32_4.1 -// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %.loc32_7(%.loc32_4.2) -// CHECK:STDOUT: %d.ref: %.16 = name_ref d, %d +// CHECK:STDOUT: %F.bound.loc32: = bound_method %.loc32, %F.ref.loc32 +// CHECK:STDOUT: %addr.loc32: %ptr.5 = addr_of %.loc32 +// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %F.bound.loc32(%addr.loc32) +// CHECK:STDOUT: %d.ref: %ptr.6 = 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: %.16 = addr_of %.loc33_4.1 -// CHECK:STDOUT: %.loc33_4.3: ref %D = deref %.loc33_4.2 -// CHECK:STDOUT: %.loc33_4.4: ref %B = class_element_access %.loc33_4.3, element0 -// CHECK:STDOUT: %.loc33_4.5: %.6 = addr_of %.loc33_4.4 -// CHECK:STDOUT: %.loc33_4.6: %.6 = converted %.loc33_4.2, %.loc33_4.5 -// CHECK:STDOUT: %F.call.loc33: init %empty_tuple.type = call %.loc33_7(%.loc33_4.6) +// CHECK:STDOUT: %F.bound.loc33: = bound_method %.loc33_4.1, %F.ref.loc33 +// CHECK:STDOUT: %addr.loc33_4.1: %ptr.6 = addr_of %.loc33_4.1 +// CHECK:STDOUT: %.loc33_4.2: ref %D = deref %addr.loc33_4.1 +// CHECK:STDOUT: %.loc33_4.3: ref %B = class_element_access %.loc33_4.2, element0 +// CHECK:STDOUT: %addr.loc33_4.2: %ptr.3 = addr_of %.loc33_4.3 +// CHECK:STDOUT: %.loc33_4.4: %ptr.3 = converted %addr.loc33_4.1, %addr.loc33_4.2 +// CHECK:STDOUT: %F.call.loc33: init %empty_tuple.type = call %F.bound.loc33(%.loc33_4.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 f4c3aa5960a98..9b8866417284e 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -30,27 +30,27 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 4 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,14 +76,14 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_15: init type = call constants.%Int(%.loc21_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_15.2: type = value_of_initializer %int.make_type_signed.loc21_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_15.3: type = converted %int.make_type_signed.loc21_15, %.loc21_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_23: init type = call constants.%Int(%.loc21_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.2: type = value_of_initializer %int.make_type_signed.loc21_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.3: type = converted %int.make_type_signed.loc21_23, %.loc21_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_15: init type = call constants.%Int(%int_32.loc21_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_15.1: type = value_of_initializer %int.make_type_signed.loc21_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_15.2: type = converted %int.make_type_signed.loc21_15, %.loc21_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_23: init type = call constants.%Int(%int_32.loc21_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_signed.loc21_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_signed.loc21_23, %.loc21_23.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 @@ -93,17 +93,17 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_13.3: type = converted %int.make_type_signed, %.loc25_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc25_13.2: type = converted %int.make_type_signed, %.loc25_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc25_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_17.3: type = converted %int.make_type_signed, %.loc25_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc25_17.2: type = converted %int.make_type_signed, %.loc25_17.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -113,14 +113,14 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%.loc12_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = value_of_initializer %int.make_type_signed.loc12_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.3: type = converted %int.make_type_signed.loc12_11, %.loc12_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%.loc12_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.3: type = converted %int.make_type_signed.loc12_19, %.loc12_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%int_32.loc12_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed.loc12_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed.loc12_11, %.loc12_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -132,32 +132,32 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_11: init type = call constants.%Int(%.loc16_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.2: type = value_of_initializer %int.make_type_signed.loc16_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.3: type = converted %int.make_type_signed.loc16_11, %.loc16_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed.loc16_19, %.loc16_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_11: init type = call constants.%Int(%int_32.loc16_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_signed.loc16_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed.loc16_11, %.loc16_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc16: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc16: %i32 = bind_name n, %n.param.loc16 // CHECK:STDOUT: %return.param.loc16: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc16_16: ref %i32 = return_slot %return.param.loc16 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.3: type = converted %int.make_type_signed, %.loc18_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8: %.2 = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_signed, %.loc18_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_8: %Class.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .k = %.loc18_8 -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%n.param_patt: %i32) -> %i32 { @@ -176,14 +176,14 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc26_18.1: Core.IntLiteral = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_18.1, %.loc26_18.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_18.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc26_18.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc26_18.6: %i32 = converted %.loc26_18.1, %.loc26_18.5 [template = constants.%.33] -// CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc26_18.6) +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc26_18.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc26_18.2: %i32 = converted %int_4, %.loc26_18.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc26_18.2) // CHECK:STDOUT: %.loc26_20.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_20.2: %i32 = converted %F.call, %.loc26_20.1 // CHECK:STDOUT: return %.loc26_20.2 diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 6bf5c1556402c..9883a0491536b 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -18,15 +18,15 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,33 +54,33 @@ class C { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc12_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_signed, %.loc12_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_signed, %.loc12_17.1 [template = constants.%i32] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed, %.loc14_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .a = %.loc14_8 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param_patt: %C) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @C.%.loc14_8 [template = @C.%.loc14_8] +// CHECK:STDOUT: %a.ref: %C.elem = 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 bca73271f205c..bc75232f9999f 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -41,24 +41,24 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.c [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d.e.1: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.e.1 [template] // CHECK:STDOUT: %AccessDerived.type: type = fn_type @AccessDerived [template] // CHECK:STDOUT: %AccessDerived: %AccessDerived.type = struct_value () [template] // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] // CHECK:STDOUT: %AccessBase: %AccessBase.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = ptr_type %Derived [template] -// CHECK:STDOUT: %.14: type = ptr_type %i32 [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type %Derived [template] +// CHECK:STDOUT: %ptr.5: type = ptr_type %i32 [template] // CHECK:STDOUT: %AccessDerivedIndirect.type: type = fn_type @AccessDerivedIndirect [template] // CHECK:STDOUT: %AccessDerivedIndirect: %AccessDerivedIndirect.type = struct_value () [template] // CHECK:STDOUT: %AccessBaseIndirect.type: type = fn_type @AccessBaseIndirect [template] @@ -93,10 +93,10 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc24_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_33.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_33.3: type = converted %int.make_type_signed, %.loc24_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_33.2: type = converted %int.make_type_signed, %.loc24_33.1 [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -109,93 +109,93 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc28_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc28_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_30.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc28_30.3: type = converted %int.make_type_signed, %.loc28_30.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc28_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc28_30.2: type = converted %int.make_type_signed, %.loc28_30.1 [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessDerivedIndirect.decl: %AccessDerivedIndirect.type = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { -// CHECK:STDOUT: %p.patt: %.13 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.13 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.14 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.14 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc32_36: type = ptr_type %Derived [template = constants.%.13] -// CHECK:STDOUT: %.loc32_42: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc32_42) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc32_36: type = ptr_type %Derived [template = constants.%ptr.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc32_45.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc32_45.2: type = converted %int.make_type_signed, %.loc32_45.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_45.3: type = ptr_type %i32 [template = constants.%.14] -// CHECK:STDOUT: %p.param: %.13 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.13 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.14 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.14 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc32_45: type = ptr_type %i32 [template = constants.%ptr.5] +// CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessBaseIndirect.decl: %AccessBaseIndirect.type = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { -// CHECK:STDOUT: %p.patt: %.13 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.13 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.14 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.14 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc36_33: type = ptr_type %Derived [template = constants.%.13] -// CHECK:STDOUT: %.loc36_39: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc36_39) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc36_33: type = ptr_type %Derived [template = constants.%ptr.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc36_42.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc36_42.2: type = converted %int.make_type_signed, %.loc36_42.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_42.3: type = ptr_type %i32 [template = constants.%.14] -// CHECK:STDOUT: %p.param: %.13 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.13 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.14 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.14 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc36_42: type = ptr_type %i32 [template = constants.%ptr.5] +// CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed.loc14, %.loc14_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Base.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8: %Base.elem = field_decl c, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 // CHECK:STDOUT: .c = %.loc14_8 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc18: %.6 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc20_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.3: type = converted %int.make_type_signed.loc20, %.loc20_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc21_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.3: type = converted %int.make_type_signed.loc21, %.loc21_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %.7 = field_decl e, element2 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed.loc20, %.loc20_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8: %Derived.elem.2 = field_decl e, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -203,14 +203,14 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: .d = %.loc20_8 // CHECK:STDOUT: .e = %.loc21_8 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessDerived(%d.param_patt: %Derived) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc25_10: %Derived = name_ref d, %d // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref.loc25_20: %.7 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref.loc25_20: %Derived.elem.2 = 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 @@ -220,7 +220,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %Base.elem = 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 @@ -228,27 +228,27 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: return %.loc29_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessDerivedIndirect(%p.param_patt: %.13) -> %.14 { +// CHECK:STDOUT: fn @AccessDerivedIndirect(%p.param_patt: %ptr.4) -> %ptr.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.13 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref: %.7 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref: %Derived.elem.2 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] // CHECK:STDOUT: %.loc33_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc33_12.2: ref %i32 = class_element_access %.loc33_12.1, element1 -// CHECK:STDOUT: %.loc33_10: %.14 = addr_of %.loc33_12.2 -// CHECK:STDOUT: return %.loc33_10 +// CHECK:STDOUT: %addr: %ptr.5 = addr_of %.loc33_12.2 +// CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessBaseIndirect(%p.param_patt: %.13) -> %.14 { +// CHECK:STDOUT: fn @AccessBaseIndirect(%p.param_patt: %ptr.4) -> %ptr.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.13 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] // CHECK:STDOUT: %.loc37_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc37_12.2: ref %Base = class_element_access %.loc37_12.1, element0 // CHECK:STDOUT: %.loc37_12.3: ref %Base = converted %.loc37_12.1, %.loc37_12.2 // CHECK:STDOUT: %.loc37_12.4: ref %i32 = class_element_access %.loc37_12.3, element1 -// CHECK:STDOUT: %.loc37_10: %.14 = addr_of %.loc37_12.4 -// CHECK:STDOUT: return %.loc37_10 +// CHECK:STDOUT: %addr: %ptr.5 = addr_of %.loc37_12.4 +// CHECK:STDOUT: return %addr // 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 7a90f3cb1bbc5..6c14f88530aa5 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -103,8 +103,8 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -124,11 +124,11 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- other_extern.carbon @@ -187,9 +187,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -202,7 +202,7 @@ var c: Other.C = {}; // CHECK:STDOUT: import Other//other_define // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, inst+3, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,9 +228,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc6_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_19.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_20: init %C = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -239,7 +239,7 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -272,7 +272,7 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14: %.1 = struct_literal () +// CHECK:STDOUT: %.loc14: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -281,9 +281,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -297,7 +297,7 @@ var c: Other.C = {}; // CHECK:STDOUT: import Other//other_extern // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, inst+3, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -323,9 +323,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_19.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc19_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -334,9 +334,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -350,7 +350,7 @@ var c: Other.C = {}; // CHECK:STDOUT: import Other//other_conflict // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, inst+3, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -376,9 +376,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_19.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc18_19.2: init %C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc18_20: init %C = converted %.loc18_19.1, %.loc18_19.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc18_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc18_19.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc18_20: init %C = converted %.loc18_19.1, %.loc18_19.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc18_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 2074e58b7a845..fd48d738f92d9 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -42,28 +42,28 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %B, %i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %A, .b: %i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %B.elem.1: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %B.elem.2: type = unbound_element_type %B, %i32 [template] +// CHECK:STDOUT: %struct_type.base.b.1: type = struct_type {.base: %A, .b: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.b.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.13: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.14: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %B, .c: %i32} [template] -// CHECK:STDOUT: %.16: = complete_type_witness %.15 [template] -// CHECK:STDOUT: %.17: type = ptr_type %C [template] -// CHECK:STDOUT: %.18: type = ptr_type %B [template] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.base.c.1: type = struct_type {.base: %B, .c: %i32} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.c.1 [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.5: type = ptr_type %B [template] // CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [template] // CHECK:STDOUT: %ConvertCToB: %ConvertCToB.type = struct_value () [template] -// CHECK:STDOUT: %.22: type = ptr_type %A [template] +// CHECK:STDOUT: %ptr.8: type = ptr_type %A [template] // CHECK:STDOUT: %ConvertBToA.type: type = fn_type @ConvertBToA [template] // CHECK:STDOUT: %ConvertBToA: %ConvertBToA.type = struct_value () [template] // CHECK:STDOUT: %ConvertCToA.type: type = fn_type @ConvertCToA [template] @@ -74,28 +74,28 @@ fn ConvertInit() { // CHECK:STDOUT: %ConvertRef: %ConvertRef.type = struct_value () [template] // CHECK:STDOUT: %ConvertInit.type: type = fn_type @ConvertInit [template] // CHECK:STDOUT: %ConvertInit: %ConvertInit.type = struct_value () [template] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.24: type = struct_type {.a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.26: type = struct_type {.base: %.24, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.28: type = struct_type {.base: %.26, .c: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.base.b.3: type = struct_type {.base: %struct_type.a.2, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.base.c.3: type = struct_type {.base: %struct_type.base.b.3, .c: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.52: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.53: = bound_method %.23, %Convert.14 [template] -// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.55: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.55) [template] -// CHECK:STDOUT: %.56: = bound_method %.25, %Convert.14 [template] -// CHECK:STDOUT: %.57: = specific_function %.56, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.58: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.58) [template] -// CHECK:STDOUT: %.59: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.61: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.61) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %B.val: %B = struct_value (%A.val, %int_2.2) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%B.val, %int_3.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -125,49 +125,49 @@ fn ConvertInit() { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %ConvertCToB.decl: %ConvertCToB.type = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { -// CHECK:STDOUT: %p.patt: %.17 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.17 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.18 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.18 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25_20: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %ptr.loc25_20: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc25_27: type = ptr_type %B [template = constants.%.18] -// CHECK:STDOUT: %p.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.17 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.18 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.18 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc25_27: type = ptr_type %B [template = constants.%ptr.5] +// CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertBToA.decl: %ConvertBToA.type = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { -// CHECK:STDOUT: %p.patt: %.18 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.18 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.5 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc26_20: type = ptr_type %B [template = constants.%.18] +// CHECK:STDOUT: %ptr.loc26_20: type = ptr_type %B [template = constants.%ptr.5] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc26_27: type = ptr_type %A [template = constants.%.22] -// CHECK:STDOUT: %p.param: %.18 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.18 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc26_27: type = ptr_type %A [template = constants.%ptr.8] +// CHECK:STDOUT: %p.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.5 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertCToA.decl: %ConvertCToA.type = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { -// CHECK:STDOUT: %p.patt: %.17 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.17 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc27_20: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %ptr.loc27_20: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc27_27: type = ptr_type %A [template = constants.%.22] -// CHECK:STDOUT: %p.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.17 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc27_27: type = ptr_type %A [template = constants.%ptr.8] +// CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertValue.decl: %ConvertValue.type = fn_decl @ConvertValue [template = constants.%ConvertValue] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -178,102 +178,102 @@ fn ConvertInit() { // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertRef.decl: %ConvertRef.type = fn_decl @ConvertRef [template = constants.%ConvertRef] { -// CHECK:STDOUT: %c.patt: %.17 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.17 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %ptr.4 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %ptr.4 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc33_19: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %ptr.loc33_19: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc33_26: type = ptr_type %A [template = constants.%.22] -// CHECK:STDOUT: %c.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.17 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc33_26: type = ptr_type %A [template = constants.%ptr.8] +// CHECK:STDOUT: %c.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %c: %ptr.4 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertInit.decl: %ConvertInit.type = fn_decl @ConvertInit [template = constants.%ConvertInit] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %A.ref, element0 [template] -// CHECK:STDOUT: %.loc17_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.3: type = converted %int.make_type_signed, %.loc17_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8: %.7 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc16: %B.elem.1 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_signed, %.loc17_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8: %B.elem.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc16 // CHECK:STDOUT: .b = %.loc17_8 // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21: %.13 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc22_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.3: type = converted %int.make_type_signed, %.loc22_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_8: %.14 = field_decl c, element1 [template] -// CHECK:STDOUT: %.loc23: = complete_type_witness %.15 [template = constants.%.16] +// CHECK:STDOUT: %.loc21: %C.elem.1 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_signed, %.loc22_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_8: %C.elem.2 = field_decl c, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.c.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc21 // CHECK:STDOUT: .c = %.loc22_8 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToB(%p.param_patt: %.17) -> %.18 { +// CHECK:STDOUT: fn @ConvertCToB(%p.param_patt: %ptr.4) -> %ptr.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %.loc25_39.1: ref %C = deref %p.ref // CHECK:STDOUT: %.loc25_39.2: ref %B = class_element_access %.loc25_39.1, element0 -// CHECK:STDOUT: %.loc25_39.3: %.18 = addr_of %.loc25_39.2 -// CHECK:STDOUT: %.loc25_39.4: %.18 = converted %p.ref, %.loc25_39.3 -// CHECK:STDOUT: return %.loc25_39.4 +// CHECK:STDOUT: %addr: %ptr.5 = addr_of %.loc25_39.2 +// CHECK:STDOUT: %.loc25_39.3: %ptr.5 = converted %p.ref, %addr +// CHECK:STDOUT: return %.loc25_39.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertBToA(%p.param_patt: %.18) -> %.22 { +// CHECK:STDOUT: fn @ConvertBToA(%p.param_patt: %ptr.5) -> %ptr.8 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.18 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.5 = name_ref p, %p // CHECK:STDOUT: %.loc26_39.1: ref %B = deref %p.ref // CHECK:STDOUT: %.loc26_39.2: ref %A = class_element_access %.loc26_39.1, element0 -// CHECK:STDOUT: %.loc26_39.3: %.22 = addr_of %.loc26_39.2 -// CHECK:STDOUT: %.loc26_39.4: %.22 = converted %p.ref, %.loc26_39.3 -// CHECK:STDOUT: return %.loc26_39.4 +// CHECK:STDOUT: %addr: %ptr.8 = addr_of %.loc26_39.2 +// CHECK:STDOUT: %.loc26_39.3: %ptr.8 = converted %p.ref, %addr +// CHECK:STDOUT: return %.loc26_39.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToA(%p.param_patt: %.17) -> %.22 { +// CHECK:STDOUT: fn @ConvertCToA(%p.param_patt: %ptr.4) -> %ptr.8 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %.loc27_39.1: ref %C = deref %p.ref // CHECK:STDOUT: %.loc27_39.2: ref %B = class_element_access %.loc27_39.1, element0 // CHECK:STDOUT: %.loc27_39.3: ref %A = class_element_access %.loc27_39.2, element0 -// CHECK:STDOUT: %.loc27_39.4: %.22 = addr_of %.loc27_39.3 -// CHECK:STDOUT: %.loc27_39.5: %.22 = converted %p.ref, %.loc27_39.4 -// CHECK:STDOUT: return %.loc27_39.5 +// CHECK:STDOUT: %addr: %ptr.8 = addr_of %.loc27_39.3 +// CHECK:STDOUT: %.loc27_39.4: %ptr.8 = converted %p.ref, %addr +// CHECK:STDOUT: return %.loc27_39.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertValue(%c.param_patt: %C) { @@ -288,59 +288,59 @@ fn ConvertInit() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertRef(%c.param_patt: %.17) -> %.22 { +// CHECK:STDOUT: fn @ConvertRef(%c.param_patt: %ptr.4) -> %ptr.8 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %.17 = name_ref c, %c +// CHECK:STDOUT: %c.ref: %ptr.4 = name_ref c, %c // CHECK:STDOUT: %.loc34_12: ref %C = deref %c.ref // CHECK:STDOUT: %A.ref.loc34: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc34_15.1: ref %B = class_element_access %.loc34_12, element0 // CHECK:STDOUT: %.loc34_15.2: ref %A = class_element_access %.loc34_15.1, element0 // CHECK:STDOUT: %.loc34_15.3: ref %A = converted %.loc34_12, %.loc34_15.2 -// CHECK:STDOUT: %.loc34_10: %.22 = addr_of %.loc34_15.3 -// CHECK:STDOUT: return %.loc34_10 +// CHECK:STDOUT: %addr: %ptr.8 = addr_of %.loc34_15.3 +// CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertInit() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc38_38: Core.IntLiteral = int_value 1 [template = constants.%.23] -// CHECK:STDOUT: %.loc38_39.1: %.24 = struct_literal (%.loc38_38) -// CHECK:STDOUT: %.loc38_47: Core.IntLiteral = int_value 2 [template = constants.%.25] -// CHECK:STDOUT: %.loc38_48.1: %.26 = struct_literal (%.loc38_39.1, %.loc38_47) -// CHECK:STDOUT: %.loc38_56: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc38_57.1: %.28 = struct_literal (%.loc38_48.1, %.loc38_56) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc38_39.1: %struct_type.a.2 = struct_literal (%int_1) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc38_48.1: %struct_type.base.b.3 = struct_literal (%.loc38_39.1, %int_2) +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc38_57.1: %struct_type.base.c.3 = struct_literal (%.loc38_48.1, %int_3) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc38_39.2: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_39.3: = bound_method %.loc38_38, %.loc38_39.2 [template = constants.%.53] -// CHECK:STDOUT: %.loc38_39.4: = specific_function %.loc38_39.3, @Convert.2(constants.%.1) [template = constants.%.54] -// CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %.loc38_39.4(%.loc38_38) [template = constants.%.55] -// CHECK:STDOUT: %.loc38_39.5: init %i32 = converted %.loc38_38, %int.convert_checked.loc38_39 [template = constants.%.55] +// CHECK:STDOUT: %impl.elem0.loc38_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc38_39: = bound_method %int_1, %impl.elem0.loc38_39 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc38_39: = specific_function %Convert.bound.loc38_39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %Convert.specific_fn.loc38_39(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc38_39.2: init %i32 = converted %int_1, %int.convert_checked.loc38_39 [template = constants.%int_1.2] // 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.6: ref %i32 = class_element_access %.loc38_48.2, element0 -// CHECK:STDOUT: %.loc38_39.7: init %i32 = initialize_from %.loc38_39.5 to %.loc38_39.6 [template = constants.%.55] -// CHECK:STDOUT: %.loc38_39.8: init %A = class_init (%.loc38_39.7), %.loc38_48.2 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.8 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc38_48.4: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_48.5: = bound_method %.loc38_47, %.loc38_48.4 [template = constants.%.56] -// CHECK:STDOUT: %.loc38_48.6: = specific_function %.loc38_48.5, @Convert.2(constants.%.1) [template = constants.%.57] -// CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %.loc38_48.6(%.loc38_47) [template = constants.%.58] -// CHECK:STDOUT: %.loc38_48.7: init %i32 = converted %.loc38_47, %int.convert_checked.loc38_48 [template = constants.%.58] -// CHECK:STDOUT: %.loc38_48.8: ref %i32 = class_element_access %.loc38_57.3, element1 -// CHECK:STDOUT: %.loc38_48.9: init %i32 = initialize_from %.loc38_48.7 to %.loc38_48.8 [template = constants.%.58] -// CHECK:STDOUT: %.loc38_48.10: init %B = class_init (%.loc38_48.3, %.loc38_48.9), %.loc38_57.3 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.10 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc38_57.5: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_57.6: = bound_method %.loc38_56, %.loc38_57.5 [template = constants.%.59] -// CHECK:STDOUT: %.loc38_57.7: = specific_function %.loc38_57.6, @Convert.2(constants.%.1) [template = constants.%.60] -// CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %.loc38_57.7(%.loc38_56) [template = constants.%.61] -// CHECK:STDOUT: %.loc38_57.8: init %i32 = converted %.loc38_56, %int.convert_checked.loc38_57 [template = constants.%.61] -// CHECK:STDOUT: %.loc38_57.9: ref %i32 = class_element_access %.loc38_57.2, element1 -// CHECK:STDOUT: %.loc38_57.10: init %i32 = initialize_from %.loc38_57.8 to %.loc38_57.9 [template = constants.%.61] -// CHECK:STDOUT: %.loc38_57.11: init %C = class_init (%.loc38_57.4, %.loc38_57.10), %.loc38_57.2 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc38_57.12: ref %C = temporary %.loc38_57.2, %.loc38_57.11 -// CHECK:STDOUT: %.loc38_59: ref %C = converted %.loc38_57.1, %.loc38_57.12 +// CHECK:STDOUT: %.loc38_39.3: ref %i32 = class_element_access %.loc38_48.2, element0 +// CHECK:STDOUT: %.loc38_39.4: init %i32 = initialize_from %.loc38_39.2 to %.loc38_39.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc38_39.5: init %A = class_init (%.loc38_39.4), %.loc38_48.2 [template = constants.%A.val] +// CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.5 [template = constants.%A.val] +// CHECK:STDOUT: %impl.elem0.loc38_48: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc38_48: = bound_method %int_2, %impl.elem0.loc38_48 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc38_48: = specific_function %Convert.bound.loc38_48, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %Convert.specific_fn.loc38_48(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc38_48.4: init %i32 = converted %int_2, %int.convert_checked.loc38_48 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc38_48.5: ref %i32 = class_element_access %.loc38_57.3, element1 +// CHECK:STDOUT: %.loc38_48.6: init %i32 = initialize_from %.loc38_48.4 to %.loc38_48.5 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc38_48.7: init %B = class_init (%.loc38_48.3, %.loc38_48.6), %.loc38_57.3 [template = constants.%B.val] +// CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.7 [template = constants.%B.val] +// CHECK:STDOUT: %impl.elem0.loc38_57: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc38_57: = bound_method %int_3, %impl.elem0.loc38_57 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc38_57: = specific_function %Convert.bound.loc38_57, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %Convert.specific_fn.loc38_57(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc38_57.5: init %i32 = converted %int_3, %int.convert_checked.loc38_57 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc38_57.6: ref %i32 = class_element_access %.loc38_57.2, element1 +// CHECK:STDOUT: %.loc38_57.7: init %i32 = initialize_from %.loc38_57.5 to %.loc38_57.6 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc38_57.8: init %C = class_init (%.loc38_57.4, %.loc38_57.7), %.loc38_57.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc38_57.9: ref %C = temporary %.loc38_57.2, %.loc38_57.8 +// CHECK:STDOUT: %.loc38_59: ref %C = converted %.loc38_57.1, %.loc38_57.9 // 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 diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index b6cc48631b9b5..cfcb7eece6351 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -142,18 +142,18 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %SomeClass, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] // CHECK:STDOUT: %StaticMemberFunction.type: type = fn_type @StaticMemberFunction [template] // CHECK:STDOUT: %StaticMemberFunction: %StaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %AdapterMethod.type: type = fn_type @AdapterMethod [template] // CHECK:STDOUT: %AdapterMethod: %AdapterMethod.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %TestStaticMemberFunction.type: type = fn_type @TestStaticMemberFunction [template] // CHECK:STDOUT: %TestStaticMemberFunction: %TestStaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %TestAdapterMethod.type: type = fn_type @TestAdapterMethod [template] @@ -201,25 +201,25 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass.ref [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter // CHECK:STDOUT: extend %SomeClass.ref -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed.loc7, %.loc7_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed.loc8, %.loc8_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed.loc8, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8: %SomeClass.elem = field_decl b, element1 [template] // CHECK:STDOUT: %StaticMemberFunction.decl: %StaticMemberFunction.type = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} {} // CHECK:STDOUT: %AdapterMethod.decl: %AdapterMethod.type = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %self.patt: %SomeClassAdapter = binding_pattern self @@ -229,7 +229,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %self.param: %SomeClassAdapter = value_param runtime_param0 // CHECK:STDOUT: %self: %SomeClassAdapter = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -237,7 +237,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: .b = %.loc8_8 // CHECK:STDOUT: .StaticMemberFunction = %StaticMemberFunction.decl // CHECK:STDOUT: .AdapterMethod = %AdapterMethod.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @StaticMemberFunction(); @@ -256,8 +256,8 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: !entry: // 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 %empty_tuple.type = call %.loc24(%a.ref) +// CHECK:STDOUT: %AdapterMethod.bound: = bound_method %a.ref, %AdapterMethod.ref +// CHECK:STDOUT: %AdapterMethod.call: init %empty_tuple.type = call %AdapterMethod.bound(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -268,8 +268,8 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -312,23 +312,23 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %self.param: %SomeClass = value_param runtime_param0 // CHECK:STDOUT: %self: %SomeClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // 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.ref [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter // CHECK:STDOUT: extend %SomeClass.ref -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1[%self.param_patt: %SomeClass](); @@ -337,9 +337,9 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: !entry: // 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: %.loc23_4: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %.loc23_3: %SomeClass = converted %a.ref, [template = ] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc23_4() +// CHECK:STDOUT: %F.bound: = bound_method %a.ref, %F.ref +// CHECK:STDOUT: %.loc23: %SomeClass = converted %a.ref, [template = ] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -347,13 +347,13 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %SomeClass, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -385,10 +385,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %.loc13_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.3: type = converted %int.make_type_signed, %.loc13_30.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_signed, %.loc13_30.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -397,40 +397,40 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %SomeClass.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass // CHECK:STDOUT: .a = %.loc5_8 // CHECK:STDOUT: .b = %.loc6_8 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // 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.ref [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter // CHECK:STDOUT: extend %SomeClass.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %SomeClassAdapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] +// CHECK:STDOUT: %b.ref: %SomeClass.elem = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] // CHECK:STDOUT: %.loc21_11.1: %SomeClass = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc21_11.2: %i32 = class_element_access , element1 [template = ] // CHECK:STDOUT: return @@ -440,12 +440,12 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -473,10 +473,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %StructAdapter.ref: type = name_ref StructAdapter, file.%StructAdapter.decl [template = constants.%StructAdapter] -// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.3: type = converted %int.make_type_signed, %.loc8_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed, %.loc8_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %StructAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %StructAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -485,22 +485,22 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { -// CHECK:STDOUT: %.loc5_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_21: init type = call constants.%Int(%.loc5_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21.2: type = value_of_initializer %int.make_type_signed.loc5_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21.3: type = converted %int.make_type_signed.loc5_21, %.loc5_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%.loc5_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.2: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.3: type = converted %int.make_type_signed.loc5_30, %.loc5_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_33: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: adapt_decl %.loc5_33 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_21: init type = call constants.%Int(%int_32.loc5_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_21.1: type = value_of_initializer %int.make_type_signed.loc5_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_signed.loc5_21, %.loc5_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_30.1: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_30.2: type = converted %int.make_type_signed.loc5_30, %.loc5_30.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] +// CHECK:STDOUT: adapt_decl %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter -// CHECK:STDOUT: extend %.loc5_33 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: extend %struct_type.a.b +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %StructAdapter) -> %i32 { @@ -514,16 +514,16 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %TupleAdapter: type = class_type @TupleAdapter [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: = complete_type_witness %tuple.type.2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -549,10 +549,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %TupleAdapter.ref: type = name_ref TupleAdapter, file.%TupleAdapter.decl [template = constants.%TupleAdapter] -// CHECK:STDOUT: %.loc8_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_26.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_26.3: type = converted %int.make_type_signed, %.loc8_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_26.2: type = converted %int.make_type_signed, %.loc8_26.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %TupleAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %TupleAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -561,10 +561,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @TupleAdapter { -// CHECK:STDOUT: %.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%.loc5_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] // CHECK:STDOUT: %.loc5_25: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_17, %int.make_type_signed.loc5_22) // CHECK:STDOUT: %.loc5_26.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] // CHECK:STDOUT: %.loc5_26.2: type = converted %int.make_type_signed.loc5_17, %.loc5_26.1 [template = constants.%i32] @@ -572,18 +572,18 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %.loc5_26.4: type = converted %int.make_type_signed.loc5_22, %.loc5_26.3 [template = constants.%i32] // CHECK:STDOUT: %.loc5_26.5: type = converted %.loc5_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: adapt_decl %.loc5_26.5 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %tuple.type.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%TupleAdapter // CHECK:STDOUT: extend %.loc5_26.5 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %TupleAdapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %TupleAdapter = name_ref a, %a -// CHECK:STDOUT: %.loc14: Core.IntLiteral = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -595,9 +595,9 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %MakeInt.type: type = fn_type @MakeInt [template] // CHECK:STDOUT: %MakeInt: %MakeInt.type = struct_value () [template] // CHECK:STDOUT: %IntAdapter: type = class_type @IntAdapter [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -646,10 +646,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %IntAdapter.ref: type = name_ref IntAdapter, file.%IntAdapter.decl [template = constants.%IntAdapter] -// CHECK:STDOUT: %.loc10_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_24.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_24.3: type = converted %int.make_type_signed, %.loc10_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_24.2: type = converted %int.make_type_signed, %.loc10_24.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %IntAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %IntAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -659,17 +659,17 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @IntAdapter { // CHECK:STDOUT: %MakeInt.ref: %MakeInt.type = name_ref MakeInt, file.%MakeInt.decl [template = constants.%MakeInt] -// CHECK:STDOUT: %.loc7_24: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call %MakeInt.ref(%.loc7_24) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call %MakeInt.ref(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed, %.loc7_27.1 [template = constants.%i32] // CHECK:STDOUT: adapt_decl %.loc7_27.2 [template] -// CHECK:STDOUT: %.loc8: = complete_type_witness %i32 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%IntAdapter // CHECK:STDOUT: extend %.loc7_27.2 -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeInt(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 33dce70601f8b..5c5badb146e63 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -192,8 +192,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Contains: type = class_type @Contains [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -216,30 +216,30 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Contains { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc15: = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc16: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Contains // CHECK:STDOUT: .a = %.loc15 -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_abstract_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Var.type: type = fn_type @Var [template] // CHECK:STDOUT: %Var: %Var.type = struct_value () [template] // CHECK:STDOUT: } @@ -263,11 +263,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Var() { @@ -282,8 +282,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -314,11 +314,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %Abstract) { @@ -333,8 +333,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -357,29 +357,29 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapter { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: adapt_decl [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- define_and_call_abstract_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Param.type: type = fn_type @Param [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Param: %Param.type = struct_value () [template] @@ -422,11 +422,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Param(%a.param_patt: %Abstract); @@ -443,23 +443,23 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Abstract [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Abstract, .d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.13: type = struct_type {.a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %.13, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %struct_type.a, .d: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -491,37 +491,37 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc8: %.4 = base_decl %Abstract.ref, element0 [template] -// CHECK:STDOUT: %.loc10_10.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed, %.loc10_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: .d = %.loc10_8 // CHECK:STDOUT: extend %Abstract.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_25: Core.IntLiteral = int_value 1 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_26: %.13 = struct_literal (%.loc22_25) -// CHECK:STDOUT: %.loc22_34: Core.IntLiteral = int_value 7 [template = constants.%.14] -// CHECK:STDOUT: %.loc22_35: %.15 = struct_literal (%.loc22_26, %.loc22_34) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc22_26: %struct_type.a = struct_literal (%int_1) +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc22_35: %struct_type.base.d.3 = struct_literal (%.loc22_26, %int_7) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -529,17 +529,17 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Abstract [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d: type = struct_type {.base: %Abstract, .d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d [template] // CHECK:STDOUT: %Return.type: type = fn_type @Return [template] // CHECK:STDOUT: %Return: %Return.type = struct_value () [template] // CHECK:STDOUT: } @@ -578,29 +578,29 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc8: %.4 = base_decl %Abstract.ref, element0 [template] -// CHECK:STDOUT: %.loc10_10.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed, %.loc10_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: .d = %.loc10_8 // CHECK:STDOUT: extend %Abstract.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Return(%a.param_patt: %Abstract) -> %return: %Abstract { @@ -613,18 +613,18 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Abstract, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Abstract.elem: type = unbound_element_type %Abstract, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Abstract [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, %i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] +// CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Abstract, .d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } @@ -654,10 +654,10 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc14_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26.3: type = converted %int.make_type_signed, %.loc14_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_26.2: type = converted %int.make_type_signed, %.loc14_26.1 [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -666,41 +666,41 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %Abstract.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract // CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %Abstract.ref, element0 [template] -// CHECK:STDOUT: %.loc11_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.3: type = converted %int.make_type_signed, %.loc11_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc9: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_10.2: type = converted %int.make_type_signed, %.loc11_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .d = %.loc11_8 // CHECK:STDOUT: extend %Abstract.ref -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d -// CHECK:STDOUT: %base.ref: %.6 = name_ref base, @Derived.%.loc9 [template = @Derived.%.loc9] +// CHECK:STDOUT: %base.ref: %Derived.elem.1 = name_ref base, @Derived.%.loc9 [template = @Derived.%.loc9] // CHECK:STDOUT: %.loc15: ref %Abstract = class_element_access %d.ref, element0 // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] // CHECK:STDOUT: return @@ -710,8 +710,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -735,17 +735,17 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc8: %.1 = struct_literal () +// CHECK:STDOUT: %.loc8: %empty_struct_type = struct_literal () // CHECK:STDOUT: %l: %Abstract = bind_name l, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -754,8 +754,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ReturnAbstract.type: type = fn_type @ReturnAbstract [template] // CHECK:STDOUT: %ReturnAbstract: %ReturnAbstract.type = struct_value () [template] // CHECK:STDOUT: %CallReturnAbstract.type: type = fn_type @CallReturnAbstract [template] @@ -790,11 +790,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnAbstract() -> %Abstract; diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index deb74c245a480..244a72dfa623c 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -106,7 +106,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 100 [template] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -138,14 +138,14 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { -// CHECK:STDOUT: %.loc12_9: Core.IntLiteral = int_value 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_12: type = converted %.loc12_9, [template = ] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100] +// CHECK:STDOUT: %.loc12: type = converted %int_100, [template = ] // CHECK:STDOUT: adapt_decl [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Bad -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use(%b.param_patt: %Bad) { @@ -159,7 +159,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 100 [template] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -191,15 +191,15 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_19: type = converted %.loc12_16, [template = ] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100] +// CHECK:STDOUT: %.loc12: type = converted %int_100, [template = ] // CHECK:STDOUT: adapt_decl [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Bad // CHECK:STDOUT: extend -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use(%b.param_patt: %Bad) { @@ -214,8 +214,8 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %MultipleAdapts: type = class_type @MultipleAdapts [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %empty_tuple.type [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_tuple.type [template] // CHECK:STDOUT: %MultipleAdaptsSameType: type = class_type @MultipleAdaptsSameType [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -241,12 +241,12 @@ class C { // CHECK:STDOUT: %.loc5_10: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11: type = converted %.loc5_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: adapt_decl %.loc5_11 [template] -// CHECK:STDOUT: %.loc13: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14: = complete_type_witness %empty_tuple.type [template = constants.%.2] +// CHECK:STDOUT: %.loc13: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_tuple.type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdapts -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MultipleAdaptsSameType { @@ -254,23 +254,23 @@ class C { // CHECK:STDOUT: %.loc17_11: type = converted %.loc17_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: adapt_decl %.loc17_11 [template] // CHECK:STDOUT: %.loc25: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc26: = complete_type_witness %empty_tuple.type [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_tuple.type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdaptsSameType -// CHECK:STDOUT: complete_type_witness = %.loc26 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bad_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %I.type.1: type = facet_type <@I.1> [template] // CHECK:STDOUT: %Self.1: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I.2> [template] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -287,14 +287,14 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc8: %.1 = struct_literal () +// CHECK:STDOUT: %.loc8: %empty_struct_type = struct_literal () // CHECK:STDOUT: %I.decl: type = interface_decl @I.1 [template = constants.%I.type.1] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.1 { // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc15: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -303,7 +303,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: interface @I.2 { // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %.loc23: %.1 = struct_literal () +// CHECK:STDOUT: %.loc23: %empty_struct_type = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -312,11 +312,11 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %I.decl: type = interface_decl @I.2 [template = constants.%I.type.2] {} {} -// CHECK:STDOUT: %.loc25: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: complete_type_witness = %.loc25 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_adapt_bad_type.carbon b/toolchain/check/testdata/class/fail_adapt_bad_type.carbon index 3e99441a7a803..19950fef4f231 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_type.carbon @@ -54,10 +54,10 @@ class AdaptIncomplete { // CHECK:STDOUT: class @AdaptIncomplete { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: adapt_decl [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptIncomplete -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon index 46863d944b241..696895bf14fe3 100644 --- a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon @@ -59,8 +59,8 @@ class C5 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] // CHECK:STDOUT: %C3: type = class_type @C3 [template] @@ -95,62 +95,62 @@ class C5 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc27: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 -// CHECK:STDOUT: complete_type_witness = %.loc27 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc35: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 -// CHECK:STDOUT: complete_type_witness = %.loc35 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc46: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C4 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc46 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc56: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C5 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc56 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_adapt_with_base.carbon b/toolchain/check/testdata/class/fail_adapt_with_base.carbon index 1989f5053d065..e9942c5a52da8 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_base.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_base.carbon @@ -23,8 +23,8 @@ base class AdaptWithVirtual { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple: type = class_type @Simple [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptWithVirtual: type = class_type @AdaptWithVirtual [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -49,11 +49,11 @@ base class AdaptWithVirtual { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Simple { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Simple -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithVirtual { diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index d775f4d5a68a3..dcf9c30c3c9b6 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -78,14 +78,14 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptWithBase: type = class_type @AdaptWithBase [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %AdaptWithBase, %Base [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %AdaptWithBase.elem: type = unbound_element_type %AdaptWithBase, %Base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -108,21 +108,21 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithBase { -// CHECK:STDOUT: %.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc10_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_signed, %.loc10_12.1 [template = constants.%i32] // CHECK:STDOUT: adapt_decl %.loc10_12.2 [template] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc15: %.5 = base_decl %Base.ref, element [template] +// CHECK:STDOUT: %.loc15: %AdaptWithBase.elem = base_decl %Base.ref, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithBase @@ -135,13 +135,13 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptWithField: type = class_type @AdaptWithField [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %AdaptWithField, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %AdaptWithField.elem: 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: %AdaptWithFields.elem: type = unbound_element_type %AdaptWithFields, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -164,16 +164,16 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithField { -// CHECK:STDOUT: %.loc8_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] // CHECK:STDOUT: %.loc8_12.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] // CHECK:STDOUT: %.loc8_12.2: type = converted %int.make_type_signed.loc8, %.loc8_12.1 [template = constants.%i32] // CHECK:STDOUT: adapt_decl %.loc8_12.2 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl n, element [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %AdaptWithField.elem = field_decl n, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithField @@ -182,26 +182,26 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithFields { -// CHECK:STDOUT: %.loc20_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] // CHECK:STDOUT: %.loc20_12.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] // CHECK:STDOUT: %.loc20_12.2: type = converted %int.make_type_signed.loc20, %.loc20_12.1 [template = constants.%i32] // CHECK:STDOUT: adapt_decl %.loc20_12.2 [template] -// CHECK:STDOUT: %.loc25_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_10.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_10.3: type = converted %int.make_type_signed.loc25, %.loc25_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_8: %.3 = field_decl a, element [template] -// CHECK:STDOUT: %.loc26_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.3: type = converted %int.make_type_signed.loc26, %.loc26_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_8: %.3 = field_decl b, element [template] -// CHECK:STDOUT: %.loc27_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.3: type = converted %int.make_type_signed.loc27, %.loc27_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8: %.3 = field_decl c, element [template] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_10.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_10.2: type = converted %int.make_type_signed.loc25, %.loc25_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc25_8: %AdaptWithFields.elem = field_decl a, element [template] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_signed.loc26, %.loc26_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_8: %AdaptWithFields.elem = field_decl b, element [template] +// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_signed.loc27, %.loc27_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_8: %AdaptWithFields.elem = field_decl c, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithFields @@ -215,15 +215,15 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptWithBaseAndFields: type = class_type @AdaptWithBaseAndFields [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %AdaptWithBaseAndFields, %Base [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %AdaptWithBaseAndFields.elem.1: type = unbound_element_type %AdaptWithBaseAndFields, %Base [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %AdaptWithBaseAndFields, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %AdaptWithBaseAndFields.elem.2: type = unbound_element_type %AdaptWithBaseAndFields, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -246,23 +246,23 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithBaseAndFields { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc7: %.4 = base_decl %Base.ref, element [template] -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed, %.loc8_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %.6 = field_decl n, element [template] -// CHECK:STDOUT: %.loc15_10: %.1 = struct_literal () -// CHECK:STDOUT: %.loc15_11: type = converted %.loc15_10, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc7: %AdaptWithBaseAndFields.elem.1 = base_decl %Base.ref, element [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8: %AdaptWithBaseAndFields.elem.2 = field_decl n, element [template] +// CHECK:STDOUT: %.loc15_10: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_11: type = converted %.loc15_10, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: adapt_decl %.loc15_11 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index 9ccc3573922bc..17375149f2a66 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -25,15 +25,15 @@ 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: %a: %.1 = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %a.patt: %.1 = symbolic_binding_pattern a, 0 [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template] +// CHECK:STDOUT: %a: %ptr = bind_symbolic_name a, 0 [symbolic] +// CHECK:STDOUT: %a.patt: %ptr = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,40 +54,40 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %a.patt.loc16_13.2: %.1 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] -// CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt.loc16_13.2, runtime_param [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] +// CHECK:STDOUT: %a.patt.loc16_13.2: %ptr = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt: %ptr = value_param_pattern %a.patt.loc16_13.2, runtime_param [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %a.param: %.1 = value_param runtime_param -// CHECK:STDOUT: %a.loc16_13.2: %.1 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc16_13.1 (constants.%a)] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: %a.param: %ptr = value_param runtime_param +// CHECK:STDOUT: %a.loc16_13.2: %ptr = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc16_13.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %b.patt: %.1 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.1 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %ptr = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %ptr = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc21: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %b.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.1 = bind_name b, %b.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: %b.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %b: %ptr = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%a.loc16_13.2: %.1) { -// CHECK:STDOUT: %a.loc16_13.1: %.1 = bind_symbolic_name a, 0 [symbolic = %a.loc16_13.1 (constants.%a)] -// CHECK:STDOUT: %a.patt.loc16_13.1: %.1 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] +// CHECK:STDOUT: generic fn @F(%a.loc16_13.2: %ptr) { +// CHECK:STDOUT: %a.loc16_13.1: %ptr = bind_symbolic_name a, 0 [symbolic = %a.loc16_13.1 (constants.%a)] +// CHECK:STDOUT: %a.patt.loc16_13.1: %ptr = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%a.param_patt: %.1](); +// CHECK:STDOUT: fn[%a.param_patt: %ptr](); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param_patt: %.1); +// CHECK:STDOUT: fn @G(%b.param_patt: %ptr); // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%a) { // CHECK:STDOUT: %a.loc16_13.1 => constants.%a diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index f76b6f8235318..ee4409ee6c14b 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -38,14 +38,14 @@ 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: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -68,29 +68,29 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %c.patt: %Class = binding_pattern c // CHECK:STDOUT: %c.param_patt: %Class = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc20_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %Class.ref.loc20_19: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc20: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param -// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param1 -// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc12_24: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self @@ -100,41 +100,41 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %.1](); +// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: // CHECK:STDOUT: fn @G[%self.param_patt: %Class](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%c.param_patt: %Class, %p.param_patt: %.1) { +// CHECK:STDOUT: fn @F.2(%c.param_patt: %Class, %p.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref.loc27: %Class = name_ref c, %c // CHECK:STDOUT: %F.ref.loc27: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] -// CHECK:STDOUT: %.loc27: = bound_method %c.ref.loc27, %F.ref.loc27 -// CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %.loc27() +// CHECK:STDOUT: %F.bound.loc27: = bound_method %c.ref.loc27, %F.ref.loc27 +// CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %F.bound.loc27() // CHECK:STDOUT: %c.ref.loc29: %Class = name_ref c, %c // CHECK:STDOUT: %G.ref.loc29: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc29: = bound_method %c.ref.loc29, %G.ref.loc29 -// CHECK:STDOUT: %G.call.loc29: init %empty_tuple.type = call %.loc29(%c.ref.loc29) -// CHECK:STDOUT: %p.ref.loc32: %.1 = name_ref p, %p -// CHECK:STDOUT: %.loc32_4.1: ref %Class = deref %p.ref.loc32 +// CHECK:STDOUT: %G.bound.loc29: = bound_method %c.ref.loc29, %G.ref.loc29 +// CHECK:STDOUT: %G.call.loc29: init %empty_tuple.type = call %G.bound.loc29(%c.ref.loc29) +// CHECK:STDOUT: %p.ref.loc32: %ptr.1 = name_ref p, %p +// CHECK:STDOUT: %.loc32: ref %Class = deref %p.ref.loc32 // CHECK:STDOUT: %F.ref.loc32: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] -// CHECK:STDOUT: %.loc32_7: = bound_method %.loc32_4.1, %F.ref.loc32 -// CHECK:STDOUT: %.loc32_4.2: %.1 = addr_of %.loc32_4.1 -// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %.loc32_7(%.loc32_4.2) -// CHECK:STDOUT: %p.ref.loc34: %.1 = name_ref p, %p +// CHECK:STDOUT: %F.bound.loc32: = bound_method %.loc32, %F.ref.loc32 +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %.loc32 +// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %F.bound.loc32(%addr) +// CHECK:STDOUT: %p.ref.loc34: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc34_4.1: ref %Class = deref %p.ref.loc34 // CHECK:STDOUT: %G.ref.loc34: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc34_7: = bound_method %.loc34_4.1, %G.ref.loc34 +// CHECK:STDOUT: %G.bound.loc34: = bound_method %.loc34_4.1, %G.ref.loc34 // CHECK:STDOUT: %.loc34_4.2: %Class = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call.loc34: init %empty_tuple.type = call %.loc34_7(%.loc34_4.2) +// CHECK:STDOUT: %G.call.loc34: init %empty_tuple.type = call %G.bound.loc34(%.loc34_4.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index 36e58b18da328..43f2e57d9f92d 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -182,11 +182,11 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromError: type = class_type @DeriveFromError [template] -// CHECK:STDOUT: %.1: type = ptr_type %DeriveFromError [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.type: type = fn_type @AccessMemberWithInvalidBaseError [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError: %AccessMemberWithInvalidBaseError.type = struct_value () [template] // CHECK:STDOUT: } @@ -208,19 +208,19 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromError.decl: type = class_decl @DeriveFromError [template = constants.%DeriveFromError] {} {} // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: %AccessMemberWithInvalidBaseError.type = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%AccessMemberWithInvalidBaseError] { -// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, file.%DeriveFromError.decl [template = constants.%DeriveFromError] -// CHECK:STDOUT: %.loc13_55: type = ptr_type %DeriveFromError [template = constants.%.1] -// CHECK:STDOUT: %.loc13_61.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_61.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_61.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_61.3: type = converted %int.make_type_signed, %.loc13_61.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [template = constants.%ptr] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_61.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_61.2: type = converted %int.make_type_signed, %.loc13_61.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -229,18 +229,18 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: class @DeriveFromError { // CHECK:STDOUT: %error.ref: = name_ref error, [template = ] // CHECK:STDOUT: %.loc9: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromError // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p.param_patt: %.1) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %.loc13_75: ref %DeriveFromError = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -250,11 +250,11 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %.25: type = ptr_type %DeriveFromNonType [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: %AccessMemberWithInvalidBasNonType.type = struct_value () [template] // CHECK:STDOUT: } @@ -277,40 +277,40 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} {} // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { -// CHECK:STDOUT: %p.patt: %.25 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.25 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %.loc15_58: type = ptr_type %DeriveFromNonType [template = constants.%.25] -// CHECK:STDOUT: %.loc15_64.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_64.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_64.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_64.3: type = converted %int.make_type_signed, %.loc15_64.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.25 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.25 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [template = constants.%ptr] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_64.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_64.2: type = converted %int.make_type_signed, %.loc15_64.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromNonType { -// CHECK:STDOUT: %.loc12_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_16.2: type = converted %.loc12_16.1, [template = ] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %.loc12_16: type = converted %int_32, [template = ] // CHECK:STDOUT: %.loc12_18: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromNonType // CHECK:STDOUT: .base = %.loc12_18 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %.25) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.25 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %.loc15_78: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -320,12 +320,12 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = ptr_type %DeriveFromi32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %DeriveFromi32 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] // CHECK:STDOUT: %ConvertToBadBasei32: %ConvertToBadBasei32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.type: type = fn_type @AccessMemberWithInvalidBasei32 [template] @@ -351,67 +351,67 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromi32.decl: type = class_decl @DeriveFromi32 [template = constants.%DeriveFromi32] {} {} // CHECK:STDOUT: %ConvertToBadBasei32.decl: %ConvertToBadBasei32.type = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc21_40: type = ptr_type %DeriveFromi32 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_46: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_46) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc21_40: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc21_49.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc21_49.2: type = converted %int.make_type_signed, %.loc21_49.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.3: type = ptr_type %i32 [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc21_49: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: %AccessMemberWithInvalidBasei32.type = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc23_51: type = ptr_type %DeriveFromi32 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_57.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_57.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_57.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_57.3: type = converted %int.make_type_signed, %.loc23_57.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_57.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_57.2: type = converted %int.make_type_signed, %.loc23_57.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromi32 { -// CHECK:STDOUT: %.loc7_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.3: type = converted %int.make_type_signed, %.loc7_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_signed, %.loc7_16.1 [template = constants.%i32] // CHECK:STDOUT: %.loc7_19: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc8: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromi32 // CHECK:STDOUT: .base = %.loc7_19 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBasei32(%p.param_patt: %.2) -> %.3 { +// CHECK:STDOUT: fn @ConvertToBadBasei32(%p.param_patt: %ptr.1) -> %ptr.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p -// CHECK:STDOUT: %.loc21_61: %.3 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p +// CHECK:STDOUT: %.loc21_61: %ptr.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %.2) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc23_71: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -421,19 +421,19 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%Base) [template] -// CHECK:STDOUT: %.4: type = ptr_type %DeriveFromTuple [template] -// CHECK:STDOUT: %.5: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %DeriveFromTuple [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] // CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.29 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: %AccessMemberWithInvalidBaseTuple.type = struct_value () [template] // CHECK:STDOUT: } @@ -459,47 +459,47 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %DeriveFromTuple.decl: type = class_decl @DeriveFromTuple [template = constants.%DeriveFromTuple] {} {} // CHECK:STDOUT: %ConvertToBadBaseTuple.decl: %ConvertToBadBaseTuple.type = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%.4] +// CHECK:STDOUT: %ptr.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc21_56: %tuple.type.1 = tuple_literal (%Base.ref) -// CHECK:STDOUT: %.loc21_57.1: type = converted %.loc21_56, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc21_57.2: type = ptr_type %tuple.type.2 [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc21_57: type = converted %.loc21_56, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %ptr.loc21_57: type = ptr_type %tuple.type.2 [template = constants.%ptr.3] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: %AccessMemberWithInvalidBaseTuple.type = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc23_55: type = ptr_type %DeriveFromTuple [template = constants.%.4] -// CHECK:STDOUT: %.loc23_61.1: Core.IntLiteral = int_value 32 [template = constants.%.29] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_61.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_61.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_61.3: type = converted %int.make_type_signed, %.loc23_61.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_61.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_61.2: type = converted %int.make_type_signed, %.loc23_61.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc2: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: complete_type_witness = %.loc2 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromTuple { @@ -507,25 +507,25 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.loc9_22.1: %tuple.type.1 = tuple_literal (%Base.ref) // CHECK:STDOUT: %.loc9_22.2: type = converted %.loc9_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc9_23: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromTuple // CHECK:STDOUT: .base = %.loc9_23 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p.param_patt: %.4) -> %.5 { +// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p.param_patt: %ptr.2) -> %ptr.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc21_69: %.5 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %.loc21_69: %ptr.3 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %.4) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc23_75: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -535,13 +535,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %DeriveFromStruct [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %struct_type.a.b [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %DeriveFromStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct.type: type = fn_type @ConvertToBadBaseStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct: %ConvertToBadBaseStruct.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.type: type = fn_type @AccessMemberWithInvalidBaseStruct [template] @@ -567,77 +567,77 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromStruct.decl: type = class_decl @DeriveFromStruct [template = constants.%DeriveFromStruct] {} {} // CHECK:STDOUT: %ConvertToBadBaseStruct.decl: %ConvertToBadBaseStruct.type = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%.4] -// CHECK:STDOUT: %.loc21_57.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_57: init type = call constants.%Int(%.loc21_57.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_57.2: type = value_of_initializer %int.make_type_signed.loc21_57 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_57.3: type = converted %int.make_type_signed.loc21_57, %.loc21_57.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_66.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_66: init type = call constants.%Int(%.loc21_66.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_66.2: type = value_of_initializer %int.make_type_signed.loc21_66 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_66.3: type = converted %int.make_type_signed.loc21_66, %.loc21_66.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_69: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc21_70: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc21_57: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_57: init type = call constants.%Int(%int_32.loc21_57) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_57.1: type = value_of_initializer %int.make_type_signed.loc21_57 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_57.2: type = converted %int.make_type_signed.loc21_57, %.loc21_57.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_66: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_66: init type = call constants.%Int(%int_32.loc21_66) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_66.1: type = value_of_initializer %int.make_type_signed.loc21_66 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_66.2: type = converted %int.make_type_signed.loc21_66, %.loc21_66.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] +// CHECK:STDOUT: %ptr.loc21_70: type = ptr_type %struct_type.a.b [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: %AccessMemberWithInvalidBaseStruct.type = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc24_57: type = ptr_type %DeriveFromStruct [template = constants.%.4] -// CHECK:STDOUT: %.loc24_63.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_63.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_63.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_63.3: type = converted %int.make_type_signed, %.loc24_63.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_63.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_63.2: type = converted %int.make_type_signed, %.loc24_63.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromStruct { -// CHECK:STDOUT: %.loc9_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_21: init type = call constants.%Int(%.loc9_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_21.2: type = value_of_initializer %int.make_type_signed.loc9_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_21.3: type = converted %int.make_type_signed.loc9_21, %.loc9_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9_30: init type = call constants.%Int(%.loc9_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_30.2: type = value_of_initializer %int.make_type_signed.loc9_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_30.3: type = converted %int.make_type_signed.loc9_30, %.loc9_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_33: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc9_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_21: init type = call constants.%Int(%int_32.loc9_21) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_21.1: type = value_of_initializer %int.make_type_signed.loc9_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed.loc9_21, %.loc9_21.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_30: init type = call constants.%Int(%int_32.loc9_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %int.make_type_signed.loc9_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_30.2: type = converted %int.make_type_signed.loc9_30, %.loc9_30.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %.loc9_34: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromStruct // CHECK:STDOUT: .base = %.loc9_34 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %.4) -> %.3 { +// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %ptr.2) -> %ptr.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc21_82: %.3 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %.loc21_82: %ptr.1 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %.4) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc24_77: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -648,14 +648,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %DeriveFromIncomplete: type = class_type @DeriveFromIncomplete [template] -// CHECK:STDOUT: %.1: type = ptr_type %DeriveFromIncomplete [template] -// CHECK:STDOUT: %.2: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %DeriveFromIncomplete [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.26 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: %AccessMemberWithInvalidBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: } @@ -681,34 +681,34 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %ConvertToBadBaseIncomplete.type = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { -// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc28_54: type = ptr_type %DeriveFromIncomplete [template = constants.%.1] +// CHECK:STDOUT: %ptr.loc28_54: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc28_70: type = ptr_type %Incomplete [template = constants.%.2] -// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc28_70: type = ptr_type %Incomplete [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: %AccessMemberWithInvalidBaseIncomplete.type = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { -// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc30_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.1] -// CHECK:STDOUT: %.loc30_71.1: Core.IntLiteral = int_value 32 [template = constants.%.26] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_71.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc30_71.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_71.3: type = converted %int.make_type_signed, %.loc30_71.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc30_71.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc30_71.2: type = converted %int.make_type_signed, %.loc30_71.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -719,25 +719,25 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: class @DeriveFromIncomplete { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc16: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromIncomplete // CHECK:STDOUT: .base = %.loc16 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p.param_patt: %.1) -> %.2 { +// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p.param_patt: %ptr.1) -> %ptr.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p -// CHECK:STDOUT: %.loc28_82: %.2 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p +// CHECK:STDOUT: %.loc28_82: %ptr.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p.param_patt: %.1) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc30_85: ref %DeriveFromIncomplete = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -747,19 +747,19 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Final: type = class_type @Final [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Final, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Final.elem: type = unbound_element_type %Final, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %DeriveFromFinal, %Final [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Final} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = ptr_type %DeriveFromFinal [template] -// CHECK:STDOUT: %.10: type = ptr_type %Final [template] +// CHECK:STDOUT: %DeriveFromFinal.elem: type = unbound_element_type %DeriveFromFinal, %Final [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Final} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %DeriveFromFinal [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %Final [template] // CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] // CHECK:STDOUT: %ConvertToBadBaseFinal: %ConvertToBadBaseFinal.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] @@ -789,97 +789,97 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Final.decl: type = class_decl @Final [template = constants.%Final] {} {} // CHECK:STDOUT: %DeriveFromFinal.decl: type = class_decl @DeriveFromFinal [template = constants.%DeriveFromFinal] {} {} // CHECK:STDOUT: %ConvertToBadBaseFinal.decl: %ConvertToBadBaseFinal.type = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.10 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.10 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc15_44: type = ptr_type %DeriveFromFinal [template = constants.%.9] +// CHECK:STDOUT: %ptr.loc15_44: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc15_55: type = ptr_type %Final [template = constants.%.10] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.10 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.10 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc15_55: type = ptr_type %Final [template = constants.%ptr.3] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: %AccessMemberWithInvalidBaseFinal_WithMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc19_66: type = ptr_type %DeriveFromFinal [template = constants.%.9] -// CHECK:STDOUT: %.loc19_72.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_72.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_72.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_72.3: type = converted %int.make_type_signed, %.loc19_72.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_72.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_72.2: type = converted %int.make_type_signed, %.loc19_72.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: %AccessMemberWithInvalidBaseFinal_NoMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc23_64: type = ptr_type %DeriveFromFinal [template = constants.%.9] -// CHECK:STDOUT: %.loc23_70.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_70.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_70.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_70.3: type = converted %int.make_type_signed, %.loc23_70.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_70.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_70.2: type = converted %int.make_type_signed, %.loc23_70.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Final { -// CHECK:STDOUT: %.loc3_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc3_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc3_10.3: type = converted %int.make_type_signed, %.loc3_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc4: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc3_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc3_10.2: type = converted %int.make_type_signed, %.loc3_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc3_8: %Final.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Final // CHECK:STDOUT: .a = %.loc3_8 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromFinal { // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc11: %.6 = base_decl %Final.ref, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc11: %DeriveFromFinal.elem = base_decl %Final.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromFinal // CHECK:STDOUT: .base = %.loc11 // CHECK:STDOUT: extend %Final.ref -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p.param_patt: %.9) -> %.10 { +// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p.param_patt: %ptr.2) -> %ptr.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc16_11.1: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %.loc16_11.2: ref %Final = class_element_access %.loc16_11.1, element0 -// CHECK:STDOUT: %.loc16_11.3: %.10 = addr_of %.loc16_11.2 -// CHECK:STDOUT: %.loc16_11.4: %.10 = converted %p.ref, %.loc16_11.3 -// CHECK:STDOUT: return %.loc16_11.4 +// CHECK:STDOUT: %addr: %ptr.3 = addr_of %.loc16_11.2 +// CHECK:STDOUT: %.loc16_11.3: %ptr.3 = converted %p.ref, %addr +// CHECK:STDOUT: return %.loc16_11.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p.param_patt: %.9) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc20_11: ref %DeriveFromFinal = deref %p.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Final.%.loc3_8 [template = @Final.%.loc3_8] +// CHECK:STDOUT: %a.ref: %Final.elem = name_ref a, @Final.%.loc3_8 [template = @Final.%.loc3_8] // CHECK:STDOUT: %.loc20_14.1: ref %Final = class_element_access %.loc20_11, element0 // CHECK:STDOUT: %.loc20_14.2: ref %Final = converted %.loc20_11, %.loc20_14.1 // CHECK:STDOUT: %.loc20_14.3: ref %i32 = class_element_access %.loc20_14.2, element0 @@ -887,9 +887,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: return %.loc20_14.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p.param_patt: %.9) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc27: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %b.ref: = name_ref b, [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_base_method_define.carbon b/toolchain/check/testdata/class/fail_base_method_define.carbon index 4c68f3c89b5ef..bb1bc1b3ca43d 100644 --- a/toolchain/check/testdata/class/fail_base_method_define.carbon +++ b/toolchain/check/testdata/class/fail_base_method_define.carbon @@ -40,16 +40,16 @@ fn D.C.F() {} // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %D, %B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.7: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,42 +69,42 @@ fn D.C.F() {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.7] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc20: %.4 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc21: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc20: %D.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .base = %.loc20 // CHECK:STDOUT: .F = file.%F.decl // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); diff --git a/toolchain/check/testdata/class/fail_base_misplaced.carbon b/toolchain/check/testdata/class/fail_base_misplaced.carbon index 06cd79c7a37f0..36a735093ba22 100644 --- a/toolchain/check/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/check/testdata/class/fail_base_misplaced.carbon @@ -31,18 +31,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/fail_base_modifiers.carbon b/toolchain/check/testdata/class/fail_base_modifiers.carbon index 17ce699871f63..21ac89ffac722 100644 --- a/toolchain/check/testdata/class/fail_base_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_base_modifiers.carbon @@ -55,18 +55,18 @@ class C4 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C1, %B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %C1.elem: type = unbound_element_type %C1, %B [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %C2, %B [template] +// CHECK:STDOUT: %C2.elem: type = unbound_element_type %C2, %B [template] // CHECK:STDOUT: %C3: type = class_type @C3 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C3, %B [template] +// CHECK:STDOUT: %C3.elem: type = unbound_element_type %C3, %B [template] // CHECK:STDOUT: %C4: type = class_type @C4 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %C4, %B [template] +// CHECK:STDOUT: %C4.elem: type = unbound_element_type %C4, %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -94,57 +94,57 @@ class C4 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C1 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc18: %.4 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc18: %C1.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 // CHECK:STDOUT: .base = %.loc18 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C2 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc30: %.7 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc31: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc30: %C2.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 // CHECK:STDOUT: .base = %.loc30 -// CHECK:STDOUT: complete_type_witness = %.loc31 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C3 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc41: %.8 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc42: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc41: %C3.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 // CHECK:STDOUT: .base = %.loc41 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc42 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C4 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc51: %.9 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc52: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc51: %C4.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C4 // CHECK:STDOUT: .base = %.loc51 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc52 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_no_extend.carbon b/toolchain/check/testdata/class/fail_base_no_extend.carbon index f3df49c66a096..42e7cb6c04b50 100644 --- a/toolchain/check/testdata/class/fail_base_no_extend.carbon +++ b/toolchain/check/testdata/class/fail_base_no_extend.carbon @@ -21,12 +21,12 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,21 +48,21 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc17: %.4 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc17: %C.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc17 -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_repeated.carbon b/toolchain/check/testdata/class/fail_base_repeated.carbon index 73d7e3a8ef0e8..02f483a4eb37d 100644 --- a/toolchain/check/testdata/class/fail_base_repeated.carbon +++ b/toolchain/check/testdata/class/fail_base_repeated.carbon @@ -39,15 +39,15 @@ class D { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B1: type = class_type @B1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B1 [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B1 [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B1} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %D, %B1 [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %B1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,44 +73,44 @@ class D { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B1 { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B1 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B2 { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B1.ref: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc15: %.4 = base_decl %B1.ref, element0 [template] +// CHECK:STDOUT: %.loc15: %C.elem = base_decl %B1.ref, element0 [template] // CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc15 // CHECK:STDOUT: extend %B1.ref -// CHECK:STDOUT: complete_type_witness = %.loc24 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B1.ref.loc28: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc28: %.7 = base_decl %B1.ref.loc28, element0 [template] +// CHECK:STDOUT: %.loc28: %D.elem = base_decl %B1.ref.loc28, element0 [template] // CHECK:STDOUT: %B1.ref.loc35: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc36: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .base = %.loc28 // CHECK:STDOUT: extend %B1.ref.loc28 -// CHECK:STDOUT: complete_type_witness = %.loc36 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index ea0433c8c0db6..76b1ad017bdbe 100644 --- a/toolchain/check/testdata/class/fail_base_unbound.carbon +++ b/toolchain/check/testdata/class/fail_base_unbound.carbon @@ -23,12 +23,12 @@ let b: B = C.base; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,29 +52,29 @@ let b: B = C.base; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc14: %.4 = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc14: %C.elem = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc14 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %base.ref: %.4 = name_ref base, @C.%.loc14 [template = @C.%.loc14] +// CHECK:STDOUT: %base.ref: %C.elem = name_ref base, @C.%.loc14 [template = @C.%.loc14] // CHECK:STDOUT: %b: %B = bind_name b, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index ae2f701986e79..923dc78f4c202 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -30,17 +30,17 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.b [template] // CHECK:STDOUT: %AccessBInA.type: type = fn_type @AccessBInA [template] // CHECK:STDOUT: %AccessBInA: %AccessBInA.type = struct_value () [template] // CHECK:STDOUT: } @@ -71,10 +71,10 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc19_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.3: type = converted %int.make_type_signed, %.loc19_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed, %.loc19_24.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -83,38 +83,38 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc16_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.3: type = converted %int.make_type_signed, %.loc16_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8: %.5 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8: %B.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .b = %.loc16_8 -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessBInA(%a.param_patt: %A) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %b.ref: %.5 = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] +// CHECK:STDOUT: %b.ref: %B.elem = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] // CHECK:STDOUT: %.loc26_11.1: %B = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc26_11.2: %i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon index 0e6e19782c781..d7deff0c3f1aa 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -25,8 +25,8 @@ fn Make() -> C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 123 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,18 +57,18 @@ fn Make() -> C { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %NoSuchType.ref: = name_ref NoSuchType, [template = ] // CHECK:STDOUT: %.loc15: = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc16: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %.loc15 -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_16: Core.IntLiteral = int_value 123 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_19: %.2 = struct_literal (%.loc19_16) +// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [template = constants.%int_123] +// CHECK:STDOUT: %.loc19: %struct_type.a = struct_literal (%int_123) // 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 e36433cec11aa..56d0097e18a5d 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -44,27 +44,27 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A1: type = class_type @A1 [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A1, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A1.elem: type = unbound_element_type %A1, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %A2: type = class_type @A2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %A2, %i32 [template] +// CHECK:STDOUT: %A2.elem: type = unbound_element_type %A2, %i32 [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %B2, %A2 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %B2, %i32 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %A2, .b: %i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %B2 [template] -// CHECK:STDOUT: %.12: type = ptr_type %A1 [template] +// CHECK:STDOUT: %B2.elem.1: type = unbound_element_type %B2, %A2 [template] +// CHECK:STDOUT: %B2.elem.2: type = unbound_element_type %B2, %i32 [template] +// CHECK:STDOUT: %struct_type.base.b.1: type = struct_type {.base: %A2, .b: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.b.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %B2 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %A1 [template] // CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] // CHECK:STDOUT: %ConvertUnrelated: %ConvertUnrelated.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.39: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.40: type = ptr_type %A2 [template] +// CHECK:STDOUT: %ptr.6: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %ptr.7: type = ptr_type %A2 [template] // CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] // CHECK:STDOUT: %ConvertIncomplete: %ConvertIncomplete.type = struct_value () [template] // CHECK:STDOUT: } @@ -93,97 +93,97 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %A2.decl: type = class_decl @A2 [template = constants.%A2] {} {} // CHECK:STDOUT: %B2.decl: type = class_decl @B2 [template = constants.%B2] {} {} // CHECK:STDOUT: %ConvertUnrelated.decl: %ConvertUnrelated.type = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { -// CHECK:STDOUT: %p.patt: %.11 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.11 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.12 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.12 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc31_26: type = ptr_type %B2 [template = constants.%.11] +// CHECK:STDOUT: %ptr.loc31_26: type = ptr_type %B2 [template = constants.%ptr.2] // CHECK:STDOUT: %A1.ref: type = name_ref A1, file.%A1.decl [template = constants.%A1] -// CHECK:STDOUT: %.loc31_34: type = ptr_type %A1 [template = constants.%.12] -// CHECK:STDOUT: %p.param: %.11 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.11 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.12 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.12 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc31_34: type = ptr_type %A1 [template = constants.%ptr.3] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { -// CHECK:STDOUT: %p.patt: %.39 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.39 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.40 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.40 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.6 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.6 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.7 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.7 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.39] +// CHECK:STDOUT: %ptr.loc41_35: type = ptr_type %Incomplete [template = constants.%ptr.6] // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.40] -// CHECK:STDOUT: %p.param: %.39 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.39 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.40 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.40 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc41_43: type = ptr_type %A2 [template = constants.%ptr.7] +// CHECK:STDOUT: %p.param: %ptr.6 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.6 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.7 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.7 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A1 { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %A1.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 // CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A2 { -// CHECK:STDOUT: %.loc16_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.3: type = converted %int.make_type_signed, %.loc16_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8: %.5 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8: %A2.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 // CHECK:STDOUT: .a = %.loc16_8 -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B2 { // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc20: %.7 = base_decl %A2.ref, element0 [template] -// CHECK:STDOUT: %.loc21_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.3: type = converted %int.make_type_signed, %.loc21_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %.8 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc20: %B2.elem.1 = base_decl %A2.ref, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed, %.loc21_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8: %B2.elem.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 // CHECK:STDOUT: .base = %.loc20 // CHECK:STDOUT: .b = %.loc21_8 // CHECK:STDOUT: extend %A2.ref -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertUnrelated(%p.param_patt: %.11) -> %.12 { +// CHECK:STDOUT: fn @ConvertUnrelated(%p.param_patt: %ptr.2) -> %ptr.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p -// CHECK:STDOUT: %.loc31_46: %.12 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %.loc31_46: %ptr.3 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %.39) -> %.40 { +// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %ptr.6) -> %ptr.7 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.39 = name_ref p, %p -// CHECK:STDOUT: %.loc41_55: %.40 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.6 = name_ref p, %p +// CHECK:STDOUT: %.loc41_55: %ptr.7 = converted %p.ref, [template = ] // 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 aab00e6b38453..e984c9946f9b5 100644 --- a/toolchain/check/testdata/class/fail_extend_cycle.carbon +++ b/toolchain/check/testdata/class/fail_extend_cycle.carbon @@ -35,14 +35,14 @@ base class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = class_type @.1 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %.7, %A [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] +// CHECK:STDOUT: %.1: type = class_type @.1 [template] +// CHECK:STDOUT: %.elem: type = unbound_element_type %.1, %A [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,41 +61,41 @@ base class A { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.7] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.4 = base_decl %A.ref, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc16: %B.elem = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc16 // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc27: %.8 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc27: %.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %C.ref: = name_ref C, [template = ] // CHECK:STDOUT: %.loc31: = field_decl c, element1 [template] -// CHECK:STDOUT: %.loc32: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.7 +// CHECK:STDOUT: .Self = constants.%.1 // CHECK:STDOUT: .base = %.loc27 // CHECK:STDOUT: .c = %.loc31 // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc32 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index 6e6e01c6f4019..9008ecd88dc09 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -38,25 +38,25 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %.36: = complete_type_witness %.35 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,41 +78,41 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.3: type = converted %int.make_type_signed.loc17, %.loc17_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16: %.2 = field_decl j, element0 [template] -// CHECK:STDOUT: %.loc23_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.2: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.3: type = converted %int.make_type_signed.loc23, %.loc23_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_14: %.2 = field_decl k, element1 [template] -// CHECK:STDOUT: %.loc29_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%.loc29_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_18.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_18.3: type = converted %int.make_type_signed.loc29, %.loc29_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_24: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_25.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_25.2: = bound_method %.loc29_24, %.loc29_25.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc29_25.3: = specific_function %.loc29_25.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.3(%.loc29_24) [template = constants.%.30] -// CHECK:STDOUT: %.loc29_25.4: %i32 = value_of_initializer %int.convert_checked.loc29 [template = constants.%.30] -// CHECK:STDOUT: %.loc29_25.5: %i32 = converted %.loc29_24, %.loc29_25.4 [template = constants.%.30] -// CHECK:STDOUT: %l: %i32 = bind_name l, %.loc29_25.5 -// CHECK:STDOUT: %.loc34_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_16.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_16.3: type = converted %int.make_type_signed.loc34, %.loc34_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_22: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc34_23.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_23.2: = bound_method %.loc34_22, %.loc34_23.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc34_23.3: = specific_function %.loc34_23.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %.loc34_23.3(%.loc34_22) [template = constants.%.34] -// CHECK:STDOUT: %.loc34_23.4: %i32 = value_of_initializer %int.convert_checked.loc34 [template = constants.%.34] -// CHECK:STDOUT: %.loc34_23.5: %i32 = converted %.loc34_22, %.loc34_23.4 [template = constants.%.34] -// CHECK:STDOUT: %m: %i32 = bind_name m, %.loc34_23.5 -// CHECK:STDOUT: %.loc35: = complete_type_witness %.35 [template = constants.%.36] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_16: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_signed.loc23, %.loc23_16.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_14: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_18.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_18.2: type = converted %int.make_type_signed.loc29, %.loc29_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc29_25.1: %i32 = value_of_initializer %int.convert_checked.loc29 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc29_25.2: %i32 = converted %int_0, %.loc29_25.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %l: %i32 = bind_name l, %.loc29_25.2 +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_16.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_16.2: type = converted %int.make_type_signed.loc34, %.loc34_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc34: = bound_method %int_1, %impl.elem0.loc34 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc34: = specific_function %Convert.bound.loc34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %Convert.specific_fn.loc34(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc34_23.1: %i32 = value_of_initializer %int.convert_checked.loc34 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc34_23.2: %i32 = converted %int_1, %.loc34_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %m: %i32 = bind_name m, %.loc34_23.2 +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -120,6 +120,6 @@ class Class { // CHECK:STDOUT: .k = %.loc23_14 // CHECK:STDOUT: .l = %l // CHECK:STDOUT: .m = %m -// CHECK:STDOUT: complete_type_witness = %.loc35 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index 9d569ff2831d5..8b85b0ac647c9 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -37,21 +37,21 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,23 +68,23 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %self.patt: = binding_pattern self // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %n.patt: = binding_pattern n // CHECK:STDOUT: %n.param_patt: = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc32_14.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc32_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.3: type = converted %int.make_type_signed, %.loc32_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_signed, %.loc32_14.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc32_10.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc32_10.2 (constants.%N)] // CHECK:STDOUT: %Self.ref: = name_ref Self, [template = ] @@ -101,45 +101,45 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.a (constants.%struct_type.a)] +// CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { -// CHECK:STDOUT: %self.patt: @F.%Class (%Class.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%Class (%Class) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Class (%Class) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %n.patt: @F.%T (%T) = binding_pattern n // CHECK:STDOUT: %n.param_patt: @F.%T (%T) = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @F.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Class (%Class.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %n.param: @F.%T (%T) = value_param runtime_param1 // CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .a = %.loc12_8.1 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc14_1.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc14_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Class (%Class.2)](%n.param_patt: @F.%T (%T)); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Class (%Class)](%n.param_patt: @F.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%N.loc32_10.1: %i32) { @@ -166,7 +166,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc11_13.2) { diff --git a/toolchain/check/testdata/class/fail_import_misuses.carbon b/toolchain/check/testdata/class/fail_import_misuses.carbon index 98fa8aff1e781..fcc5a56bc3a92 100644 --- a/toolchain/check/testdata/class/fail_import_misuses.carbon +++ b/toolchain/check/testdata/class/fail_import_misuses.carbon @@ -47,8 +47,8 @@ var a: Incomplete; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty: type = class_type @Empty [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,11 +71,11 @@ var a: Incomplete; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Empty { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Empty -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; @@ -84,9 +84,9 @@ var a: Incomplete; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty: type = class_type @Empty [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = class_type @.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %.1: type = class_type @.1 [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,7 +97,7 @@ var a: Incomplete; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,7 +110,7 @@ var a: Incomplete; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.2 [template = constants.%Incomplete] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var @@ -123,11 +123,11 @@ var a: Incomplete; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index 0eecb6bb815b1..2c5328890f275 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -184,12 +184,12 @@ class C { // CHECK:STDOUT: %CallClassFunction: %CallClassFunction.type = struct_value () [template] // CHECK:STDOUT: %ConvertFromStruct.type: type = fn_type @ConvertFromStruct [template] // CHECK:STDOUT: %ConvertFromStruct: %ConvertFromStruct.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type %Class [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %MemberAccess.type: type = fn_type @MemberAccess [template] @@ -209,7 +209,7 @@ class C { // CHECK:STDOUT: %IncompleteAddrSelf: type = class_type @IncompleteAddrSelf [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %CallIncompleteAddrSelf.type: type = fn_type @CallIncompleteAddrSelf [template] // CHECK:STDOUT: %CallIncompleteAddrSelf: %CallIncompleteAddrSelf.type = struct_value () [template] // CHECK:STDOUT: } @@ -256,61 +256,61 @@ class C { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc44_14: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %.loc44_20.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc44_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc44_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc44_20.3: type = converted %int.make_type_signed, %.loc44_20.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc44_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc44_20.2: type = converted %int.make_type_signed, %.loc44_20.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MemberAccess.decl: %MemberAccess.type = fn_decl @MemberAccess [template = constants.%MemberAccess] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc55_25: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %.loc55_31.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc55_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc55_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc55_31.3: type = converted %int.make_type_signed, %.loc55_31.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc55_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc55_31.2: type = converted %int.make_type_signed, %.loc55_31.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Copy.decl: %Copy.type = fn_decl @Copy [template = constants.%Copy] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc73_12: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc73_17: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc73_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param1 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Let.decl: %Let.type = fn_decl @Let [template = constants.%Let] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc77: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc77: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %TakeIncomplete.decl: %TakeIncomplete.type = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %c.patt: %Class = binding_pattern c @@ -329,24 +329,24 @@ class C { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallTakeIncomplete.decl: %CallTakeIncomplete.type = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc92: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallReturnIncomplete.decl: %CallReturnIncomplete.type = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} {} // CHECK:STDOUT: %IncompleteAddrSelf.decl: type = class_decl @IncompleteAddrSelf [template = constants.%IncompleteAddrSelf] {} {} // CHECK:STDOUT: %CallIncompleteAddrSelf.decl: %CallIncompleteAddrSelf.type = fn_decl @CallIncompleteAddrSelf [template = constants.%CallIncompleteAddrSelf] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc136: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -354,21 +354,21 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @IncompleteAddrSelf { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc133_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc133: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc133_24: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc134: = complete_type_witness %.2 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%IncompleteAddrSelf // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc134 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1() { @@ -385,35 +385,35 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertFromStruct() -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc42_43: %.2 = struct_literal () +// CHECK:STDOUT: %.loc42_43: %empty_struct_type = struct_literal () // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.3) -> %i32 { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc52: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MemberAccess(%p.param_patt: %.3) -> %i32 { +// CHECK:STDOUT: fn @MemberAccess(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc63: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Copy(%p.param_patt: %.3) -> %Class { +// CHECK:STDOUT: fn @Copy(%p.param_patt: %ptr.1) -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc74: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Let(%p.param_patt: %.3) { +// CHECK:STDOUT: fn @Let(%p.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc85: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc85: ref %Class = deref %p.ref // CHECK:STDOUT: %c: = bind_name c, // CHECK:STDOUT: return @@ -423,14 +423,14 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnIncomplete() -> %Class; // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallTakeIncomplete(%p.param_patt: %.3) { +// CHECK:STDOUT: fn @CallTakeIncomplete(%p.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakeIncomplete.ref.loc103: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc103: ref %Class = deref %p.ref // CHECK:STDOUT: %TakeIncomplete.call.loc103: init %empty_tuple.type = call %TakeIncomplete.ref.loc103() // CHECK:STDOUT: %TakeIncomplete.ref.loc115: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %.loc115: %.2 = struct_literal () +// CHECK:STDOUT: %.loc115: %empty_struct_type = struct_literal () // CHECK:STDOUT: %TakeIncomplete.call.loc115: init %empty_tuple.type = call %TakeIncomplete.ref.loc115() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -442,17 +442,17 @@ class C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt: %.3](); +// CHECK:STDOUT: fn @F[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallIncompleteAddrSelf(%p.param_patt: %.3) { +// CHECK:STDOUT: fn @CallIncompleteAddrSelf(%p.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %IncompleteAddrSelf.ref: type = name_ref IncompleteAddrSelf, file.%IncompleteAddrSelf.decl [template = constants.%IncompleteAddrSelf] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @IncompleteAddrSelf.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc148_4.1: ref %Class = deref %p.ref -// CHECK:STDOUT: %.loc148_4.2: = bound_method %.loc148_4.1, %F.ref -// CHECK:STDOUT: %.1: = addr_of [template = ] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc148_4.2() +// CHECK:STDOUT: %.loc148: ref %Class = deref %p.ref +// CHECK:STDOUT: %F.bound: = bound_method %.loc148, %F.ref +// CHECK:STDOUT: %addr: = addr_of [template = ] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -481,11 +481,11 @@ class C { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc11: = field_decl c, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .c = %.loc11 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 7ad6cebf6eee2..f03a06948cded 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -34,28 +34,28 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: Core.IntLiteral, .c: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: Core.IntLiteral, .c: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.38: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral} [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,51 +79,51 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_9: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc21_10.1: %.6 = struct_literal (%.loc21_9) +// CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc21_10.1: %struct_type.a = struct_literal (%int_1.loc21) // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc21_10.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc21_10.3: ref %Class = temporary %.loc21_10.2, // CHECK:STDOUT: %.loc21_12: ref %Class = converted %.loc21_10.1, %.loc21_10.3 -// CHECK:STDOUT: %.loc26_9: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc26_17: Core.IntLiteral = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc26_18.1: %.9 = struct_literal (%.loc26_9, %.loc26_17) +// CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc26: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc26_18.1: %struct_type.a.c = struct_literal (%int_1.loc26, %int_2.loc26) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_9, %.loc26_18.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_9) [template = constants.%.36] -// CHECK:STDOUT: %.loc26_18.5: init %i32 = converted %.loc26_9, %int.convert_checked [template = constants.%.36] -// CHECK:STDOUT: %.loc26_18.6: ref %Class = temporary_storage -// CHECK:STDOUT: %.loc26_18.7: ref %i32 = class_element_access %.loc26_18.6, element0 -// CHECK:STDOUT: %.loc26_18.8: init %i32 = initialize_from %.loc26_18.5 to %.loc26_18.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc26_18.9: ref %Class = temporary %.loc26_18.6, -// CHECK:STDOUT: %.loc26_20: ref %Class = converted %.loc26_18.1, %.loc26_18.9 -// CHECK:STDOUT: %.loc30_9: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc30_17: Core.IntLiteral = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc30_25: Core.IntLiteral = int_value 3 [template = constants.%.37] -// CHECK:STDOUT: %.loc30_26.1: %.38 = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc26, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc26) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc26_18.2: init %i32 = converted %int_1.loc26, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc26_18.3: ref %Class = temporary_storage +// CHECK:STDOUT: %.loc26_18.4: ref %i32 = class_element_access %.loc26_18.3, element0 +// CHECK:STDOUT: %.loc26_18.5: init %i32 = initialize_from %.loc26_18.2 to %.loc26_18.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc26_18.6: ref %Class = temporary %.loc26_18.3, +// CHECK:STDOUT: %.loc26_20: ref %Class = converted %.loc26_18.1, %.loc26_18.6 +// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc30_26.1: %struct_type.a.b.c = struct_literal (%int_1.loc30, %int_2.loc30, %int_3) // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc30_26.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc30_26.3: ref %Class = temporary %.loc30_26.2, diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index a4d53c9bf1943..8d4fcb5cdcf13 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -30,33 +30,33 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %Class [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.36, %.39) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,72 +78,72 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.5); +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc25_10: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var -// CHECK:STDOUT: %.loc25_24: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_32: Core.IntLiteral = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc25_33.1: %.9 = struct_literal (%.loc25_24, %.loc25_32) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc25_33.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref.loc25_38: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_33.3: = bound_method %.loc25_24, %.loc25_33.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc25_33.4: = specific_function %.loc25_33.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %.loc25_33.4(%.loc25_24) [template = constants.%.36] -// CHECK:STDOUT: %.loc25_33.5: init %i32 = converted %.loc25_24, %int.convert_checked.loc25_33.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc25_33.6: ref %Class = temporary_storage -// CHECK:STDOUT: %.loc25_33.7: ref %i32 = class_element_access %.loc25_33.6, element0 -// CHECK:STDOUT: %.loc25_33.8: init %i32 = initialize_from %.loc25_33.5 to %.loc25_33.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc25_33.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_33.10: = bound_method %.loc25_32, %.loc25_33.9 [template = constants.%.37] -// CHECK:STDOUT: %.loc25_33.11: = specific_function %.loc25_33.10, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %.loc25_33.11(%.loc25_32) [template = constants.%.39] -// CHECK:STDOUT: %.loc25_33.12: init %i32 = converted %.loc25_32, %int.convert_checked.loc25_33.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc25_33.13: ref %i32 = class_element_access %.loc25_33.6, element1 -// CHECK:STDOUT: %.loc25_33.14: init %i32 = initialize_from %.loc25_33.12 to %.loc25_33.13 [template = constants.%.39] -// CHECK:STDOUT: %.loc25_33.15: init %Class = class_init (%.loc25_33.8, %.loc25_33.14), %.loc25_33.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc25_33.16: ref %Class = temporary %.loc25_33.6, %.loc25_33.15 -// CHECK:STDOUT: %.loc25_35.1: ref %Class = converted %.loc25_33.1, %.loc25_33.16 +// CHECK:STDOUT: %impl.elem0.loc25_33.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25_33.1: = bound_method %int_1, %impl.elem0.loc25_33.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc25_33.1: = specific_function %Convert.bound.loc25_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %Convert.specific_fn.loc25_33.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_33.2: init %i32 = converted %int_1, %int.convert_checked.loc25_33.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_33.3: ref %Class = temporary_storage +// CHECK:STDOUT: %.loc25_33.4: ref %i32 = class_element_access %.loc25_33.3, element0 +// CHECK:STDOUT: %.loc25_33.5: init %i32 = initialize_from %.loc25_33.2 to %.loc25_33.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25_33.2: = bound_method %int_2, %impl.elem0.loc25_33.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc25_33.2: = specific_function %Convert.bound.loc25_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %Convert.specific_fn.loc25_33.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_33.6: init %i32 = converted %int_2, %int.convert_checked.loc25_33.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_33.7: ref %i32 = class_element_access %.loc25_33.3, element1 +// CHECK:STDOUT: %.loc25_33.8: init %i32 = initialize_from %.loc25_33.6 to %.loc25_33.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_33.9: init %Class = class_init (%.loc25_33.5, %.loc25_33.8), %.loc25_33.3 [template = constants.%Class.val] +// CHECK:STDOUT: %.loc25_33.10: ref %Class = temporary %.loc25_33.3, %.loc25_33.9 +// CHECK:STDOUT: %.loc25_35.1: ref %Class = converted %.loc25_33.1, %.loc25_33.10 // CHECK:STDOUT: %.loc25_35.2: %Class = bind_value %.loc25_35.1 // CHECK:STDOUT: assign %c.var, // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c -// CHECK:STDOUT: %.loc26: %.5 = addr_of %c.ref -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc26) +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %c.ref +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%addr) // 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 1333ed8c7bbe5..2fe95cf72eb75 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -42,16 +42,16 @@ 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: %ptr.1: type = ptr_type %A [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: %A} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.a.1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -74,16 +74,16 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %s.patt: %.6 = binding_pattern s -// CHECK:STDOUT: %s.param_patt: %.6 = value_param_pattern %s.patt, runtime_param0 +// CHECK:STDOUT: %s.patt: %struct_type.a.1 = binding_pattern s +// CHECK:STDOUT: %s.param_patt: %struct_type.a.1 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %B = binding_pattern b // CHECK:STDOUT: %b.param_patt: %B = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc19: type = struct_type {.a: %A} [template = constants.%.6] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %A} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %s.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %s: %.6 = bind_name s, %s.param +// CHECK:STDOUT: %s.param: %struct_type.a.1 = value_param runtime_param0 +// CHECK:STDOUT: %s: %struct_type.a.1 = bind_name s, %s.param // CHECK:STDOUT: %b.param: %B = value_param runtime_param1 // CHECK:STDOUT: %b: %B = bind_name b, %b.param // CHECK:STDOUT: } @@ -91,50 +91,50 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // 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.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.5 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc16: %B.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .a = %.loc16 -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %.1](); +// CHECK:STDOUT: fn @F.1[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%s.param_patt: %.6, %b.param_patt: %B) { +// CHECK:STDOUT: fn @F.2(%s.param_patt: %struct_type.a.1, %b.param_patt: %B) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %s.ref: %.6 = name_ref s, %s -// CHECK:STDOUT: %.loc28_4: %A = struct_access %s.ref, element0 +// CHECK:STDOUT: %s.ref: %struct_type.a.1 = name_ref s, %s +// CHECK:STDOUT: %.loc28: %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 %empty_tuple.type = call %.loc28_6() +// CHECK:STDOUT: %F.bound.loc28: = bound_method %.loc28, %F.ref.loc28 +// CHECK:STDOUT: %F.call.loc28: init %empty_tuple.type = call %F.bound.loc28() // CHECK:STDOUT: %b.ref: %B = name_ref b, %b -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, @B.%.loc16 [template = @B.%.loc16] +// CHECK:STDOUT: %a.ref: %B.elem = 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 %empty_tuple.type = call %.loc38_6() +// CHECK:STDOUT: %F.bound.loc38: = bound_method %.loc38_4.2, %F.ref.loc38 +// CHECK:STDOUT: %F.call.loc38: init %empty_tuple.type = call %F.bound.loc38() // 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 c24867ff0e5ab..fef660637c490 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -29,16 +29,16 @@ fn T.F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ fn T.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -65,19 +65,19 @@ fn T.F() {} // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32; diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 48685573825e4..ea19c923e1e0e 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -55,8 +55,8 @@ fn F(c: Class) { // CHECK:STDOUT: %NoSelf: %NoSelf.type = struct_value () [template] // CHECK:STDOUT: %WithSelf.type: type = fn_type @WithSelf [template] // CHECK:STDOUT: %WithSelf: %WithSelf.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -100,13 +100,13 @@ fn F(c: Class) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .NoSelf = %NoSelf.decl // CHECK:STDOUT: .WithSelf = %WithSelf.decl -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NoSelf(); @@ -120,8 +120,8 @@ fn F(c: Class) { // CHECK:STDOUT: %NoSelf.call.loc19: init %empty_tuple.type = call %NoSelf.ref.loc19() // CHECK:STDOUT: %c.ref.loc20: %Class = name_ref c, %c // CHECK:STDOUT: %WithSelf.ref.loc20: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %.loc20: = bound_method %c.ref.loc20, %WithSelf.ref.loc20 -// CHECK:STDOUT: %WithSelf.call.loc20: init %empty_tuple.type = call %.loc20(%c.ref.loc20) +// CHECK:STDOUT: %WithSelf.bound: = bound_method %c.ref.loc20, %WithSelf.ref.loc20 +// CHECK:STDOUT: %WithSelf.call.loc20: init %empty_tuple.type = call %WithSelf.bound(%c.ref.loc20) // CHECK:STDOUT: %Class.ref.loc22: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %NoSelf.ref.loc22: %NoSelf.type = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] // CHECK:STDOUT: %NoSelf.call.loc22: init %empty_tuple.type = call %NoSelf.ref.loc22() diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index c84a473ba1dad..15513e95bfdca 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -63,8 +63,8 @@ base class BaseClass { // CHECK:STDOUT: %Abstract.1: %Abstract.type.1 = struct_value () [template] // CHECK:STDOUT: %Virtual.type: type = fn_type @Virtual [template] // CHECK:STDOUT: %Virtual: %Virtual.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AbstractClass: type = class_type @AbstractClass [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] // CHECK:STDOUT: %Default: %Default.type = struct_value () [template] @@ -112,13 +112,13 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %FinalClass = value_param runtime_param0 // CHECK:STDOUT: %self: %FinalClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc30: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FinalClass // CHECK:STDOUT: .Abstract = %Abstract.decl // CHECK:STDOUT: .Virtual = %Virtual.decl -// CHECK:STDOUT: complete_type_witness = %.loc30 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AbstractClass { @@ -138,13 +138,13 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %AbstractClass = value_param runtime_param0 // CHECK:STDOUT: %self: %AbstractClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractClass // CHECK:STDOUT: .Default = %Default.decl // CHECK:STDOUT: .Final = %Final.decl -// CHECK:STDOUT: complete_type_witness = %.loc45 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @BaseClass { @@ -156,12 +156,12 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %BaseClass = value_param runtime_param0 // CHECK:STDOUT: %self: %BaseClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc56: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%BaseClass // CHECK:STDOUT: .Abstract = %Abstract.decl -// CHECK:STDOUT: complete_type_witness = %.loc56 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Abstract.1[%self.param_patt: %FinalClass](); diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index 3453d8a3ae653..4336edc648cb5 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -25,8 +25,8 @@ class Class { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,12 +48,12 @@ class Class { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %F.decl.loc19: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl.loc12 -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/fail_modifiers.carbon b/toolchain/check/testdata/class/fail_modifiers.carbon index 57839be58d035..dace1ba997719 100644 --- a/toolchain/check/testdata/class/fail_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_modifiers.carbon @@ -104,8 +104,8 @@ fn AbstractWithDefinition.G() { // CHECK:STDOUT: %TwoAccess: type = class_type @TwoAccess [template] // CHECK:STDOUT: %BaseDecl: type = class_type @BaseDecl [template] // CHECK:STDOUT: %TwoAbstract: type = class_type @TwoAbstract [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Virtual: type = class_type @Virtual [template] // CHECK:STDOUT: %WrongOrder: type = class_type @WrongOrder [template] // CHECK:STDOUT: %AbstractAndBase: type = class_type @AbstractAndBase [template] @@ -114,9 +114,9 @@ fn AbstractWithDefinition.G() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type [template] -// CHECK:STDOUT: %.4: type = struct_type {.: %.3} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %ptr: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.vptr [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -161,47 +161,47 @@ fn AbstractWithDefinition.G() { // CHECK:STDOUT: class @BaseDecl; // CHECK:STDOUT: // CHECK:STDOUT: class @TwoAbstract { -// CHECK:STDOUT: %.loc48: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%TwoAbstract -// CHECK:STDOUT: complete_type_witness = %.loc48 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Virtual { -// CHECK:STDOUT: %.loc65: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Virtual -// CHECK:STDOUT: complete_type_witness = %.loc65 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @WrongOrder { -// CHECK:STDOUT: %.loc74: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%WrongOrder -// CHECK:STDOUT: complete_type_witness = %.loc74 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AbstractAndBase { -// CHECK:STDOUT: %.loc83: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractAndBase -// CHECK:STDOUT: complete_type_witness = %.loc83 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AbstractWithDefinition { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc92: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractWithDefinition // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc92 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: abstract fn @F() { 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 8f774cdde73a7..9ae3314bf4e9e 100644 --- a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon +++ b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon @@ -19,8 +19,8 @@ fn C.F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -43,12 +43,12 @@ fn C.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = file.%F.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/fail_redeclaration_scope.carbon b/toolchain/check/testdata/class/fail_redeclaration_scope.carbon index 35db37c1b63da..7fee47768a63b 100644 --- a/toolchain/check/testdata/class/fail_redeclaration_scope.carbon +++ b/toolchain/check/testdata/class/fail_redeclaration_scope.carbon @@ -32,11 +32,11 @@ class Y { // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %A.2: type = class_type @A.2 [template] // CHECK:STDOUT: %B.1: type = class_type @B.1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B.2: type = class_type @B.2 [template] // CHECK:STDOUT: %Y: type = class_type @Y [template] -// CHECK:STDOUT: %.3: type = class_type @.1 [template] +// CHECK:STDOUT: %.1: type = class_type @.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,59 +62,59 @@ class Y { // CHECK:STDOUT: // CHECK:STDOUT: class @A.1 { // CHECK:STDOUT: %B.decl: type = class_decl @B.2 [template = constants.%B.2] {} {} -// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.1 // CHECK:STDOUT: .B = %B.decl -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { // CHECK:STDOUT: %A.decl: type = class_decl @A.2 [template = constants.%A.2] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B.1 [template = constants.%B.1] {} {} -// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A.2 { // CHECK:STDOUT: %B.decl: type = class_decl @B.1 [template = constants.%B.1] {} {} -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.2 // CHECK:STDOUT: .B = %B.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B.1 { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B.1 -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B.2; // CHECK:STDOUT: // CHECK:STDOUT: class @Y { -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} {} -// CHECK:STDOUT: %.loc26: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Y -// CHECK:STDOUT: complete_type_witness = %.loc26 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %.loc25: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc25 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index 3660b85f05e53..35f2b6d4ebf08 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -52,9 +52,9 @@ fn Class.I() {} // CHECK:STDOUT: %H.1: %H.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.1: type = fn_type @I.1 [template] // CHECK:STDOUT: %I.1: %I.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = class_type @.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %.1: type = class_type @.1 [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] @@ -79,7 +79,7 @@ fn Class.I() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.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] {} {} @@ -90,7 +90,7 @@ fn Class.I() {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %H.decl: %H.type.1 = fn_decl @H.1 [template = constants.%H.1] {} {} // CHECK:STDOUT: %I.decl: %I.type.1 = fn_decl @I.1 [template = constants.%I.1] {} {} -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -98,21 +98,21 @@ fn Class.I() {} // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .G = file.%G.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} // CHECK:STDOUT: %H.decl: %H.type.2 = fn_decl @H.2 [template = constants.%H.2] {} {} // CHECK:STDOUT: %I.decl: %I.type.2 = fn_decl @I.2 [template = constants.%I.2] {} {} -// CHECK:STDOUT: %.loc28: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.1 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: complete_type_witness = %.loc28 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index 2062f3ca7e83b..8f7dcfd9accbe 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -25,22 +25,22 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -66,10 +66,10 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.3: type = converted %int.make_type_signed, %.loc17_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_signed, %.loc17_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -80,31 +80,31 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.31] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.31] -// CHECK:STDOUT: return %.loc13_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.2: %i32 = converted %int_1, %.loc13_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc13_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index a49814f5d8cff..eedff0adfbadb 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -64,8 +64,8 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %WrongSelf: type = class_type @WrongSelf [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -134,13 +134,13 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %return.param.loc18: ref %Class = out_param runtime_param0 // CHECK:STDOUT: %.loc18: ref %Class = return_slot %return.param.loc18 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @WrongSelf { @@ -152,12 +152,12 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc43: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%WrongSelf // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc43 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(%self.param_patt: %Class) { @@ -181,9 +181,9 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: !entry: // 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: %.loc55_5: = bound_method %ws.ref, %F.ref -// CHECK:STDOUT: %.loc55_3: %Class = converted %ws.ref, [template = ] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc55_5() +// CHECK:STDOUT: %F.bound: = bound_method %ws.ref, %F.ref +// CHECK:STDOUT: %.loc55: %Class = converted %ws.ref, [template = ] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self_param.carbon b/toolchain/check/testdata/class/fail_self_param.carbon index 8e54eadd54154..8b02ecafef9be 100644 --- a/toolchain/check/testdata/class/fail_self_param.carbon +++ b/toolchain/check/testdata/class/fail_self_param.carbon @@ -20,11 +20,11 @@ var v: C(0); // CHECK:STDOUT: %x: = bind_symbolic_name x, 0 [symbolic] // CHECK:STDOUT: %x.patt: = symbolic_binding_pattern x, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%x) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C, @C(%x) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,7 +41,7 @@ var v: C(0); // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %x.patt.loc14_22.1: = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc14_22.2 (constants.%x.patt)] // CHECK:STDOUT: %x.param_patt: = value_param_pattern %x.patt.loc14_22.1, runtime_param [symbolic = %x.patt.loc14_22.2 (constants.%x.patt)] // CHECK:STDOUT: } { @@ -49,8 +49,8 @@ var v: C(0); // CHECK:STDOUT: %x.param: = value_param runtime_param // CHECK:STDOUT: %x.loc14_22.1: = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc14_22.2 (constants.%x)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: } @@ -62,11 +62,11 @@ var v: C(0); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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 89e5f1b8e4fce..37d8e67936930 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -31,9 +31,9 @@ fn F() -> bool { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class, bool [template] -// CHECK:STDOUT: %.2: type = struct_type {.b: bool} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, bool [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: bool} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} @@ -42,13 +42,13 @@ 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: %.1 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .b = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> bool { diff --git a/toolchain/check/testdata/class/fail_todo_local_class.carbon b/toolchain/check/testdata/class/fail_todo_local_class.carbon index 9f5d720cd107c..26ef9a5d28cd1 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -32,20 +32,20 @@ class A { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc27: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc27 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index 455bce1165580..2422a432b7718 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -30,15 +30,15 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.field: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %struct_type.field: type = struct_type {.field: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -63,51 +63,51 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.3: type = converted %int.make_type_signed, %.loc22_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed, %.loc22_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_14.3: type = converted %int.make_type_signed, %.loc12_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12: %.2 = field_decl field, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_14.2: type = converted %int.make_type_signed, %.loc12_14.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_12: %Class.elem = field_decl field, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = converted %int.make_type_signed, %.loc13_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .field = %.loc12_12 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %field.ref: %.2 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %Class.elem = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %field.ref: %.2 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %Class.elem = 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 71d7a87ebc3e9..b1f8594312093 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -24,13 +24,13 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -58,10 +58,10 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed, %.loc15_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed, %.loc15_19.1 [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -70,17 +70,17 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .n = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%c.param_patt: %Class) -> %i32 { diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index fea6af6a1c0ff..18fad2c4a69d1 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -25,27 +25,27 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,23 +69,23 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl j, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .j = %.loc12_8 // CHECK:STDOUT: .k = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -94,44 +94,44 @@ fn Run() { // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref.loc18: ref %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %Class.elem = 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: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc18_7.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_7.2: = bound_method %.loc18_9, %.loc18_7.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc18_7.3: = specific_function %.loc18_7.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_7.3(%.loc18_9) [template = constants.%.33] -// CHECK:STDOUT: %.loc18_7.4: init %i32 = converted %.loc18_9, %int.convert_checked.loc18 [template = constants.%.33] -// CHECK:STDOUT: assign %.loc18_4, %.loc18_7.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_7: init %i32 = converted %int_1, %int.convert_checked.loc18 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %.loc18_4, %.loc18_7 // CHECK:STDOUT: %c.ref.loc19: ref %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc19: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc19: %Class.elem = 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: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc19_7.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_7.2: = bound_method %.loc19_9, %.loc19_7.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_7.3: = specific_function %.loc19_7.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_7.3(%.loc19_9) [template = constants.%.37] -// CHECK:STDOUT: %.loc19_7.4: init %i32 = converted %.loc19_9, %int.convert_checked.loc19 [template = constants.%.37] -// CHECK:STDOUT: assign %.loc19_4, %.loc19_7.4 -// CHECK:STDOUT: %.loc20_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_11.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_11.3: type = converted %int.make_type_signed.loc20, %.loc20_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_7: init %i32 = converted %int_2, %int.convert_checked.loc19 [template = constants.%int_2.2] +// CHECK:STDOUT: assign %.loc19_4, %.loc19_7 +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_11.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_11.2: type = converted %int.make_type_signed.loc20, %.loc20_11.1 [template = constants.%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: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc20: %Class.elem = 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 -// CHECK:STDOUT: %.loc21_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.3: type = converted %int.make_type_signed.loc21, %.loc21_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%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: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc21: %Class.elem = 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 0ce1970f7ee08..7f03770b2aa01 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -26,27 +26,27 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,23 +70,23 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl j, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .j = %.loc12_8 // CHECK:STDOUT: .k = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Test() { @@ -95,48 +95,48 @@ fn Test() { // CHECK:STDOUT: %cv.var: ref %Class = var cv // CHECK:STDOUT: %cv: ref %Class = bind_name cv, %cv.var // CHECK:STDOUT: %cv.ref.loc18: ref %Class = name_ref cv, %cv -// CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %Class.elem = 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: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.33] -// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18 [template = constants.%.33] -// CHECK:STDOUT: assign %.loc18_5, %.loc18_8.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_8: init %i32 = converted %int_1, %int.convert_checked.loc18 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %.loc18_5, %.loc18_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: %k.ref.loc19: %Class.elem = 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: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc19_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_8.2: = bound_method %.loc19_10, %.loc19_8.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_8.3: = specific_function %.loc19_8.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_8.3(%.loc19_10) [template = constants.%.37] -// CHECK:STDOUT: %.loc19_8.4: init %i32 = converted %.loc19_10, %int.convert_checked.loc19 [template = constants.%.37] -// CHECK:STDOUT: assign %.loc19_5, %.loc19_8.4 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_8: init %i32 = converted %int_2, %int.convert_checked.loc19 [template = constants.%int_2.2] +// CHECK:STDOUT: assign %.loc19_5, %.loc19_8 // 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: %.loc21_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.3: type = converted %int.make_type_signed.loc21, %.loc21_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%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: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc21: %Class.elem = 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 -// CHECK:STDOUT: %.loc22_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.3: type = converted %int.make_type_signed.loc22, %.loc22_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed.loc22, %.loc22_11.1 [template = constants.%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: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc22: %Class.elem = 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 43c6efb63df41..3a48a2227a03f 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -16,7 +16,7 @@ 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: %ptr: type = ptr_type %Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -37,27 +37,27 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_14: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %ptr.loc13_14: type = ptr_type %Class [template = constants.%ptr] // CHECK:STDOUT: %Class.ref.loc13_20: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_25: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc13_25: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @F(%p.param_patt: %ptr) -> %ptr { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr = 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 52430236b9672..3ea33b71f117d 100644 --- a/toolchain/check/testdata/class/generic.carbon +++ b/toolchain/check/testdata/class/generic.carbon @@ -14,7 +14,7 @@ class C[](); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -30,7 +30,7 @@ class C[](); // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {} {} +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index 98eb0cc467af7..96e39c43350a7 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -126,20 +126,20 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %C.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C.3, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } @@ -160,7 +160,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: .Access = %Access.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -175,10 +175,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] -// CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.3: type = converted %int.make_type_signed.loc12, %.loc12_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_26.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_26.2: type = converted %int.make_type_signed.loc12, %.loc12_26.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -191,50 +191,50 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @C.%C (%C.2), @C.%T.loc4_9.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @C.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc4_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @C.%.loc5_8.2 (%.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: .x = %.loc5_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapter { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_11: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_11) [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc9_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc9_14.2: type = converted %int.make_type_signed, %.loc9_14.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Access(%a.param_patt: %Adapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_18) [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] -// CHECK:STDOUT: %.loc13_13.1: %C.3 = as_compatible %a.ref -// CHECK:STDOUT: %.loc13_13.2: %C.3 = converted %a.ref, %.loc13_13.1 -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, @C.%.loc5_8.1 [template = @C.%.loc5_8.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc13_13.1: %C.2 = as_compatible %a.ref +// CHECK:STDOUT: %.loc13_13.2: %C.2 = converted %a.ref, %.loc13_13.1 +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, @C.%.loc5 [template = @C.%.loc5] // CHECK:STDOUT: %.loc13_23.1: ref %i32 = class_element_access %.loc13_13.2, element0 // CHECK:STDOUT: %.loc13_23.2: %i32 = bind_value %.loc13_23.1 // CHECK:STDOUT: return %.loc13_23.2 @@ -255,30 +255,30 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.5 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.7 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %C.2, %T [symbolic] -// CHECK:STDOUT: %.7: type = unbound_element_type %C.3, %i32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [template] @@ -286,7 +286,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//adapt_specific_type, inst+9, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//adapt_specific_type, inst+9, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//adapt_specific_type, inst+26, loaded [template = constants.%Adapter] // CHECK:STDOUT: %import_ref.3 = import_ref Main//adapt_specific_type, inst+65, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { @@ -294,10 +294,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//adapt_specific_type, inst+20, loaded [symbolic = @C.%.3 (constants.%.3)] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//adapt_specific_type, inst+20, loaded [symbolic = @C.%complete_type (constants.%complete_type.1)] // CHECK:STDOUT: %import_ref.5 = import_ref Main//adapt_specific_type, inst+15, unloaded -// CHECK:STDOUT: %import_ref.6: @C.%.1 (%.6) = import_ref Main//adapt_specific_type, inst+18, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8: = import_ref Main//adapt_specific_type, inst+51, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: @C.%C.elem (%C.elem.1) = import_ref Main//adapt_specific_type, inst+18, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//adapt_specific_type, inst+51, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.9 = import_ref Main//adapt_specific_type, inst+27, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -318,10 +318,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] -// CHECK:STDOUT: %.loc6_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.3: type = converted %int.make_type_signed.loc6, %.loc6_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6, %.loc6_34.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -340,10 +340,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @C.%C (%C.2), @C.%T (%T) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %.2: type = struct_type {.x: @C.%T (%T)} [symbolic = %.2 (constants.%.2)] -// CHECK:STDOUT: %.3: = complete_type_witness @C.%.2 (%.2) [symbolic = %.3 (constants.%.3)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: @@ -356,15 +356,15 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: fn @ImportedAccess(%a.param_patt: %Adapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] -// CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_18) [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] // CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] // CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7, %.loc7_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] -// CHECK:STDOUT: %.loc7_13.1: %C.3 = as_compatible %a.ref -// CHECK:STDOUT: %.loc7_13.2: %C.3 = converted %a.ref, %.loc7_13.1 -// CHECK:STDOUT: %x.ref: %.7 = name_ref x, imports.%import_ref.6 [template = imports.%.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc7_13.1: %C.2 = as_compatible %a.ref +// CHECK:STDOUT: %.loc7_13.2: %C.2 = converted %a.ref, %.loc7_13.1 +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.6 [template = imports.%.1] // CHECK:STDOUT: %.loc7_23.1: ref %i32 = class_element_access %.loc7_13.2, element0 // CHECK:STDOUT: %.loc7_23.2: %i32 = bind_value %.loc7_23.1 // CHECK:STDOUT: return %.loc7_23.2 @@ -380,10 +380,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.4 -// CHECK:STDOUT: %.3 => constants.%.5 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(%T) { @@ -397,20 +397,20 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %C.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C.3, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } @@ -432,7 +432,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: .Access = %Access.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -447,10 +447,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] -// CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.3: type = converted %int.make_type_signed, %.loc12_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_26.2: type = converted %int.make_type_signed, %.loc12_26.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -463,44 +463,44 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @C.%C (%C.2), @C.%T.loc4_9.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @C.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc4_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @C.%.loc5_8.2 (%.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: .x = %.loc5_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapter { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_18) [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc9_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed, %.loc9_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter // CHECK:STDOUT: extend %C -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Access(%a.param_patt: %Adapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, @C.%.loc5_8.1 [template = @C.%.loc5_8.1] -// CHECK:STDOUT: %.loc21_11.1: %C.3 = converted %a.ref, [template = ] +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, @C.%.loc5 [template = @C.%.loc5] +// CHECK:STDOUT: %.loc21_11.1: %C.2 = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc21_11.2: %i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -520,10 +520,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.5 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.7 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- extend_adapt_specific_type_library.carbon @@ -532,20 +532,20 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %C.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C.3, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -563,7 +563,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: .Adapter = %Adapter.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc7_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_9.1, runtime_param [symbolic = %T.patt.loc7_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -578,37 +578,37 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc7_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc7_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc8_8.2: type = unbound_element_type @C.%C (%C.2), @C.%T.loc7_9.2 (%T) [symbolic = %.loc8_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc9_1.2: type = struct_type {.x: @C.%T.loc7_9.2 (%T)} [symbolic = %.loc9_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc9_1.3: = complete_type_witness @C.%.loc9_1.2 (%.2) [symbolic = %.loc9_1.3 (constants.%.3)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc7_9.2) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc7_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc7_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc9_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc9_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_9.1 [symbolic = %T.loc7_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_8.1: @C.%.loc8_8.2 (%.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc9_1.1: = complete_type_witness %.2 [symbolic = %.loc9_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc8: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc9_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc9_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: .x = %.loc8_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc9_1.1 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: .x = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc9_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapter { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_18) [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter // CHECK:STDOUT: extend %C -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { @@ -626,28 +626,28 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc7_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.loc8_8.2 => constants.%.5 -// CHECK:STDOUT: %.loc9_1.2 => constants.%.6 -// CHECK:STDOUT: %.loc9_1.3 => constants.%.7 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc9_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_import_extend_adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %C.2, %T [symbolic] -// CHECK:STDOUT: %.7: type = unbound_element_type %C.3, %i32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [template] @@ -663,12 +663,12 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//extend_adapt_specific_type_library, inst+20, loaded [symbolic = @C.%.3 (constants.%.3)] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//extend_adapt_specific_type_library, inst+20, loaded [symbolic = @C.%complete_type (constants.%complete_type.1)] // CHECK:STDOUT: %import_ref.4 = import_ref Main//extend_adapt_specific_type_library, inst+15, unloaded -// CHECK:STDOUT: %import_ref.5: @C.%.1 (%.6) = import_ref Main//extend_adapt_specific_type_library, inst+18, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.7: = import_ref Main//extend_adapt_specific_type_library, inst+51, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.5: @C.%C.elem (%C.elem.1) = import_ref Main//extend_adapt_specific_type_library, inst+18, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//extend_adapt_specific_type_library, inst+51, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//extend_adapt_specific_type_library, inst+27, unloaded -// CHECK:STDOUT: %import_ref.9: type = import_ref Main//extend_adapt_specific_type_library, inst+44, loaded [template = constants.%C.3] +// CHECK:STDOUT: %import_ref.9: type = import_ref Main//extend_adapt_specific_type_library, inst+44, loaded [template = constants.%C.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -687,10 +687,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] -// CHECK:STDOUT: %.loc6_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.3: type = converted %int.make_type_signed, %.loc6_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed, %.loc6_34.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -710,10 +710,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @C.%C (%C.2), @C.%T (%T) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %.2: type = struct_type {.x: @C.%T (%T)} [symbolic = %.2 (constants.%.2)] -// CHECK:STDOUT: %.3: = complete_type_witness @C.%.2 (%.2) [symbolic = %.3 (constants.%.3)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: @@ -726,8 +726,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: fn @ImportedAccess(%a.param_patt: %Adapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %x.ref: %.7 = name_ref x, imports.%import_ref.5 [template = imports.%.1] -// CHECK:STDOUT: %.loc14_11.1: %C.3 = converted %a.ref, [template = ] +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.5 [template = imports.%.1] +// CHECK:STDOUT: %.loc14_11.1: %C.2 = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc14_11.2: %i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -742,10 +742,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.4 -// CHECK:STDOUT: %.3 => constants.%.5 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(%T) { @@ -759,17 +759,17 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Adapter.type: type = generic_class_type @Adapter [template] -// CHECK:STDOUT: %Adapter.1: %Adapter.type = struct_value () [template] -// CHECK:STDOUT: %Adapter.2: type = class_type @Adapter, @Adapter(%T) [symbolic] -// CHECK:STDOUT: %.1: = complete_type_witness %T [symbolic] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Adapter.generic: %Adapter.type = struct_value () [template] +// CHECK:STDOUT: %Adapter.1: type = class_type @Adapter, @Adapter(%T) [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %T [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %Adapter.3: type = class_type @Adapter, @Adapter(%i32) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Adapter.2: type = class_type @Adapter, @Adapter(%i32) [template] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert [template] // CHECK:STDOUT: %Convert: %Convert.type = struct_value () [template] -// CHECK:STDOUT: %.3: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -787,7 +787,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Adapter.decl: %Adapter.type = class_decl @Adapter [template = constants.%Adapter.1] { +// CHECK:STDOUT: %Adapter.decl: %Adapter.type = class_decl @Adapter [template = constants.%Adapter.generic] { // CHECK:STDOUT: %T.patt.loc4_15.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_15.1, runtime_param [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -795,23 +795,23 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Convert.decl: %Convert.type = fn_decl @Convert [template = constants.%Convert] { -// CHECK:STDOUT: %a.patt: %Adapter.3 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %Adapter.3 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %Adapter.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %Adapter.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.1] -// CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc8_23: init type = call constants.%Int(%.loc8_23) [template = constants.%i32] +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.generic] +// CHECK:STDOUT: %int_32.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_23: init type = call constants.%Int(%int_32.loc8_23) [template = constants.%i32] // CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int.make_type_signed.loc8_23 [template = constants.%i32] // CHECK:STDOUT: %.loc8_26.2: type = converted %int.make_type_signed.loc8_23, %.loc8_26.1 [template = constants.%i32] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.3] -// CHECK:STDOUT: %.loc8_32.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%.loc8_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.2: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.3: type = converted %int.make_type_signed.loc8_32, %.loc8_32.2 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %Adapter.3 = value_param runtime_param0 -// CHECK:STDOUT: %a: %Adapter.3 = bind_name a, %a.param +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] +// CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%int_32.loc8_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_signed.loc8_32, %.loc8_32.1 [template = constants.%i32] +// CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -822,26 +822,26 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_15.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2: = complete_type_witness @Adapter.%T.loc4_15.2 (%T) [symbolic = %.loc6_1.2 (constants.%.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Adapter.%T.loc4_15.2 (%T) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: adapt_decl %T.ref [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %T [symbolic = %.loc6_1.2 (constants.%.1)] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %T [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Adapter.2 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%Adapter.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert(%a.param_patt: %Adapter.3) -> %i32 { +// CHECK:STDOUT: fn @Convert(%a.param_patt: %Adapter.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %Adapter.3 = name_ref a, %a -// CHECK:STDOUT: %.loc9_15.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.3: type = converted %int.make_type_signed.loc9, %.loc9_15.2 [template = constants.%i32] +// CHECK:STDOUT: %a.ref: %Adapter.2 = name_ref a, %a +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] // CHECK:STDOUT: %.loc9_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc9_12.2: %i32 = converted %a.ref, %.loc9_12.1 // CHECK:STDOUT: return %.loc9_12.2 @@ -857,44 +857,44 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2 => constants.%.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_adapt_generic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapter.type: type = generic_class_type @Adapter [template] -// CHECK:STDOUT: %Adapter.1: %Adapter.type = struct_value () [template] +// CHECK:STDOUT: %Adapter.generic: %Adapter.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.1: = complete_type_witness %T [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %T [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %Adapter.3: type = class_type @Adapter, @Adapter(%i32) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Adapter.2: type = class_type @Adapter, @Adapter(%i32) [template] // CHECK:STDOUT: %ImportedConvert.type: type = fn_type @ImportedConvert [template] // CHECK:STDOUT: %ImportedConvert: %ImportedConvert.type = struct_value () [template] -// CHECK:STDOUT: %.3: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %Adapter.4: type = class_type @Adapter, @Adapter(%C) [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %Adapter.3: type = class_type @Adapter, @Adapter(%C) [template] // CHECK:STDOUT: %ImportedConvertLocal.type: type = fn_type @ImportedConvertLocal [template] // CHECK:STDOUT: %ImportedConvertLocal: %ImportedConvertLocal.type = struct_value () [template] -// CHECK:STDOUT: %.7: = complete_type_witness %C [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Adapter.type = import_ref Main//adapt_generic_type, inst+9, loaded [template = constants.%Adapter.1] +// CHECK:STDOUT: %import_ref.1: %Adapter.type = import_ref Main//adapt_generic_type, inst+9, loaded [template = constants.%Adapter.generic] // CHECK:STDOUT: %import_ref.2 = import_ref Main//adapt_generic_type, inst+51, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//adapt_generic_type, inst+18, loaded [symbolic = @Adapter.%.1 (constants.%.1)] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//adapt_generic_type, inst+18, loaded [symbolic = @Adapter.%complete_type (constants.%complete_type.1)] // CHECK:STDOUT: %import_ref.5 = import_ref Main//adapt_generic_type, inst+15, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -910,42 +910,42 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %ImportedConvert.decl: %ImportedConvert.type = fn_decl @ImportedConvert [template = constants.%ImportedConvert] { -// CHECK:STDOUT: %a.patt: %Adapter.3 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %Adapter.3 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %Adapter.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %Adapter.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.1] -// CHECK:STDOUT: %.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc6_31: init type = call constants.%Int(%.loc6_31) [template = constants.%i32] +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] +// CHECK:STDOUT: %int_32.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_31: init type = call constants.%Int(%int_32.loc6_31) [template = constants.%i32] // CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6_31 [template = constants.%i32] // CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6_31, %.loc6_34.1 [template = constants.%i32] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.3] -// CHECK:STDOUT: %.loc6_40.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%.loc6_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_40.2: type = value_of_initializer %int.make_type_signed.loc6_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_40.3: type = converted %int.make_type_signed.loc6_40, %.loc6_40.2 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %Adapter.3 = value_param runtime_param0 -// CHECK:STDOUT: %a: %Adapter.3 = bind_name a, %a.param +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] +// CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%int_32.loc6_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_40.1: type = value_of_initializer %int.make_type_signed.loc6_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_40.2: type = converted %int.make_type_signed.loc6_40, %.loc6_40.1 [template = constants.%i32] +// CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %ImportedConvertLocal.decl: %ImportedConvertLocal.type = fn_decl @ImportedConvertLocal [template = constants.%ImportedConvertLocal] { -// CHECK:STDOUT: %a.patt: %Adapter.4 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %Adapter.4 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %Adapter.3 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %Adapter.3 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.1] +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%C) [template = constants.%Adapter.4] -// CHECK:STDOUT: %.loc14_43.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_43.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.3: type = converted %int.make_type_signed, %.loc14_43.2 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %Adapter.4 = value_param runtime_param0 -// CHECK:STDOUT: %a: %Adapter.4 = bind_name a, %a.param +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%C) [template = constants.%Adapter.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_43.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_43.2: type = converted %int.make_type_signed, %.loc14_43.1 [template = constants.%i32] +// CHECK:STDOUT: %a.param: %Adapter.3 = value_param runtime_param0 +// CHECK:STDOUT: %a: %Adapter.3 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -956,7 +956,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: = complete_type_witness @Adapter.%T (%T) [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @Adapter.%T (%T) [symbolic = %complete_type (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: @@ -966,38 +966,38 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11_10.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.3: type = converted %int.make_type_signed, %.loc11_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8: %.4 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_10.2: type = converted %int.make_type_signed, %.loc11_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8: %C.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .n = %.loc11_8 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ImportedConvert(%a.param_patt: %Adapter.3) -> %i32 { +// CHECK:STDOUT: fn @ImportedConvert(%a.param_patt: %Adapter.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %Adapter.3 = name_ref a, %a -// CHECK:STDOUT: %.loc7_15.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_15.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_15.3: type = converted %int.make_type_signed.loc7, %.loc7_15.2 [template = constants.%i32] +// CHECK:STDOUT: %a.ref: %Adapter.2 = name_ref a, %a +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_15.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_15.2: type = converted %int.make_type_signed.loc7, %.loc7_15.1 [template = constants.%i32] // CHECK:STDOUT: %.loc7_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc7_12.2: %i32 = converted %a.ref, %.loc7_12.1 // CHECK:STDOUT: return %.loc7_12.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ImportedConvertLocal(%a.param_patt: %Adapter.4) -> %i32 { +// CHECK:STDOUT: fn @ImportedConvertLocal(%a.param_patt: %Adapter.3) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %Adapter.4 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %Adapter.3 = name_ref a, %a // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc15_13.1: %C = as_compatible %a.ref // CHECK:STDOUT: %.loc15_13.2: %C = converted %a.ref, %.loc15_13.1 -// CHECK:STDOUT: %n.ref: %.4 = name_ref n, @C.%.loc11_8 [template = @C.%.loc11_8] +// CHECK:STDOUT: %n.ref: %C.elem = name_ref n, @C.%.loc11_8 [template = @C.%.loc11_8] // CHECK:STDOUT: %.loc15_18.1: ref %i32 = class_element_access %.loc15_13.2, element0 // CHECK:STDOUT: %.loc15_18.2: %i32 = bind_value %.loc15_18.1 // CHECK:STDOUT: return %.loc15_18.2 @@ -1013,7 +1013,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %complete_type => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Adapter(constants.%C) { @@ -1021,6 +1021,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %complete_type => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index a9e4c0127b4b5..b473c3eb6a9d8 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -90,27 +90,27 @@ fn H() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [template] -// CHECK:STDOUT: %Base.1: %Base.type = struct_value () [template] -// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Base.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %Base.generic: %Base.type = struct_value () [template] +// CHECK:STDOUT: %Base.1: type = class_type @Base, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.elem.1: type = unbound_element_type %Base.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Param, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %Base.3: type = class_type @Base, @Base(%Param) [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Base.3, %Param [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: %Param} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.14: type = unbound_element_type %Derived, %Base.3 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %Base.3} [template] -// CHECK:STDOUT: %.16: = complete_type_witness %.15 [template] +// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%Param) [template] +// CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %Param [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %Param} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.2 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base.2} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %DoubleFieldAccess.type: type = fn_type @DoubleFieldAccess [template] // CHECK:STDOUT: %DoubleFieldAccess: %DoubleFieldAccess.type = struct_value () [template] // CHECK:STDOUT: } @@ -132,7 +132,7 @@ fn H() { // CHECK:STDOUT: .DoubleFieldAccess = %DoubleFieldAccess.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [template = constants.%Base.1] { +// CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [template = constants.%Base.generic] { // CHECK:STDOUT: %T.patt.loc4_17.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_17.1, runtime_param [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -148,10 +148,10 @@ fn H() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc16_37.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_37.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_37.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_37.3: type = converted %int.make_type_signed, %.loc16_37.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_37.2: type = converted %int.make_type_signed, %.loc16_37.1 [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -164,59 +164,59 @@ fn H() { // CHECK:STDOUT: %T.patt.loc4_17.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.loc4_17.2) [symbolic = %Base (constants.%Base.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Base.%Base (%Base.2), @Base.%T.loc4_17.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Base.%T.loc4_17.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Base.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.loc4_17.2) [symbolic = %Base (constants.%Base.1)] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type @Base.%Base (%Base.1), @Base.%T.loc4_17.2 (%T) [symbolic = %Base.elem (constants.%Base.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Base.%T.loc4_17.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Base.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.1 [symbolic = %T.loc4_17.2 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Base.%.loc5_8.2 (%.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5: @Base.%Base.elem (%Base.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Base.2 -// CHECK:STDOUT: .x = %.loc5_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%Base.1 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param { -// CHECK:STDOUT: %.loc9_10.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.3: type = converted %int.make_type_signed, %.loc9_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8: %.5 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed, %.loc9_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8: %Param.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Param // CHECK:STDOUT: .y = %.loc9_8 -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { -// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.1] +// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.generic] // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param] -// CHECK:STDOUT: %Base: type = class_type @Base, @Base(constants.%Param) [template = constants.%Base.3] -// CHECK:STDOUT: %.loc13: %.14 = base_decl %Base, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.15 [template = constants.%.16] +// CHECK:STDOUT: %Base: type = class_type @Base, @Base(constants.%Param) [template = constants.%Base.2] +// CHECK:STDOUT: %.loc13: %Derived.elem = base_decl %Base, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc13 // CHECK:STDOUT: extend %Base -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DoubleFieldAccess(%d.param_patt: %Derived) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d -// CHECK:STDOUT: %x.ref: %.8 = name_ref x, @Base.%.loc5_8.1 [template = @Base.%.loc5_8.1] -// CHECK:STDOUT: %.loc17_11.1: ref %Base.3 = class_element_access %d.ref, element0 -// CHECK:STDOUT: %.loc17_11.2: ref %Base.3 = converted %d.ref, %.loc17_11.1 +// CHECK:STDOUT: %x.ref: %Base.elem.2 = name_ref x, @Base.%.loc5 [template = @Base.%.loc5] +// CHECK:STDOUT: %.loc17_11.1: ref %Base.2 = class_element_access %d.ref, element0 +// CHECK:STDOUT: %.loc17_11.2: ref %Base.2 = converted %d.ref, %.loc17_11.1 // CHECK:STDOUT: %.loc17_11.3: ref %Param = class_element_access %.loc17_11.2, element0 -// CHECK:STDOUT: %y.ref: %.5 = name_ref y, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, @Param.%.loc9_8 [template = @Param.%.loc9_8] // CHECK:STDOUT: %.loc17_13.1: ref %i32 = class_element_access %.loc17_11.3, element0 // CHECK:STDOUT: %.loc17_13.2: %i32 = bind_value %.loc17_13.1 // CHECK:STDOUT: return %.loc17_13.2 @@ -237,10 +237,10 @@ fn H() { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Base => constants.%Base.3 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.8 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.9 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.10 +// CHECK:STDOUT: %Base => constants.%Base.2 +// CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import.carbon @@ -248,27 +248,27 @@ fn H() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Param: type = class_type @Param [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [symbolic] -// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%T) [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %Base.1: type = class_type @Base, @Base(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %Base.3: type = class_type @Base, @Base(%Param) [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Base.3} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %Base.2, %T [symbolic] -// CHECK:STDOUT: %.10: type = unbound_element_type %Base.3, %Param [template] -// CHECK:STDOUT: %.11: type = struct_type {.x: %Param} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%Param) [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base.2} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %Base.elem.1: type = unbound_element_type %Base.1, %T [symbolic] +// CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %Param [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %Param} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %ImportedDoubleFieldAccess.type: type = fn_type @ImportedDoubleFieldAccess [template] // CHECK:STDOUT: %ImportedDoubleFieldAccess: %ImportedDoubleFieldAccess.type = struct_value () [template] -// CHECK:STDOUT: %.18: type = unbound_element_type %Param, %i32 [template] +// CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -281,16 +281,16 @@ fn H() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_base, inst+46, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_base, inst+46, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.6 = import_ref Main//extend_generic_base, inst+27, unloaded -// CHECK:STDOUT: %import_ref.7: %.18 = import_ref Main//extend_generic_base, inst+44, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8: = import_ref Main//extend_generic_base, inst+20, loaded [symbolic = @Base.%.3 (constants.%.5)] +// CHECK:STDOUT: %import_ref.7: %Param.elem = import_ref Main//extend_generic_base, inst+44, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//extend_generic_base, inst+20, loaded [symbolic = @Base.%complete_type (constants.%complete_type.2)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//extend_generic_base, inst+15, unloaded -// CHECK:STDOUT: %import_ref.10: @Base.%.1 (%.9) = import_ref Main//extend_generic_base, inst+18, loaded [template = %.2] -// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_generic_base, inst+63, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.10: @Base.%Base.elem (%Base.elem.1) = import_ref Main//extend_generic_base, inst+18, loaded [template = %.2] +// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_generic_base, inst+63, loaded [template = constants.%complete_type.3] // CHECK:STDOUT: %import_ref.13 = import_ref Main//extend_generic_base, inst+49, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//extend_generic_base, inst+61, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Main//extend_generic_base, inst+52, loaded [template = constants.%Base.3] +// CHECK:STDOUT: %import_ref.15: type = import_ref Main//extend_generic_base, inst+52, loaded [template = constants.%Base.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -311,10 +311,10 @@ fn H() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, imports.%import_ref.3 [template = constants.%Derived] -// CHECK:STDOUT: %.loc6_45.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_45.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_45.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_45.3: type = converted %int.make_type_signed, %.loc6_45.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_45.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_45.2: type = converted %int.make_type_signed, %.loc6_45.1 [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -342,10 +342,10 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T) [symbolic = %Base (constants.%Base.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @Base.%Base (%Base.2), @Base.%T (%T) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: type = struct_type {.x: @Base.%T (%T)} [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: = complete_type_witness @Base.%.2 (%.4) [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T) [symbolic = %Base (constants.%Base.1)] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type @Base.%Base (%Base.1), @Base.%T (%T) [symbolic = %Base.elem (constants.%Base.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Base.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @Base.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: @@ -358,11 +358,11 @@ fn H() { // CHECK:STDOUT: fn @ImportedDoubleFieldAccess(%d.param_patt: %Derived) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d -// CHECK:STDOUT: %x.ref: %.10 = name_ref x, imports.%import_ref.10 [template = imports.%.2] -// CHECK:STDOUT: %.loc7_11.1: ref %Base.3 = class_element_access %d.ref, element0 -// CHECK:STDOUT: %.loc7_11.2: ref %Base.3 = converted %d.ref, %.loc7_11.1 +// CHECK:STDOUT: %x.ref: %Base.elem.2 = name_ref x, imports.%import_ref.10 [template = imports.%.2] +// CHECK:STDOUT: %.loc7_11.1: ref %Base.2 = class_element_access %d.ref, element0 +// CHECK:STDOUT: %.loc7_11.2: ref %Base.2 = converted %d.ref, %.loc7_11.1 // CHECK:STDOUT: %.loc7_11.3: ref %Param = class_element_access %.loc7_11.2, element0 -// CHECK:STDOUT: %y.ref: %.18 = name_ref y, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, imports.%import_ref.7 [template = imports.%.1] // CHECK:STDOUT: %.loc7_13.1: ref %i32 = class_element_access %.loc7_11.3, element0 // CHECK:STDOUT: %.loc7_13.2: %i32 = bind_value %.loc7_13.1 // CHECK:STDOUT: return %.loc7_13.2 @@ -378,10 +378,10 @@ fn H() { // CHECK:STDOUT: %T.patt => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Base => constants.%Base.3 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %Base => constants.%Base.2 +// CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base(%T) { @@ -395,16 +395,16 @@ fn H() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -422,7 +422,7 @@ fn H() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -442,24 +442,24 @@ fn H() { // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: %.loc8: = base_decl , element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 +// CHECK:STDOUT: .Self = constants.%C.1 // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -469,9 +469,9 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.2] // CHECK:STDOUT: %G.ref: = name_ref G, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -494,38 +494,38 @@ fn H() { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %X.type: type = generic_class_type @X [template] -// CHECK:STDOUT: %X.1: %X.type = struct_value () [template] -// CHECK:STDOUT: %X.2: type = class_type @X, @X(%U) [symbolic] +// CHECK:STDOUT: %X.generic: %X.type = struct_value () [template] +// CHECK:STDOUT: %X.1: type = class_type @X, @X(%U) [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G, @X(%U) [symbolic] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: = specific_function %G.1, @G(%U) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %G.specific_fn.1: = specific_function %G.1, @G(%U) [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %X.3: type = class_type @X, @X(%T) [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %X.2: type = class_type @X, @X(%T) [symbolic] // CHECK:STDOUT: %G.type.2: type = fn_type @G, @X(%T) [symbolic] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = unbound_element_type %C.2, %X.3 [symbolic] -// CHECK:STDOUT: %.6: type = struct_type {.base: %X.3} [symbolic] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %X.2 [symbolic] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %X.2} [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.8 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %X.4: type = class_type @X, @X(%i32) [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %C.3, %X.4 [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %X.4} [template] -// CHECK:STDOUT: %.11: = complete_type_witness %.10 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %X.3: type = class_type @X, @X(%i32) [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %X.3 [template] +// CHECK:STDOUT: %struct_type.base.2: type = struct_type {.base: %X.3} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.2 [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G, @X(%i32) [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.14: = specific_function %G.3, @G(%i32) [template] +// CHECK:STDOUT: %G.specific_fn.2: = specific_function %G.3, @G(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -544,14 +544,14 @@ fn H() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [template = constants.%X.1] { +// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [template = constants.%X.generic] { // CHECK:STDOUT: %U.patt.loc4_14.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_14.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc4_14.1, runtime_param [symbolic = %U.patt.loc4_14.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc4_14.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc4_14.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_9.1, runtime_param [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -578,12 +578,12 @@ fn H() { // CHECK:STDOUT: %return.param: ref @G.%U (%U) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @G.%U (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%X.2 +// CHECK:STDOUT: .Self = constants.%X.1 // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -592,24 +592,24 @@ fn H() { // CHECK:STDOUT: %T.patt.loc8_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X.loc9_19.2: type = class_type @X, @X(%T.loc8_9.2) [symbolic = %X.loc9_19.2 (constants.%X.3)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc8_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc9_20.2: type = unbound_element_type @C.%C (%C.2), @C.%X.loc9_19.2 (%X.3) [symbolic = %.loc9_20.2 (constants.%.5)] -// CHECK:STDOUT: %.loc10_1.2: type = struct_type {.base: @C.%X.loc9_19.2 (%X.3)} [symbolic = %.loc10_1.2 (constants.%.6)] -// CHECK:STDOUT: %.loc10_1.3: = complete_type_witness @C.%.loc10_1.2 (%.6) [symbolic = %.loc10_1.3 (constants.%.7)] +// CHECK:STDOUT: %X.loc9_19.2: type = class_type @X, @X(%T.loc8_9.2) [symbolic = %X.loc9_19.2 (constants.%X.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc8_9.2) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%X.loc9_19.2 (%X.2) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @C.%X.loc9_19.2 (%X.2)} [symbolic = %struct_type.base (constants.%struct_type.base.1)] +// CHECK:STDOUT: %complete_type.loc10_1.2: = complete_type_witness @C.%struct_type.base (%struct_type.base.1) [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %X.ref: %X.type = name_ref X, file.%X.decl [template = constants.%X.1] +// CHECK:STDOUT: %X.ref: %X.type = name_ref X, file.%X.decl [template = constants.%X.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_9.1 [symbolic = %T.loc8_9.2 (constants.%T)] -// CHECK:STDOUT: %X.loc9_19.1: type = class_type @X, @X(constants.%T) [symbolic = %X.loc9_19.2 (constants.%X.3)] -// CHECK:STDOUT: %.loc9_20.1: @C.%.loc9_20.2 (%.5) = base_decl %X.loc9_19.1, element0 [template] -// CHECK:STDOUT: %.loc10_1.1: = complete_type_witness %.6 [symbolic = %.loc10_1.3 (constants.%.7)] +// CHECK:STDOUT: %X.loc9_19.1: type = class_type @X, @X(constants.%T) [symbolic = %X.loc9_19.2 (constants.%X.2)] +// CHECK:STDOUT: %.loc9: @C.%C.elem (%C.elem.1) = base_decl %X.loc9_19.1, element0 [template] +// CHECK:STDOUT: %complete_type.loc10_1.1: = complete_type_witness %struct_type.base.1 [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: .base = %.loc9_20.1 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: extend %X.loc9_19.1 -// CHECK:STDOUT: complete_type_witness = %.loc10_1.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc10_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -619,14 +619,14 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)] // CHECK:STDOUT: %G: @G.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)] -// CHECK:STDOUT: %.loc5_24.3: = specific_function %G, @G(%U) [symbolic = %.loc5_24.3 (constants.%.3)] +// CHECK:STDOUT: %G.specific_fn.loc5_24.2: = specific_function %G, @G(%U) [symbolic = %G.specific_fn.loc5_24.2 (constants.%G.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @G.%U (%U) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_24.1: @G.%G.type (%G.type.1) = specific_constant @X.%G.decl, @X(constants.%U) [symbolic = %G (constants.%G.1)] -// CHECK:STDOUT: %G.ref: @G.%G.type (%G.type.1) = name_ref G, %.loc5_24.1 [symbolic = %G (constants.%G.1)] -// CHECK:STDOUT: %.loc5_24.2: = specific_function %G.ref, @G(constants.%U) [symbolic = %.loc5_24.3 (constants.%.3)] -// CHECK:STDOUT: %G.call: init @G.%U (%U) = call %.loc5_24.2() +// CHECK:STDOUT: %.loc5_24: @G.%G.type (%G.type.1) = specific_constant @X.%G.decl, @X(constants.%U) [symbolic = %G (constants.%G.1)] +// CHECK:STDOUT: %G.ref: @G.%G.type (%G.type.1) = name_ref G, %.loc5_24 [symbolic = %G (constants.%G.1)] +// CHECK:STDOUT: %G.specific_fn.loc5_24.1: = specific_function %G.ref, @G(constants.%U) [symbolic = %G.specific_fn.loc5_24.2 (constants.%G.specific_fn.1)] +// CHECK:STDOUT: %G.call: init @G.%U (%U) = call %G.specific_fn.loc5_24.1() // CHECK:STDOUT: %.loc5_27.1: @G.%U (%U) = value_of_initializer %G.call // CHECK:STDOUT: %.loc5_27.2: @G.%U (%U) = converted %G.call, %.loc5_27.1 // CHECK:STDOUT: return %.loc5_27.2 @@ -635,20 +635,20 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.8] -// CHECK:STDOUT: %int.make_type_signed.loc13_10: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13_10, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%.8] -// CHECK:STDOUT: %int.make_type_signed.loc13_18: init type = call constants.%Int(%.loc13_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_10: init type = call constants.%Int(%int_32.loc13_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13_10, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_18: init type = call constants.%Int(%int_32.loc13_18) [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13_18 [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13_18, %.loc13_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] -// CHECK:STDOUT: %.loc13_22.1: %G.type.3 = specific_constant @X.%G.decl, @X(constants.%i32) [template = constants.%G.3] -// CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc13_22.1 [template = constants.%G.3] -// CHECK:STDOUT: %.loc13_22.2: = specific_function %G.ref, @G(constants.%i32) [template = constants.%.14] -// CHECK:STDOUT: %G.call: init %i32 = call %.loc13_22.2() +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc13_22: %G.type.3 = specific_constant @X.%G.decl, @X(constants.%i32) [template = constants.%G.3] +// CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc13_22 [template = constants.%G.3] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%i32) [template = constants.%G.specific_fn.2] +// CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn() // CHECK:STDOUT: %.loc13_26.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc13_26.2: %i32 = converted %G.call, %.loc13_26.1 // CHECK:STDOUT: %i: %i32 = bind_name i, %.loc13_26.2 @@ -670,7 +670,7 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type => constants.%G.type.1 // CHECK:STDOUT: %G => constants.%G.1 -// CHECK:STDOUT: %.loc5_24.3 => constants.%.3 +// CHECK:STDOUT: %G.specific_fn.loc5_24.2 => constants.%G.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(%U.loc4_14.2) { @@ -716,11 +716,11 @@ fn H() { // CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X.loc9_19.2 => constants.%X.4 -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.loc9_20.2 => constants.%.9 -// CHECK:STDOUT: %.loc10_1.2 => constants.%.10 -// CHECK:STDOUT: %.loc10_1.3 => constants.%.11 +// CHECK:STDOUT: %X.loc9_19.2 => constants.%X.3 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.2 +// CHECK:STDOUT: %complete_type.loc10_1.2 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%i32) { @@ -738,7 +738,7 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type => constants.%G.type.3 // CHECK:STDOUT: %G => constants.%G.3 -// CHECK:STDOUT: %.loc5_24.3 => constants.%.14 +// CHECK:STDOUT: %G.specific_fn.loc5_24.2 => constants.%G.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_extend_generic_symbolic_base.carbon @@ -746,54 +746,54 @@ fn H() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] -// CHECK:STDOUT: %X.3: type = class_type @X, @X(%T) [symbolic] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %C.2, %X.3 [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {.base: %X.3} [symbolic] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [symbolic] +// CHECK:STDOUT: %X.2: type = class_type @X, @X(%T) [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %X.2 [symbolic] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %X.2} [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G, @X(%U) [symbolic] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = specific_function %G.1, @G(%U) [symbolic] +// CHECK:STDOUT: %G.specific_fn.1: = specific_function %G.1, @G(%U) [symbolic] // CHECK:STDOUT: %G.type.2: type = fn_type @G, @X(%T) [symbolic] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %X.4: type = class_type @X, @X(%i32) [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C.3, %X.4 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %X.4} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %X.3: type = class_type @X, @X(%i32) [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %X.3 [template] +// CHECK:STDOUT: %struct_type.base.2: type = struct_type {.base: %X.3} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.2 [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G, @X(%i32) [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.14: = specific_function %G.3, @G(%i32) [template] +// CHECK:STDOUT: %G.specific_fn.2: = specific_function %G.3, @G(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//extend_generic_symbolic_base, inst+9, unloaded -// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//extend_generic_symbolic_base, inst+47, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//extend_generic_symbolic_base, inst+47, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.3 = import_ref Main//extend_generic_symbolic_base, inst+70, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.4 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_symbolic_base, inst+26, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_symbolic_base, inst+26, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.6 = import_ref Main//extend_generic_symbolic_base, inst+15, unloaded // CHECK:STDOUT: %import_ref.7: @X.%G.type (%G.type.1) = import_ref Main//extend_generic_symbolic_base, inst+21, loaded [symbolic = @X.%G (constants.%G.1)] -// CHECK:STDOUT: %import_ref.9: = import_ref Main//extend_generic_symbolic_base, inst+63, loaded [symbolic = @C.%.3 (constants.%.6)] +// CHECK:STDOUT: %import_ref.9: = import_ref Main//extend_generic_symbolic_base, inst+63, loaded [symbolic = @C.%complete_type (constants.%complete_type.2)] // CHECK:STDOUT: %import_ref.10 = import_ref Main//extend_generic_symbolic_base, inst+52, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//extend_generic_symbolic_base, inst+61, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//extend_generic_symbolic_base, inst+55, loaded [symbolic = @C.%X (constants.%X.3)] +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//extend_generic_symbolic_base, inst+55, loaded [symbolic = @C.%X (constants.%X.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -814,11 +814,11 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X: type = class_type @X, @X(%T) [symbolic = %X (constants.%X.3)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @C.%C (%C.2), @C.%X (%X.3) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: type = struct_type {.base: @C.%X (%X.3)} [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: = complete_type_witness @C.%.2 (%.5) [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %X: type = class_type @X, @X(%T) [symbolic = %X (constants.%X.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%X (%X.2) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @C.%X (%X.2)} [symbolic = %struct_type.base (constants.%struct_type.base.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.base (%struct_type.base.1) [symbolic = %complete_type (constants.%complete_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: @@ -847,20 +847,20 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_10: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed.loc7_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed.loc7_10, %.loc7_10.2 [template = constants.%i32] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.1] -// CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%.loc7_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_10: init type = call constants.%Int(%int_32.loc7_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7_10, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32] // CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] // CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7_18, %.loc7_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] -// CHECK:STDOUT: %.loc7_22.1: %G.type.3 = specific_constant imports.%import_ref.7, @X(constants.%i32) [template = constants.%G.3] -// CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc7_22.1 [template = constants.%G.3] -// CHECK:STDOUT: %.loc7_22.2: = specific_function %G.ref, @G(constants.%i32) [template = constants.%.14] -// CHECK:STDOUT: %G.call: init %i32 = call %.loc7_22.2() +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc7_22: %G.type.3 = specific_constant imports.%import_ref.7, @X(constants.%i32) [template = constants.%G.3] +// CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc7_22 [template = constants.%G.3] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%i32) [template = constants.%G.specific_fn.2] +// CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn() // CHECK:STDOUT: %.loc7_26.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc7_26.2: %i32 = converted %G.call, %.loc7_26.1 // CHECK:STDOUT: %j: %i32 = bind_name j, %.loc7_26.2 @@ -873,7 +873,7 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)] // CHECK:STDOUT: %G: @G.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)] -// CHECK:STDOUT: %.1: = specific_function %G, @G(%U) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%U) [symbolic = %G.specific_fn (constants.%G.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @G.%U (%U); // CHECK:STDOUT: } @@ -922,7 +922,7 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type => constants.%G.type.1 // CHECK:STDOUT: %G => constants.%G.1 -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %G.specific_fn => constants.%G.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(@G.%U) { @@ -939,11 +939,11 @@ fn H() { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X => constants.%X.4 -// CHECK:STDOUT: %C => constants.%C.3 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %X => constants.%X.3 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%i32) { @@ -961,6 +961,6 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %G.type => constants.%G.type.3 // CHECK:STDOUT: %G => constants.%G.3 -// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %G.specific_fn => constants.%G.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index c0ab9c9ad251b..33a104223ab37 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -29,19 +29,19 @@ class Declaration(T:! type); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %Class.2 [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T) [symbolic] // CHECK:STDOUT: %GetAddr: %GetAddr.type = struct_value () [symbolic] // CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T) [symbolic] // CHECK:STDOUT: %GetValue: %GetValue.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {.k: %T} [symbolic] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [symbolic] // CHECK:STDOUT: %Declaration.type: type = generic_class_type @Declaration [template] -// CHECK:STDOUT: %Declaration.1: %Declaration.type = struct_value () [template] +// CHECK:STDOUT: %Declaration.generic: %Declaration.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,14 +58,14 @@ class Declaration(T:! type); // CHECK:STDOUT: .Declaration = %Declaration.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [template = constants.%Declaration.1] { +// CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [template = constants.%Declaration.generic] { // CHECK:STDOUT: %T.patt.loc24_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc24_19.1, runtime_param [symbolic = %T.patt.loc24_19.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -83,53 +83,53 @@ class Declaration(T:! type); // CHECK:STDOUT: %GetAddr: @Class.%GetAddr.type (%GetAddr.type) = struct_value () [symbolic = %GetAddr (constants.%GetAddr)] // CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T.loc11_13.2) [symbolic = %GetValue.type (constants.%GetValue.type)] // CHECK:STDOUT: %GetValue: @Class.%GetValue.type (%GetValue.type) = struct_value () [symbolic = %GetValue (constants.%GetValue)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc21_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc21_8.2 (constants.%.3)] -// CHECK:STDOUT: %.loc22_1.2: type = struct_type {.k: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc22_1.2 (constants.%.4)] -// CHECK:STDOUT: %.loc22_1.3: = complete_type_witness @Class.%.loc22_1.2 (%.4) [symbolic = %.loc22_1.3 (constants.%.5)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.k (constants.%struct_type.k)] +// CHECK:STDOUT: %complete_type.loc22_1.2: = complete_type_witness @Class.%struct_type.k (%struct_type.k) [symbolic = %complete_type.loc22_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GetAddr.decl: @Class.%GetAddr.type (%GetAddr.type) = fn_decl @GetAddr [symbolic = @Class.%GetAddr (constants.%GetAddr)] { -// CHECK:STDOUT: %self.patt: @GetAddr.%.loc12_29.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc12_29.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc12_14: auto = addr_pattern %self.param_patt -// CHECK:STDOUT: %return.patt: @GetAddr.%.loc12_38.1 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc12_38.1 (%.2) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @GetAddr.%ptr.loc12_38.1 (%ptr.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GetAddr.%ptr.loc12_38.1 (%ptr.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_25 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_29.2: type = ptr_type %Class.2 [symbolic = %.loc12_29.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_25 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %ptr.loc12_29.2: type = ptr_type %Class [symbolic = %ptr.loc12_29.1 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc12_38.2: type = ptr_type %T [symbolic = %.loc12_38.1 (constants.%.2)] -// CHECK:STDOUT: %self.param: @GetAddr.%.loc12_29.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @GetAddr.%.loc12_29.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc12_38.1 (%.2) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @GetAddr.%.loc12_38.1 (%.2) = return_slot %return.param +// CHECK:STDOUT: %ptr.loc12_38.2: type = ptr_type %T [symbolic = %ptr.loc12_38.1 (constants.%ptr.2)] +// CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc12_38.1 (%ptr.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc12_38.1 (%ptr.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetValue.decl: @Class.%GetValue.type (%GetValue.type) = fn_decl @GetValue [symbolic = @Class.%GetValue (constants.%GetValue)] { -// CHECK:STDOUT: %self.patt: @GetValue.%Class (%Class.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @GetValue.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @GetValue.%Class (%Class) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @GetValue.%Class (%Class) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @GetValue.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @GetValue.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc17 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc17 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @GetValue.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @GetValue.%Class (%Class.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @GetValue.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %self: @GetValue.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @GetValue.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @GetValue.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc21_8.1: @Class.%.loc21_8.2 (%.3) = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc22_1.1: = complete_type_witness %.4 [symbolic = %.loc22_1.3 (constants.%.5)] +// CHECK:STDOUT: %.loc21: @Class.%Class.elem (%Class.elem) = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type.loc22_1.1: = complete_type_witness %struct_type.k [symbolic = %complete_type.loc22_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .GetAddr = %GetAddr.decl // CHECK:STDOUT: .GetValue = %GetValue.decl -// CHECK:STDOUT: .k = %.loc21_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc22_1.1 +// CHECK:STDOUT: .k = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc22_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -142,35 +142,35 @@ class Declaration(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc12_29.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc12_38.1 (constants.%.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %ptr.loc12_29.1: type = ptr_type @GetAddr.%Class (%Class) [symbolic = %ptr.loc12_29.1 (constants.%ptr.1)] +// CHECK:STDOUT: %ptr.loc12_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %ptr.loc12_38.1 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_17.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc13_17.3 (constants.%.3)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @GetAddr.%Class (%Class), @GetAddr.%T (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc12_29.1 (%.1)]() -> @GetAddr.%.loc12_38.1 (%.2) { +// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%ptr.loc12_29.1 (%ptr.1)]() -> @GetAddr.%ptr.loc12_38.1 (%ptr.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetAddr.%.loc12_29.1 (%.1) = name_ref self, %self -// CHECK:STDOUT: %.loc13_17.1: ref @GetAddr.%Class (%Class.2) = deref %self.ref -// CHECK:STDOUT: %k.ref: @GetAddr.%.loc13_17.3 (%.3) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] +// CHECK:STDOUT: %self.ref: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = name_ref self, %self +// CHECK:STDOUT: %.loc13_17.1: ref @GetAddr.%Class (%Class) = deref %self.ref +// CHECK:STDOUT: %k.ref: @GetAddr.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] // CHECK:STDOUT: %.loc13_17.2: ref @GetAddr.%T (%T) = class_element_access %.loc13_17.1, element0 -// CHECK:STDOUT: %.loc13_12: @GetAddr.%.loc12_38.1 (%.2) = addr_of %.loc13_17.2 -// CHECK:STDOUT: return %.loc13_12 +// CHECK:STDOUT: %addr: @GetAddr.%ptr.loc12_38.1 (%ptr.2) = addr_of %.loc13_17.2 +// CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GetValue(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc18_16.3: type = unbound_element_type @GetValue.%Class (%Class.2), @GetValue.%T (%T) [symbolic = %.loc18_16.3 (constants.%.3)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @GetValue.%Class (%Class), @GetValue.%T (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @GetValue.%Class (%Class.2)]() -> @GetValue.%T (%T) { +// CHECK:STDOUT: fn[%self.param_patt: @GetValue.%Class (%Class)]() -> @GetValue.%T (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetValue.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %k.ref: @GetValue.%.loc18_16.3 (%.3) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] +// CHECK:STDOUT: %self.ref: @GetValue.%Class (%Class) = name_ref self, %self +// CHECK:STDOUT: %k.ref: @GetValue.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] // CHECK:STDOUT: %.loc18_16.1: ref @GetValue.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc18_16.2: @GetValue.%T (%T) = bind_value %.loc18_16.1 // CHECK:STDOUT: return %.loc18_16.2 @@ -186,10 +186,10 @@ class Declaration(T:! type); // CHECK:STDOUT: %GetAddr => constants.%GetAddr // CHECK:STDOUT: %GetValue.type => constants.%GetValue.type // CHECK:STDOUT: %GetValue => constants.%GetValue -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc21_8.2 => constants.%.3 -// CHECK:STDOUT: %.loc22_1.2 => constants.%.4 -// CHECK:STDOUT: %.loc22_1.3 => constants.%.5 +// CHECK:STDOUT: %Class => constants.%Class +// CHECK:STDOUT: %Class.elem => constants.%Class.elem +// CHECK:STDOUT: %struct_type.k => constants.%struct_type.k +// CHECK:STDOUT: %complete_type.loc22_1.2 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetAddr.%T) { @@ -199,9 +199,9 @@ class Declaration(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_29.1 => constants.%.1 -// CHECK:STDOUT: %.loc12_38.1 => constants.%.2 +// CHECK:STDOUT: %Class => constants.%Class +// CHECK:STDOUT: %ptr.loc12_29.1 => constants.%ptr.1 +// CHECK:STDOUT: %ptr.loc12_38.1 => constants.%ptr.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetValue.%T) { @@ -211,7 +211,7 @@ class Declaration(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: specific @GetValue(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc11_13.2) { diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 2c0e970906d0a..25bf01b361276 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -90,33 +90,33 @@ class Outer(T:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N.1) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T, %N.1) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.4, %.32) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%empty_tuple.type, %.37) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%ptr.1, %int_5.2) [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%empty_tuple.type, %int_0.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -136,50 +136,50 @@ class Outer(T:! type) { // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_signed, %.loc6_17.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_17.3: type = ptr_type %i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_20: Core.IntLiteral = int_value 5 [template = constants.%.5] -// CHECK:STDOUT: %.loc6_21.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_21.2: = bound_method %.loc6_20, %.loc6_21.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_21.3: = specific_function %.loc6_21.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_21.3(%.loc6_20) [template = constants.%.32] -// CHECK:STDOUT: %.loc6_21.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_21.5: %i32 = converted %.loc6_20, %.loc6_21.4 [template = constants.%.32] -// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.4, constants.%.32) [template = constants.%Class.3] -// CHECK:STDOUT: %a.var: ref %Class.3 = var a -// CHECK:STDOUT: %a: ref %Class.3 = bind_name a, %a.var -// CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5, %impl.elem0.loc6 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_21.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_21.2: %i32 = converted %int_5, %.loc6_21.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%ptr.1, constants.%int_5.2) [template = constants.%Class.2] +// CHECK:STDOUT: %a.var: ref %Class.2 = var a +// CHECK:STDOUT: %a: ref %Class.2 = bind_name a, %a.var +// CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 0 [template = constants.%.34] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc9_19.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_19.3: = bound_method %.loc9_18, %.loc9_19.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_19.4: = specific_function %.loc9_19.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_19.4(%.loc9_18) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_18, %.loc9_19.5 [template = constants.%.37] -// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%.37) [template = constants.%Class.4] -// CHECK:STDOUT: %b.var: ref %Class.4 = var b -// CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_0, %impl.elem0.loc9 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_19.2: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_19.3: %i32 = converted %int_0, %.loc9_19.2 [template = constants.%int_0.2] +// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%int_0.2) [template = constants.%Class.3] +// CHECK:STDOUT: %b.var: ref %Class.3 = var b +// CHECK:STDOUT: %b: ref %Class.3 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { @@ -191,11 +191,11 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_33 +// CHECK:STDOUT: .Self = constants.%Class.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -206,20 +206,20 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%.4, constants.%.32) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.4 -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.32 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.32 +// CHECK:STDOUT: specific @Class(constants.%ptr.1, constants.%int_5.2) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%int_5.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%int_5.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%.37) { +// CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%int_0.2) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%empty_tuple.type // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%empty_tuple.type -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.37 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.37 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%int_0.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -229,18 +229,18 @@ class Outer(T:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %i32 [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -258,27 +258,27 @@ class Outer(T:! type) { // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_14) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.3: type = ptr_type %i32 [template = constants.%.4] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -292,11 +292,11 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_33 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -312,20 +312,20 @@ class Outer(T:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -343,29 +343,29 @@ class Outer(T:! type) { // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_14) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.3: type = ptr_type %i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_23: Core.IntLiteral = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -379,11 +379,11 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_33 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -399,19 +399,19 @@ class Outer(T:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N.1) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.5: type = ptr_type %i32 [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.1) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -430,29 +430,29 @@ class Outer(T:! type) { // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: type = converted %int.make_type_signed, %.loc4_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 5 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_17) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_signed, %.loc15_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_20.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_21: type = converted %.loc15_14, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %.loc15_21: type = converted %int_5, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -466,11 +466,11 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_33 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -487,29 +487,29 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [template] -// CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] -// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] +// CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [template] +// CHECK:STDOUT: %Outer.1: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %Inner.type.1: type = generic_class_type @Inner, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.1: %Inner.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic] +// CHECK:STDOUT: %Inner.generic.1: %Inner.type.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.1: type = class_type @Inner, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %A.type.1: type = fn_type @A, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Outer.3: type = class_type @Outer, @Outer(%U) [symbolic] +// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%U) [symbolic] // CHECK:STDOUT: %B.type.1: type = fn_type @B, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %B.1: %B.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.3: type = class_type @Inner, @Inner(%T, %T) [symbolic] +// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %C.type.1: type = fn_type @C, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %C.1: %C.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %D.type.1: type = fn_type @D, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %D.1: %D.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct.1: %Outer.2 = struct_value () [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Outer.val.1: %Outer.1 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%U) [symbolic] -// CHECK:STDOUT: %Inner.4: %Inner.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %struct.2: %Outer.3 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.generic.2: %Inner.type.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Outer.val.2: %Outer.2 = struct_value () [symbolic] // CHECK:STDOUT: %A.type.2: type = fn_type @A, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %B.type.2: type = fn_type @B, @Inner(%T, %T) [symbolic] @@ -518,8 +518,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %C.2: %C.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %D.type.2: type = fn_type @D, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %D.2: %D.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %struct.3: %Inner.3 = struct_value () [symbolic] -// CHECK:STDOUT: %struct.4: %Inner.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.val.1: %Inner.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.val.2: %Inner.1 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -535,7 +535,7 @@ class Outer(T:! type) { // CHECK:STDOUT: .Outer = %Outer.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.1] { +// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc2_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc2_13.1, runtime_param [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -550,22 +550,22 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc2_13.2) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.generic: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner (constants.%Inner.1)] { +// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.1)] { // CHECK:STDOUT: %U.patt.loc3_15.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_15.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc3_15.1, runtime_param [symbolic = %U.patt.loc3_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc3_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc3_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Outer.2 +// CHECK:STDOUT: .Self = constants.%Outer.1 // CHECK:STDOUT: .Inner = %Inner.decl -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -586,87 +586,87 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %A.decl: @Inner.%A.type (%A.type.1) = fn_decl @A [symbolic = @Inner.%A (constants.%A.1)] { -// CHECK:STDOUT: %return.patt: @A.%Outer.loc4_22.1 (%Outer.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @A.%Outer.loc4_22.1 (%Outer.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @A.%Outer.loc4_22.1 (%Outer.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @A.%Outer.loc4_22.1 (%Outer.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Outer.loc4_22.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.2)] -// CHECK:STDOUT: %return.param: ref @A.%Outer.loc4_22.1 (%Outer.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @A.%Outer.loc4_22.1 (%Outer.2) = return_slot %return.param +// CHECK:STDOUT: %Outer.loc4_22.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.1)] +// CHECK:STDOUT: %return.param: ref @A.%Outer.loc4_22.1 (%Outer.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @A.%Outer.loc4_22.1 (%Outer.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: @Inner.%B.type (%B.type.1) = fn_decl @B [symbolic = @Inner.%B (constants.%B.1)] { -// CHECK:STDOUT: %return.patt: @B.%Outer.loc7_22.1 (%Outer.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @B.%Outer.loc7_22.1 (%Outer.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @B.%Outer.loc7_22.1 (%Outer.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @B.%Outer.loc7_22.1 (%Outer.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Outer.loc7_22.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.3)] -// CHECK:STDOUT: %return.param: ref @B.%Outer.loc7_22.1 (%Outer.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @B.%Outer.loc7_22.1 (%Outer.3) = return_slot %return.param +// CHECK:STDOUT: %Outer.loc7_22.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.2)] +// CHECK:STDOUT: %return.param: ref @B.%Outer.loc7_22.1 (%Outer.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @B.%Outer.loc7_22.1 (%Outer.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: @Inner.%C.type (%C.type.1) = fn_decl @C [symbolic = @Inner.%C (constants.%C.1)] { -// CHECK:STDOUT: %return.patt: @C.%Inner.loc10_22.1 (%Inner.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @C.%Inner.loc10_22.1 (%Inner.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @C.%Inner.loc10_22.1 (%Inner.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @C.%Inner.loc10_22.1 (%Inner.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10: @C.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc10_15 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.ref: @C.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc10 [symbolic = %Inner.loc10_15 (constants.%Inner.1)] +// CHECK:STDOUT: %.loc10: @C.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.ref: @C.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc10 [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Inner.loc10_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.3)] -// CHECK:STDOUT: %return.param: ref @C.%Inner.loc10_22.1 (%Inner.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @C.%Inner.loc10_22.1 (%Inner.3) = return_slot %return.param +// CHECK:STDOUT: %Inner.loc10_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.2)] +// CHECK:STDOUT: %return.param: ref @C.%Inner.loc10_22.1 (%Inner.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @C.%Inner.loc10_22.1 (%Inner.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: @Inner.%D.type (%D.type.1) = fn_decl @D [symbolic = @Inner.%D (constants.%D.1)] { -// CHECK:STDOUT: %return.patt: @D.%Inner.loc13_22.1 (%Inner.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @D.%Inner.loc13_22.1 (%Inner.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @D.%Inner.loc13_22.1 (%Inner.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @D.%Inner.loc13_22.1 (%Inner.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13: @D.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc13_15 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.ref: @D.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13 [symbolic = %Inner.loc13_15 (constants.%Inner.1)] +// CHECK:STDOUT: %.loc13: @D.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.ref: @D.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13 [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.2)] -// CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_22.1 (%Inner.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @D.%Inner.loc13_22.1 (%Inner.2) = return_slot %return.param +// CHECK:STDOUT: %Inner.loc13_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.1)] +// CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_22.1 (%Inner.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @D.%Inner.loc13_22.1 (%Inner.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Inner.2 +// CHECK:STDOUT: .Self = constants.%Inner.1 // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Outer.loc4_22.1: type = class_type @Outer, @Outer(%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc4_22.1: type = class_type @Outer, @Outer(%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @A.%Outer.loc4_22.1 (%Outer.2) = struct_value () [symbolic = %struct (constants.%struct.1)] +// CHECK:STDOUT: %Outer.val: @A.%Outer.loc4_22.1 (%Outer.1) = struct_value () [symbolic = %Outer.val (constants.%Outer.val.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @A.%Outer.loc4_22.1 (%Outer.2) { +// CHECK:STDOUT: fn() -> %return: @A.%Outer.loc4_22.1 (%Outer.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_22.1 (%Outer.2) = class_init (), %return [symbolic = %struct (constants.%struct.1)] -// CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_22.1 (%Outer.2) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %struct (constants.%struct.1)] +// CHECK:STDOUT: %.loc5_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_22.1 (%Outer.1) = class_init (), %return [symbolic = %Outer.val (constants.%Outer.val.1)] +// CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_22.1 (%Outer.1) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %Outer.val (constants.%Outer.val.1)] // CHECK:STDOUT: return %.loc5_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @B(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Outer.loc7_22.1: type = class_type @Outer, @Outer(%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.3)] +// CHECK:STDOUT: %Outer.loc7_22.1: type = class_type @Outer, @Outer(%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @B.%Outer.loc7_22.1 (%Outer.3) = struct_value () [symbolic = %struct (constants.%struct.2)] +// CHECK:STDOUT: %Outer.val: @B.%Outer.loc7_22.1 (%Outer.2) = struct_value () [symbolic = %Outer.val (constants.%Outer.val.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @B.%Outer.loc7_22.1 (%Outer.3) { +// CHECK:STDOUT: fn() -> %return: @B.%Outer.loc7_22.1 (%Outer.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_22.1 (%Outer.3) = class_init (), %return [symbolic = %struct (constants.%struct.2)] -// CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_22.1 (%Outer.3) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %struct (constants.%struct.2)] +// CHECK:STDOUT: %.loc8_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_22.1 (%Outer.2) = class_init (), %return [symbolic = %Outer.val (constants.%Outer.val.2)] +// CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_22.1 (%Outer.2) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %Outer.val (constants.%Outer.val.2)] // CHECK:STDOUT: return %.loc8_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -674,17 +674,17 @@ class Outer(T:! type) { // CHECK:STDOUT: generic fn @C(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner.loc10_15: @C.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc10_15 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.loc10_22.1: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.3)] +// CHECK:STDOUT: %Inner.generic: @C.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.loc10_22.1: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @C.%Inner.loc10_22.1 (%Inner.3) = struct_value () [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %Inner.val: @C.%Inner.loc10_22.1 (%Inner.2) = struct_value () [symbolic = %Inner.val (constants.%Inner.val.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @C.%Inner.loc10_22.1 (%Inner.3) { +// CHECK:STDOUT: fn() -> %return: @C.%Inner.loc10_22.1 (%Inner.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_22.1 (%Inner.3) = class_init (), %return [symbolic = %struct (constants.%struct.3)] -// CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_22.1 (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %.loc11_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_22.1 (%Inner.2) = class_init (), %return [symbolic = %Inner.val (constants.%Inner.val.1)] +// CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_22.1 (%Inner.2) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %Inner.val (constants.%Inner.val.1)] // CHECK:STDOUT: return %.loc11_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -692,18 +692,18 @@ class Outer(T:! type) { // CHECK:STDOUT: generic fn @D(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner.loc13_15: @D.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc13_15 (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.generic: @D.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_22.1: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.loc13_22.1: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @D.%Inner.loc13_22.1 (%Inner.2) = struct_value () [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %Inner.val: @D.%Inner.loc13_22.1 (%Inner.1) = struct_value () [symbolic = %Inner.val (constants.%Inner.val.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @D.%Inner.loc13_22.1 (%Inner.2) { +// CHECK:STDOUT: fn() -> %return: @D.%Inner.loc13_22.1 (%Inner.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_22.1 (%Inner.2) = class_init (), %return [symbolic = %struct (constants.%struct.4)] -// CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_22.1 (%Inner.2) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %.loc14_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_22.1 (%Inner.1) = class_init (), %return [symbolic = %Inner.val (constants.%Inner.val.2)] +// CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_22.1 (%Inner.1) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %Inner.val (constants.%Inner.val.2)] // CHECK:STDOUT: return %.loc14_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -714,7 +714,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner => constants.%Inner.1 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) { @@ -740,7 +740,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Outer.loc4_22.1 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc4_22.1 => constants.%Outer.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%U) { @@ -749,7 +749,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 -// CHECK:STDOUT: %Inner => constants.%Inner.4 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(@B.%U) { @@ -759,7 +759,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @B(constants.%T, constants.%U) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Outer.loc7_22.1 => constants.%Outer.3 +// CHECK:STDOUT: %Outer.loc7_22.1 => constants.%Outer.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) { @@ -791,8 +791,8 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @C(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner.loc10_15 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc10_22.1 => constants.%Inner.3 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 +// CHECK:STDOUT: %Inner.loc10_22.1 => constants.%Inner.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(@D.%T) { @@ -808,9 +808,9 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @D(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner.loc13_15 => constants.%Inner.1 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Inner.loc13_22.1 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.loc13_22.1 => constants.%Inner.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(%T, %U.loc3_15.2) { diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 468cd2d8bfa01..3b861317ddf2b 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -30,31 +30,31 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem.1: type = unbound_element_type %Class.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%i32) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Class.3, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] -// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%U) [symbolic] +// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%U) [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %Class.4, %U [symbolic] -// CHECK:STDOUT: %.11: type = struct_type {.x: %U} [symbolic] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [symbolic] +// CHECK:STDOUT: %Class.elem.3: type = unbound_element_type %Class.3, %U [symbolic] +// CHECK:STDOUT: %struct_type.x.3: type = struct_type {.x: %U} [symbolic] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.3 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,7 +74,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -82,61 +82,61 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %c.patt: %Class.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %Class.3 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %Class.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %Class.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%.loc15_15) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%int_32.loc15_15) [template = constants.%i32] // CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_signed.loc15_15, %.loc15_18.1 [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc15_24.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc15_24: init type = call constants.%Int(%.loc15_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24.2: type = value_of_initializer %int.make_type_signed.loc15_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24.3: type = converted %int.make_type_signed.loc15_24, %.loc15_24.2 [template = constants.%i32] -// CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %Class.3 = bind_name c, %c.param +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_24: init type = call constants.%Int(%int_32.loc15_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %int.make_type_signed.loc15_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_24.2: type = converted %int.make_type_signed.loc15_24, %.loc15_24.1 [template = constants.%i32] +// CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt.loc19_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_6.1, runtime_param [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %c.patt: @G.%Class.loc19_26.2 (%Class.2) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_26.2 (%Class.2) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @G.%Class.loc19_26.2 (%Class.1) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_26.2 (%Class.1) = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @G.%T.loc19_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @G.%T.loc19_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.1)] // CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_6.2 (constants.%T)] -// CHECK:STDOUT: %c.param: @G.%Class.loc19_26.2 (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %c: @G.%Class.loc19_26.2 (%Class.2) = bind_name c, %c.param +// CHECK:STDOUT: %c.param: @G.%Class.loc19_26.2 (%Class.1) = value_param runtime_param0 +// CHECK:STDOUT: %c: @G.%Class.loc19_26.2 (%Class.1) = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref @G.%T.loc19_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @G.%T.loc19_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %U.patt.loc23_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc23_6.1, runtime_param [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] -// CHECK:STDOUT: %c.patt: @H.%Class.loc23_26.2 (%Class.4) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_26.2 (%Class.4) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @H.%Class.loc23_26.2 (%Class.3) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_26.2 (%Class.3) = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @H.%U.loc23_6.2 (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @H.%U.loc23_6.2 (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)] -// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.4)] +// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.3)] // CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc23_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc23_6.2 (constants.%U)] -// CHECK:STDOUT: %c.param: @H.%Class.loc23_26.2 (%Class.4) = value_param runtime_param0 -// CHECK:STDOUT: %c: @H.%Class.loc23_26.2 (%Class.4) = bind_name c, %c.param +// CHECK:STDOUT: %c.param: @H.%Class.loc23_26.2 (%Class.3) = value_param runtime_param0 +// CHECK:STDOUT: %c: @H.%Class.loc23_26.2 (%Class.3) = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref @H.%U.loc23_6.2 (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @H.%U.loc23_6.2 (%U) = return_slot %return.param // CHECK:STDOUT: } @@ -147,27 +147,27 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc13_1.2: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc13_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_1.3: = complete_type_witness @Class.%.loc13_1.2 (%.2) [symbolic = %.loc13_1.3 (constants.%.3)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class.1), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc13_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc13_1.1: = complete_type_witness %.2 [symbolic = %.loc13_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc13_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .x = %.loc12_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc13_1.1 +// CHECK:STDOUT: .Self = constants.%Class.1 +// CHECK:STDOUT: .x = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%c.param_patt: %Class.3) -> %i32 { +// CHECK:STDOUT: fn @F(%c.param_patt: %Class.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %c.ref: %Class.2 = name_ref c, %c +// CHECK:STDOUT: %x.ref: %Class.elem.2 = name_ref x, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc16_11.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc16_11.2: %i32 = bind_value %.loc16_11.1 // CHECK:STDOUT: return %.loc16_11.2 @@ -176,15 +176,15 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: generic fn @G(%T.loc19_6.1: type) { // CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc19_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %Class.loc19_26.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_26.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc19_26.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_26.2 (constants.%Class.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_26.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @G.%Class.loc19_26.2 (%Class.1), @G.%T.loc19_6.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_26.2 (%Class.2)) -> @G.%T.loc19_6.2 (%T) { +// CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_26.2 (%Class.1)) -> @G.%T.loc19_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @G.%Class.loc19_26.2 (%Class.2) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @G.%.loc20_11.3 (%.1) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %c.ref: @G.%Class.loc19_26.2 (%Class.1) = name_ref c, %c +// CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.1) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc20_11.1: ref @G.%T.loc19_6.2 (%T) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc20_11.2: @G.%T.loc19_6.2 (%T) = bind_value %.loc20_11.1 // CHECK:STDOUT: return %.loc20_11.2 @@ -194,15 +194,15 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: generic fn @H(%U.loc23_6.1: type) { // CHECK:STDOUT: %U.loc23_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc23_6.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc23_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] -// CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.4)] +// CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_26.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.10)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @H.%Class.loc23_26.2 (%Class.3), @H.%U.loc23_6.2 (%U) [symbolic = %Class.elem (constants.%Class.elem.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_26.2 (%Class.4)) -> @H.%U.loc23_6.2 (%U) { +// CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_26.2 (%Class.3)) -> @H.%U.loc23_6.2 (%U) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @H.%Class.loc23_26.2 (%Class.4) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @H.%.loc24_11.3 (%.10) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %c.ref: @H.%Class.loc23_26.2 (%Class.3) = name_ref c, %c +// CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.3) = name_ref x, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc24_11.1: ref @H.%U.loc23_6.2 (%U) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc24_11.2: @H.%U.loc23_6.2 (%U) = bind_value %.loc24_11.1 // CHECK:STDOUT: return %.loc24_11.2 @@ -214,10 +214,10 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.1 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.2 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.3 +// CHECK:STDOUT: %Class => constants.%Class.1 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.1 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.1 +// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc11_13.2) { @@ -230,10 +230,10 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.5 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.6 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.7 +// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) { @@ -244,7 +244,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc19_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc19_6.2 => constants.%T -// CHECK:STDOUT: %Class.loc19_26.2 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc19_26.2 => constants.%Class.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { @@ -252,10 +252,10 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.4 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.10 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.11 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.12 +// CHECK:STDOUT: %Class => constants.%Class.3 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.3 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.3 +// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) { @@ -266,6 +266,6 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: specific @H(constants.%U) { // CHECK:STDOUT: %U.loc23_6.2 => constants.%U // CHECK:STDOUT: %U.patt.loc23_6.2 => constants.%U -// CHECK:STDOUT: %Class.loc23_26.2 => constants.%Class.4 +// CHECK:STDOUT: %Class.loc23_26.2 => constants.%Class.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 7a09fe9623180..65985ebefa283 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -90,28 +90,28 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] -// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] +// CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -133,14 +133,14 @@ class Class(U:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.1] { +// CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.generic] { // CHECK:STDOUT: %T.patt.loc6_21.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_21.1, runtime_param [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -148,17 +148,17 @@ class Class(U:! type) { // CHECK:STDOUT: %T.loc6_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_21.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %return.patt: %CompleteClass.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %CompleteClass.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %CompleteClass.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_25) [template = constants.%i32] +// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc11_28.2: type = converted %int.make_type_signed, %.loc11_28.1 [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] +// CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -174,35 +174,35 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt.loc6_21.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.loc7_8.2 (constants.%.2)] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.1)] +// CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T.loc6_21.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed, %.loc7_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: @CompleteClass.%.loc7_8.2 (%.2) = field_decl n, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem) = field_decl n, element0 [template] // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed, %.loc8_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed, %.loc8_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%CompleteClass.2 -// CHECK:STDOUT: .n = %.loc7_8.1 +// CHECK:STDOUT: .Self = constants.%CompleteClass.1 +// CHECK:STDOUT: .n = %.loc7_8 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -211,18 +211,18 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_26: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_27.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_27.2: = bound_method %.loc8_26, %.loc8_27.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_27.3: = specific_function %.loc8_27.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_27.3(%.loc8_26) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc8_27.5: %i32 = converted %.loc8_26, %.loc8_27.4 [template = constants.%.32] -// CHECK:STDOUT: return %.loc8_27.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_0, %.loc8_27.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc8_27.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2() -> %CompleteClass.3; +// CHECK:STDOUT: fn @F.2() -> %CompleteClass.2; // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%T) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%T @@ -234,8 +234,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.loc7_8.2 => constants.%.2 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -266,102 +266,102 @@ class Class(U:! type) { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.17 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.17 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.27 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.27 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.34 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.21: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.22: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.23: = complete_type_witness %.22 [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [symbolic] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] -// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.24 [template] -// CHECK:STDOUT: %.25: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.26: = complete_type_witness %.25 [template] -// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] -// CHECK:STDOUT: %.27: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] +// CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.n.1: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n.1 [template] +// CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] +// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.28: type = unbound_element_type %CompleteClass.3, %i32 [template] +// CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: type = struct_type {.n: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.n.2: type = struct_type {.n: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.32: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.33: %.32 = assoc_entity element0, imports.%import_ref.10 [template] -// CHECK:STDOUT: %.34: %.2 = assoc_entity element0, imports.%import_ref.44 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.24) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.44 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.36: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.24) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %CompleteClass.val: %CompleteClass.2 = struct_value (%int_1.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1] +// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.42 // CHECK:STDOUT: .ImplicitAs = %import_ref.43 @@ -369,11 +369,11 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+73, unloaded -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.2) = import_ref Main//foo, inst+74, loaded [symbolic = @ImplicitAs.%.2 (constants.%.34)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Main//foo, inst+74, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)] // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+75, unloaded // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+116, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+117, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.9: = import_ref Main//foo, inst+118, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.9: = import_ref Main//foo, inst+118, loaded [symbolic = @impl.1.%interface (constants.%interface.1)] // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+89, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+142, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+143, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] @@ -400,7 +400,7 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+333, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+334, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+335, unloaded -// CHECK:STDOUT: %import_ref.38: = import_ref Main//foo, inst+55, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.38: = import_ref Main//foo, inst+55, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+25, unloaded // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+42, unloaded // CHECK:STDOUT: %import_ref.41 = import_ref Main//foo, inst+51, unloaded @@ -416,7 +416,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4, runtime_param [symbolic = constants.%T.patt] // CHECK:STDOUT: } { @@ -424,17 +424,17 @@ class Class(U:! type) { // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %return.patt: %CompleteClass.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %CompleteClass.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %CompleteClass.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.24] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_25) [template = constants.%i32] +// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc8_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc8_28.2: type = converted %int.make_type_signed, %.loc8_28.1 [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] +// CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -447,8 +447,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -467,8 +467,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.27 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -487,7 +487,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -504,7 +504,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 { // CHECK:STDOUT: !members: @@ -520,7 +520,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 { // CHECK:STDOUT: !members: @@ -536,7 +536,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 { // CHECK:STDOUT: !members: @@ -553,7 +553,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 { // CHECK:STDOUT: !members: @@ -570,7 +570,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 { // CHECK:STDOUT: !members: @@ -586,7 +586,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 { // CHECK:STDOUT: !members: @@ -602,7 +602,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 { // CHECK:STDOUT: !members: @@ -615,20 +615,20 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.21)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.22)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.22) [symbolic = %.loc6_1.3 (constants.%.23)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.1 (%T) [symbolic = %Class.elem (constants.%Class.elem)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.21) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.22 [symbolic = %.loc6_1.3 (constants.%.23)] +// CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .x = %.loc5_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -637,8 +637,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.27)] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)] +// CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -655,9 +655,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -700,9 +700,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -747,19 +747,19 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2() -> %return: %CompleteClass.3 { +// CHECK:STDOUT: fn @F.2() -> %return: %CompleteClass.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_16: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_17.1: %.31 = struct_literal (%.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: %Convert.type.13 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_17.3: = bound_method %.loc9_16, %.loc9_17.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_17.4: = specific_function %.loc9_17.3, @Convert.2(constants.%.24) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_17.4(%.loc9_16) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_17.5: init %i32 = converted %.loc9_16, %int.convert_checked [template = constants.%.38] -// CHECK:STDOUT: %.loc9_17.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_17.7: init %i32 = initialize_from %.loc9_17.5 to %.loc9_17.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_17.8: init %CompleteClass.3 = class_init (%.loc9_17.7), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc9_18: init %CompleteClass.3 = converted %.loc9_17.1, %.loc9_17.8 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_17.1: %struct_type.n.2 = struct_literal (%int_1) +// CHECK:STDOUT: %impl.elem0: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_17.2: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_17.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc9_17.4: init %i32 = initialize_from %.loc9_17.2 to %.loc9_17.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_17.5: init %CompleteClass.2 = class_init (%.loc9_17.4), %return [template = constants.%CompleteClass.val] +// CHECK:STDOUT: %.loc9_18: init %CompleteClass.2 = converted %.loc9_17.1, %.loc9_17.5 [template = constants.%CompleteClass.val] // CHECK:STDOUT: return %.loc9_18 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -806,7 +806,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -852,8 +852,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -933,7 +933,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -979,8 +979,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1032,8 +1032,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.27 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -1050,8 +1050,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.28 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 // CHECK:STDOUT: } @@ -1065,24 +1065,24 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.32 -// CHECK:STDOUT: %.2 => constants.%.33 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.24) { -// CHECK:STDOUT: %N => constants.%.24 -// CHECK:STDOUT: %N.patt => constants.%.24 +// CHECK:STDOUT: specific @impl.1(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.35 +// CHECK:STDOUT: %interface => constants.%interface.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.24) { -// CHECK:STDOUT: %N => constants.%.24 +// CHECK:STDOUT: specific @Convert.2(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1091,45 +1091,45 @@ class Class(U:! type) { // CHECK:STDOUT: --- use_foo.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %UseMethod.type: type = fn_type @UseMethod [template] // CHECK:STDOUT: %UseMethod: %UseMethod.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] -// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] +// CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %CompleteClass.3, %i32 [template] +// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] +// CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %F.2, @F.1(%i32) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.2, @F.1(%i32) [template] // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [template] // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded -// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1] +// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+377, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.4 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//foo, inst+55, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//foo, inst+55, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+25, unloaded -// CHECK:STDOUT: %import_ref.7: @CompleteClass.%.1 (%.4) = import_ref Main//foo, inst+42, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.1) = import_ref Main//foo, inst+42, loaded [template = %.1] // CHECK:STDOUT: %import_ref.8: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, inst+51, loaded [symbolic = @CompleteClass.%F (constants.%F.1)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1148,10 +1148,10 @@ class Class(U:! type) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5, %.loc5_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5, %.loc5_19.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1159,10 +1159,10 @@ class Class(U:! type) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_18.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_18.3: type = converted %int.make_type_signed.loc10, %.loc10_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_18.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_18.2: type = converted %int.make_type_signed.loc10, %.loc10_18.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1173,8 +1173,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)] +// CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -1189,23 +1189,23 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @UseMethod() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_24) [template = constants.%i32] +// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] // CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6, %.loc6_27.1 [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v -// CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] +// CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v +// CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc6_7: ref %CompleteClass.3 = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc6: init %CompleteClass.3 = call %F.ref.loc6() to %.loc6_7 +// CHECK:STDOUT: %.loc6_7: ref %CompleteClass.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc6: init %CompleteClass.2 = call %F.ref.loc6() to %.loc6_7 // CHECK:STDOUT: assign %v.var, %F.call.loc6 -// CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v -// CHECK:STDOUT: %.loc7_11.1: %F.type.2 = specific_constant imports.%import_ref.8, @CompleteClass(constants.%i32) [template = constants.%F.2] -// CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11.1 [template = constants.%F.2] -// CHECK:STDOUT: %.loc7_11.2: = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%.7] -// CHECK:STDOUT: %F.call.loc7: init %i32 = call %.loc7_11.2() +// CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v +// CHECK:STDOUT: %.loc7_11: %F.type.2 = specific_constant imports.%import_ref.8, @CompleteClass(constants.%i32) [template = constants.%F.2] +// CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11 [template = constants.%F.2] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call.loc7: init %i32 = call %F.specific_fn() // CHECK:STDOUT: %.loc7_15.1: %i32 = value_of_initializer %F.call.loc7 // CHECK:STDOUT: %.loc7_15.2: %i32 = converted %F.call.loc7, %.loc7_15.1 // CHECK:STDOUT: return %.loc7_15.2 @@ -1217,24 +1217,24 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2() -> %CompleteClass.3; +// CHECK:STDOUT: fn @F.2() -> %CompleteClass.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @UseField() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_24) [template = constants.%i32] +// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11, %.loc11_27.1 [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v -// CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] +// CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v +// CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc11_7: ref %CompleteClass.3 = splice_block %v.var {} -// CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc11_7 +// CHECK:STDOUT: %.loc11_7: ref %CompleteClass.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call: init %CompleteClass.2 = call %F.ref() to %.loc11_7 // CHECK:STDOUT: assign %v.var, %F.call -// CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v +// CHECK:STDOUT: %n.ref: %CompleteClass.elem.2 = name_ref n, imports.%import_ref.7 [template = imports.%.1] // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc12_11.2: %i32 = bind_value %.loc12_11.1 // CHECK:STDOUT: return %.loc12_11.2 @@ -1245,8 +1245,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -1263,8 +1263,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 // CHECK:STDOUT: } @@ -1279,28 +1279,28 @@ class Class(U:! type) { // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] -// CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] +// CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %i32 [template] -// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%.5) [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %CompleteClass.3, %i32 [template] -// CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%.5) [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template] +// CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%ptr.1) [template] +// CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%ptr.1) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %CompleteClass.4: type = class_type @CompleteClass, @CompleteClass(%i32) [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.4, %i32 [template] +// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] +// CHECK:STDOUT: %CompleteClass.elem.3: type = unbound_element_type %CompleteClass.3, %i32 [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] @@ -1311,52 +1311,52 @@ class Class(U:! type) { // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [symbolic] -// CHECK:STDOUT: %.18: = interface_witness (%Convert.5) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.5) [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.21: = interface_witness (%Convert.7) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.22: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.23: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic] -// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, imports.%import_ref.34 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.9) [symbolic] -// CHECK:STDOUT: %.26: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.11) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.11) [symbolic] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.29: type = assoc_entity_type %As.type.5, %Convert.type.12 [template] -// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.41 [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %As.type.5, %Convert.type.12 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.41 [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.13) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.13) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded -// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1] +// CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+377, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.8 @@ -1364,7 +1364,7 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//foo, inst+55, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//foo, inst+55, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+25, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+42, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//foo, inst+51, unloaded @@ -1420,8 +1420,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.23)] -// CHECK:STDOUT: %.2: @As.%.1 (%.23) = assoc_entity element0, imports.%import_ref.34 [symbolic = %.2 (constants.%.24)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.4)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.4) = assoc_entity element0, imports.%import_ref.34 [symbolic = %assoc0 (constants.%assoc0.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1440,7 +1440,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -1457,7 +1457,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 { // CHECK:STDOUT: !members: @@ -1473,7 +1473,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.5)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.5) = struct_value () [symbolic = %Convert (constants.%Convert.5)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.18)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.21 as imports.%import_ref.22 { // CHECK:STDOUT: !members: @@ -1489,7 +1489,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.21)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -1506,7 +1506,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.25)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 { // CHECK:STDOUT: !members: @@ -1523,7 +1523,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.27)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 { // CHECK:STDOUT: !members: @@ -1539,7 +1539,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.11)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.28)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.38 as imports.%import_ref.39 { // CHECK:STDOUT: !members: @@ -1555,7 +1555,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.13)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.31)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.42 as imports.%import_ref.43 { // CHECK:STDOUT: !members: @@ -1568,8 +1568,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)] +// CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -1584,19 +1584,19 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_24) [template = constants.%i32] +// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed, %.loc14_27.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.5) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v -// CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%ptr.1) [template = constants.%CompleteClass.2] +// CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v +// CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc14_34: ref %CompleteClass.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_34 -// CHECK:STDOUT: %.loc14_35: %CompleteClass.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc14_34: ref %CompleteClass.3 = temporary_storage +// CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc14_34 +// CHECK:STDOUT: %.loc14_35: %CompleteClass.2 = converted %F.call, [template = ] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1607,7 +1607,7 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2() -> %CompleteClass.4; +// CHECK:STDOUT: fn @F.2() -> %CompleteClass.3; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] @@ -1649,9 +1649,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.22)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.22)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1695,8 +1695,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -1708,13 +1708,13 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%.5) { -// CHECK:STDOUT: %T => constants.%.5 -// CHECK:STDOUT: %T.patt => constants.%.5 +// CHECK:STDOUT: specific @CompleteClass(constants.%ptr.1) { +// CHECK:STDOUT: %T => constants.%ptr.1 +// CHECK:STDOUT: %T.patt => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 // CHECK:STDOUT: } @@ -1724,8 +1724,8 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.4 -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 +// CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.3 // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 // CHECK:STDOUT: } @@ -1845,7 +1845,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.26 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1891,8 +1891,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.12 // CHECK:STDOUT: %Convert => constants.%Convert.12 -// CHECK:STDOUT: %.1 => constants.%.29 -// CHECK:STDOUT: %.2 => constants.%.30 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1943,70 +1943,70 @@ class Class(U:! type) { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.17 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.17 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.27 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.27 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.34 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.21: %.type = struct_value () [template] -// CHECK:STDOUT: %.22: type = class_type @.1, @.1(%U) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%U) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+9, loaded [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+9, loaded [template = constants.%Class.generic] // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+20, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+377, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { @@ -2057,7 +2057,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.21] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %U.patt.loc12_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc12_13.1, runtime_param [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -2075,8 +2075,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2095,8 +2095,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.27 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2115,7 +2115,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -2132,7 +2132,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 { // CHECK:STDOUT: !members: @@ -2148,7 +2148,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 { // CHECK:STDOUT: !members: @@ -2164,7 +2164,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 { // CHECK:STDOUT: !members: @@ -2181,7 +2181,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 { // CHECK:STDOUT: !members: @@ -2198,7 +2198,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 { // CHECK:STDOUT: !members: @@ -2214,7 +2214,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 { // CHECK:STDOUT: !members: @@ -2230,7 +2230,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 { // CHECK:STDOUT: !members: @@ -2254,12 +2254,12 @@ class Class(U:! type) { // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %.loc16: = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness [template = ] +// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.22 +// CHECK:STDOUT: .Self = constants.%.1 // CHECK:STDOUT: .x = %.loc16 -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2267,9 +2267,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2312,9 +2312,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2396,7 +2396,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2442,8 +2442,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2523,7 +2523,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2569,8 +2569,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 847d095f078d8..41fa787d3027b 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -48,23 +48,23 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.k: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem.1: type = unbound_element_type %Class.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.k.1: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.k.1 [symbolic] // CHECK:STDOUT: %InitFromStructGeneric.type: type = fn_type @InitFromStructGeneric [template] // CHECK:STDOUT: %InitFromStructGeneric: %InitFromStructGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %InitFromStructSpecific.type: type = fn_type @InitFromStructSpecific [template] // CHECK:STDOUT: %InitFromStructSpecific: %InitFromStructSpecific.type = struct_value () [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%i32) [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Class.3, %i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] +// CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] +// CHECK:STDOUT: %struct_type.k.2: type = struct_type {.k: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.k.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,7 +83,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: .InitFromStructSpecific = %InitFromStructSpecific.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -113,14 +113,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_30.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed.loc13_30: init type = call constants.%Int(%.loc13_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.2: type = value_of_initializer %int.make_type_signed.loc13_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.3: type = converted %int.make_type_signed.loc13_30, %.loc13_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_38.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed.loc13_38: init type = call constants.%Int(%.loc13_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_38.2: type = value_of_initializer %int.make_type_signed.loc13_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_38.3: type = converted %int.make_type_signed.loc13_38, %.loc13_38.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_30: init type = call constants.%Int(%int_32.loc13_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_signed.loc13_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_signed.loc13_30, %.loc13_30.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_38: init type = call constants.%Int(%int_32.loc13_38) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_38.1: type = value_of_initializer %int.make_type_signed.loc13_38 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_38.2: type = converted %int.make_type_signed.loc13_38, %.loc13_38.1 [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -133,20 +133,20 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.k: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class.1), @Class.%T.loc4_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @Class.%T.loc4_13.2 (%T)} [symbolic = %struct_type.k (constants.%struct_type.k.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.k (%struct_type.k.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.1) = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem.1) = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.k.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .k = %.loc5_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%Class.1 +// CHECK:STDOUT: .k = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -155,26 +155,26 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc8_26.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class.loc9_17.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_17.2 (constants.%Class.2)] -// CHECK:STDOUT: %.loc9_28.5: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %.loc9_28.5 (constants.%.2)] -// CHECK:STDOUT: %.loc10_11.3: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %.loc10_11.3 (constants.%.1)] +// CHECK:STDOUT: %Class.loc9_17.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_17.2 (constants.%Class.1)] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %struct_type.k (constants.%struct_type.k.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @InitFromStructGeneric.%T.loc8_26.2 (%T)) -> @InitFromStructGeneric.%T.loc8_26.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = 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.generic] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc9_17.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc9_17.2 (constants.%Class.2)] -// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = var v -// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = bind_name v, %v.var +// CHECK:STDOUT: %Class.loc9_17.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc9_17.2 (constants.%Class.1)] +// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = var v +// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = bind_name v, %v.var // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.loc8_26.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_28.1: @InitFromStructGeneric.%.loc9_28.5 (%.2) = struct_literal (%x.ref) +// CHECK:STDOUT: %.loc9_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.1) = struct_literal (%x.ref) // CHECK:STDOUT: %.loc9_28.2: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc9_28.3: init @InitFromStructGeneric.%T.loc8_26.2 (%T) = initialize_from %x.ref to %.loc9_28.2 -// CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = class_init (%.loc9_28.3), %v.var -// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = converted %.loc9_28.1, %.loc9_28.4 +// CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = class_init (%.loc9_28.3), %v.var +// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = converted %.loc9_28.1, %.loc9_28.4 // CHECK:STDOUT: assign %v.var, %.loc9_29 -// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = name_ref v, %v -// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%.loc10_11.3 (%.1) = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] +// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = name_ref v, %v +// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.1) = name_ref k, @Class.%.loc5 [template = @Class.%.loc5] // CHECK:STDOUT: %.loc10_11.1: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc10_11.2: @InitFromStructGeneric.%T.loc8_26.2 (%T) = bind_value %.loc10_11.1 // CHECK:STDOUT: return %.loc10_11.2 @@ -183,23 +183,23 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @InitFromStructSpecific(%x.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] // CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] // CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14, %.loc14_19.1 [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] -// CHECK:STDOUT: %v.var: ref %Class.3 = var v -// CHECK:STDOUT: %v: ref %Class.3 = bind_name v, %v.var +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %v.var: ref %Class.2 = var v +// CHECK:STDOUT: %v: ref %Class.2 = bind_name v, %v.var // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x -// CHECK:STDOUT: %.loc14_30.1: %.7 = struct_literal (%x.ref) +// CHECK:STDOUT: %.loc14_30.1: %struct_type.k.2 = struct_literal (%x.ref) // CHECK:STDOUT: %.loc14_30.2: ref %i32 = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc14_30.3: init %i32 = initialize_from %x.ref to %.loc14_30.2 -// CHECK:STDOUT: %.loc14_30.4: init %Class.3 = class_init (%.loc14_30.3), %v.var -// CHECK:STDOUT: %.loc14_31: init %Class.3 = converted %.loc14_30.1, %.loc14_30.4 +// CHECK:STDOUT: %.loc14_30.4: init %Class.2 = class_init (%.loc14_30.3), %v.var +// CHECK:STDOUT: %.loc14_31: init %Class.2 = converted %.loc14_30.1, %.loc14_30.4 // CHECK:STDOUT: assign %v.var, %.loc14_31 -// CHECK:STDOUT: %v.ref: ref %Class.3 = name_ref v, %v -// CHECK:STDOUT: %k.ref: %.6 = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] +// CHECK:STDOUT: %v.ref: ref %Class.2 = name_ref v, %v +// CHECK:STDOUT: %k.ref: %Class.elem.2 = name_ref k, @Class.%.loc5 [template = @Class.%.loc5] // CHECK:STDOUT: %.loc15_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc15_11.2: %i32 = bind_value %.loc15_11.1 // CHECK:STDOUT: return %.loc15_11.2 @@ -210,10 +210,10 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.1 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.2 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.3 +// CHECK:STDOUT: %Class => constants.%Class.1 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.1 +// CHECK:STDOUT: %struct_type.k => constants.%struct_type.k.1 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc4_13.2) { @@ -236,10 +236,10 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.7 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.8 +// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 +// CHECK:STDOUT: %struct_type.k => constants.%struct_type.k.2 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon @@ -248,19 +248,19 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Adapt.type: type = generic_class_type @Adapt [template] -// CHECK:STDOUT: %Adapt.1: %Adapt.type = struct_value () [template] -// CHECK:STDOUT: %Adapt.2: type = class_type @Adapt, @Adapt(%T) [symbolic] -// CHECK:STDOUT: %.1: = complete_type_witness %T [symbolic] +// CHECK:STDOUT: %Adapt.generic: %Adapt.type = struct_value () [template] +// CHECK:STDOUT: %Adapt.1: type = class_type @Adapt, @Adapt(%T) [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %T [symbolic] // CHECK:STDOUT: %InitFromAdaptedGeneric.type: type = fn_type @InitFromAdaptedGeneric [template] // CHECK:STDOUT: %InitFromAdaptedGeneric: %InitFromAdaptedGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %InitFromAdaptedSpecific.type: type = fn_type @InitFromAdaptedSpecific [template] // CHECK:STDOUT: %InitFromAdaptedSpecific: %InitFromAdaptedSpecific.type = struct_value () [template] -// CHECK:STDOUT: %Adapt.3: type = class_type @Adapt, @Adapt(%i32) [template] -// CHECK:STDOUT: %.3: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %Adapt.2: type = class_type @Adapt, @Adapt(%i32) [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -279,7 +279,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: .InitFromAdaptedSpecific = %InitFromAdaptedSpecific.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Adapt.decl: %Adapt.type = class_decl @Adapt [template = constants.%Adapt.1] { +// CHECK:STDOUT: %Adapt.decl: %Adapt.type = class_decl @Adapt [template = constants.%Adapt.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -309,14 +309,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_31.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc12_31: init type = call constants.%Int(%.loc12_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_31.2: type = value_of_initializer %int.make_type_signed.loc12_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_31.3: type = converted %int.make_type_signed.loc12_31, %.loc12_31.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_39.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc12_39: init type = call constants.%Int(%.loc12_39.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_39.2: type = value_of_initializer %int.make_type_signed.loc12_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_39.3: type = converted %int.make_type_signed.loc12_39, %.loc12_39.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_31: init type = call constants.%Int(%int_32.loc12_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_31.1: type = value_of_initializer %int.make_type_signed.loc12_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_31.2: type = converted %int.make_type_signed.loc12_31, %.loc12_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_39: init type = call constants.%Int(%int_32.loc12_39) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_39.1: type = value_of_initializer %int.make_type_signed.loc12_39 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_39.2: type = converted %int.make_type_signed.loc12_39, %.loc12_39.1 [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -329,16 +329,16 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2: = complete_type_witness @Adapt.%T.loc4_13.2 (%T) [symbolic = %.loc6_1.2 (constants.%.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Adapt.%T.loc4_13.2 (%T) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: adapt_decl %T.ref [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %T [symbolic = %.loc6_1.2 (constants.%.1)] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %T [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Adapt.2 -// CHECK:STDOUT: complete_type_witness = %.loc6_1.1 +// CHECK:STDOUT: .Self = constants.%Adapt.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -347,16 +347,16 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc8_27.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_27.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Adapt.loc9_23.2: type = class_type @Adapt, @Adapt(%T.loc8_27.2) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.2)] +// CHECK:STDOUT: %Adapt.loc9_23.2: type = class_type @Adapt, @Adapt(%T.loc8_27.2) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T)) -> @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.1] +// CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.generic] // CHECK:STDOUT: %T.ref.loc9_22: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] -// CHECK:STDOUT: %Adapt.loc9_23.1: type = class_type @Adapt, @Adapt(constants.%T) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.2)] -// CHECK:STDOUT: %.loc9_13.1: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.2) = as_compatible %x.ref -// CHECK:STDOUT: %.loc9_13.2: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.2) = converted %x.ref, %.loc9_13.1 +// CHECK:STDOUT: %Adapt.loc9_23.1: type = class_type @Adapt, @Adapt(constants.%T) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.1)] +// CHECK:STDOUT: %.loc9_13.1: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.1) = as_compatible %x.ref +// CHECK:STDOUT: %.loc9_13.2: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.1) = converted %x.ref, %.loc9_13.1 // CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %.loc9_26.1: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = as_compatible %.loc9_13.2 // CHECK:STDOUT: %.loc9_26.2: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = converted %.loc9_13.2, %.loc9_26.1 @@ -367,18 +367,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: fn @InitFromAdaptedSpecific(%x.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x -// CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.1] -// CHECK:STDOUT: %.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13_22: init type = call constants.%Int(%.loc13_22) [template = constants.%i32] +// CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.generic] +// CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_22: init type = call constants.%Int(%int_32.loc13_22) [template = constants.%i32] // CHECK:STDOUT: %.loc13_25.1: type = value_of_initializer %int.make_type_signed.loc13_22 [template = constants.%i32] // CHECK:STDOUT: %.loc13_25.2: type = converted %int.make_type_signed.loc13_22, %.loc13_25.1 [template = constants.%i32] -// CHECK:STDOUT: %Adapt: type = class_type @Adapt, @Adapt(constants.%i32) [template = constants.%Adapt.3] -// CHECK:STDOUT: %.loc13_13.1: %Adapt.3 = as_compatible %x.ref -// CHECK:STDOUT: %.loc13_13.2: %Adapt.3 = converted %x.ref, %.loc13_13.1 -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed.loc13_31, %.loc13_31.2 [template = constants.%i32] +// CHECK:STDOUT: %Adapt: type = class_type @Adapt, @Adapt(constants.%i32) [template = constants.%Adapt.2] +// CHECK:STDOUT: %.loc13_13.1: %Adapt.2 = as_compatible %x.ref +// CHECK:STDOUT: %.loc13_13.2: %Adapt.2 = converted %x.ref, %.loc13_13.1 +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] // CHECK:STDOUT: %.loc13_28.1: %i32 = as_compatible %.loc13_13.2 // CHECK:STDOUT: %.loc13_28.2: %i32 = converted %.loc13_13.2, %.loc13_28.1 // CHECK:STDOUT: return %.loc13_28.2 @@ -389,7 +389,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2 => constants.%.1 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InitFromAdaptedGeneric(constants.%T) { @@ -407,6 +407,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2 => constants.%.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 4c832f216d1a6..e28cf65eae066 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -54,37 +54,37 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem.1: type = unbound_element_type %Class.1, %T [symbolic] // CHECK:STDOUT: %Get.type.1: type = fn_type @Get, @Class(%T) [symbolic] // CHECK:STDOUT: %Get.1: %Get.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class.1 [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %GetAddr.type.1: type = fn_type @GetAddr, @Class(%T) [symbolic] // CHECK:STDOUT: %GetAddr.1: %GetAddr.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [symbolic] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%i32) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] // CHECK:STDOUT: %DirectFieldAccess.type: type = fn_type @DirectFieldAccess [template] // CHECK:STDOUT: %DirectFieldAccess: %DirectFieldAccess.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Class.3, %i32 [template] +// CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] // CHECK:STDOUT: %Get.type.2: type = fn_type @Get, @Class(%i32) [template] // CHECK:STDOUT: %Get.2: %Get.type.2 = struct_value () [template] // CHECK:STDOUT: %GetAddr.type.2: type = fn_type @GetAddr, @Class(%i32) [template] // CHECK:STDOUT: %GetAddr.2: %GetAddr.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %MethodCall.type: type = fn_type @MethodCall [template] // CHECK:STDOUT: %MethodCall: %MethodCall.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = ptr_type %Class.3 [template] +// CHECK:STDOUT: %ptr.5: type = ptr_type %Class.2 [template] // CHECK:STDOUT: %AddrMethodCall.type: type = fn_type @AddrMethodCall [template] // CHECK:STDOUT: %AddrMethodCall: %AddrMethodCall.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = ptr_type %i32 [template] +// CHECK:STDOUT: %ptr.6: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +104,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: .AddrMethodCall = %AddrMethodCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc2_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc2_13.1, runtime_param [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -112,66 +112,66 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T.loc2_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc2_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %DirectFieldAccess.decl: %DirectFieldAccess.type = fn_decl @DirectFieldAccess [template = constants.%DirectFieldAccess] { -// CHECK:STDOUT: %x.patt: %Class.3 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %Class.3 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %Class.2 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %Class.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc10_31: init type = call constants.%Int(%.loc10_31) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_31: init type = call constants.%Int(%int_32.loc10_31) [template = constants.%i32] // CHECK:STDOUT: %.loc10_34.1: type = value_of_initializer %int.make_type_signed.loc10_31 [template = constants.%i32] // CHECK:STDOUT: %.loc10_34.2: type = converted %int.make_type_signed.loc10_31, %.loc10_34.1 [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc10_40.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc10_40: init type = call constants.%Int(%.loc10_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_40.2: type = value_of_initializer %int.make_type_signed.loc10_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_40.3: type = converted %int.make_type_signed.loc10_40, %.loc10_40.2 [template = constants.%i32] -// CHECK:STDOUT: %x.param: %Class.3 = value_param runtime_param0 -// CHECK:STDOUT: %x: %Class.3 = bind_name x, %x.param +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %int_32.loc10_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_40: init type = call constants.%Int(%int_32.loc10_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_40.1: type = value_of_initializer %int.make_type_signed.loc10_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_40.2: type = converted %int.make_type_signed.loc10_40, %.loc10_40.1 [template = constants.%i32] +// CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MethodCall.decl: %MethodCall.type = fn_decl @MethodCall [template = constants.%MethodCall] { -// CHECK:STDOUT: %x.patt: %Class.3 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %Class.3 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %Class.2 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %Class.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%.loc14_24) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%int_32.loc14_24) [template = constants.%i32] // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed.loc14_24, %.loc14_27.1 [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc14_33.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc14_33: init type = call constants.%Int(%.loc14_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_33.2: type = value_of_initializer %int.make_type_signed.loc14_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_33.3: type = converted %int.make_type_signed.loc14_33, %.loc14_33.2 [template = constants.%i32] -// CHECK:STDOUT: %x.param: %Class.3 = value_param runtime_param0 -// CHECK:STDOUT: %x: %Class.3 = bind_name x, %x.param +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %int_32.loc14_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_33: init type = call constants.%Int(%int_32.loc14_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %int.make_type_signed.loc14_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_33.2: type = converted %int.make_type_signed.loc14_33, %.loc14_33.1 [template = constants.%i32] +// CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AddrMethodCall.decl: %AddrMethodCall.type = fn_decl @AddrMethodCall [template = constants.%AddrMethodCall] { -// CHECK:STDOUT: %p.patt: %.12 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.12 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.5 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.5 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%.loc18_28) [template = constants.%i32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%int_32.loc18_28) [template = constants.%i32] // CHECK:STDOUT: %.loc18_31.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i32] // CHECK:STDOUT: %.loc18_31.2: type = converted %int.make_type_signed.loc18_28, %.loc18_31.1 [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc18_32: type = ptr_type %Class.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc18_38.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc18_38: init type = call constants.%Int(%.loc18_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_38.2: type = value_of_initializer %int.make_type_signed.loc18_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_38.3: type = converted %int.make_type_signed.loc18_38, %.loc18_38.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.12 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.12 = bind_name p, %p.param +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %ptr: type = ptr_type %Class.2 [template = constants.%ptr.5] +// CHECK:STDOUT: %int_32.loc18_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_38: init type = call constants.%Int(%int_32.loc18_38) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_38.1: type = value_of_initializer %int.make_type_signed.loc18_38 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_38.2: type = converted %int.make_type_signed.loc18_38, %.loc18_38.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.5 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -182,71 +182,71 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T.patt.loc2_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc2_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc2_13.2 (%T) [symbolic = %.loc3_8.2 (constants.%.1)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc2_13.2) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class.1), @Class.%T.loc2_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: %Get.type: type = fn_type @Get, @Class(%T.loc2_13.2) [symbolic = %Get.type (constants.%Get.type.1)] // CHECK:STDOUT: %Get: @Class.%Get.type (%Get.type.1) = struct_value () [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T.loc2_13.2) [symbolic = %GetAddr.type (constants.%GetAddr.type.1)] // CHECK:STDOUT: %GetAddr: @Class.%GetAddr.type (%GetAddr.type.1) = struct_value () [symbolic = %GetAddr (constants.%GetAddr.1)] -// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.x: @Class.%T.loc2_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.4)] -// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.4) [symbolic = %.loc8_1.3 (constants.%.5)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.loc2_13.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc8_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc8_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_13.1 [symbolic = %T.loc2_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc3_8.1: @Class.%.loc3_8.2 (%.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc3: @Class.%Class.elem (%Class.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = @Class.%Get (constants.%Get.1)] { -// CHECK:STDOUT: %self.patt: @Get.%Class (%Class.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Get.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Get.%Class (%Class.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Get.%Class (%Class.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Get.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Get.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_16: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_16 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc5_16: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_16 [symbolic = %Class (constants.%Class.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Get.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Get.%Class (%Class.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Get.%Class (%Class.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Get.%Class (%Class.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Get.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Get.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetAddr.decl: @Class.%GetAddr.type (%GetAddr.type.1) = fn_decl @GetAddr [symbolic = @Class.%GetAddr (constants.%GetAddr.1)] { -// CHECK:STDOUT: %self.patt: @GetAddr.%.loc7_29.1 (%.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc7_29.1 (%.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc7_14: auto = addr_pattern %self.param_patt -// CHECK:STDOUT: %return.patt: @GetAddr.%.loc7_38.1 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc7_38.1 (%.3) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @GetAddr.%ptr.loc7_38.1 (%ptr.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GetAddr.%ptr.loc7_38.1 (%ptr.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc7_25 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_29.2: type = ptr_type %Class.2 [symbolic = %.loc7_29.1 (constants.%.2)] +// CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc7_25 [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %ptr.loc7_29.2: type = ptr_type %Class.1 [symbolic = %ptr.loc7_29.1 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc7_38.2: type = ptr_type %T [symbolic = %.loc7_38.1 (constants.%.3)] -// CHECK:STDOUT: %self.param: @GetAddr.%.loc7_29.1 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @GetAddr.%.loc7_29.1 (%.2) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc7_38.1 (%.3) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @GetAddr.%.loc7_38.1 (%.3) = return_slot %return.param +// CHECK:STDOUT: %ptr.loc7_38.2: type = ptr_type %T [symbolic = %ptr.loc7_38.1 (constants.%ptr.2)] +// CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc7_38.1 (%ptr.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc7_38.1 (%ptr.2) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.4 [symbolic = %.loc8_1.3 (constants.%.5)] +// CHECK:STDOUT: %complete_type.loc8_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc8_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .x = %.loc3_8.1 +// CHECK:STDOUT: .Self = constants.%Class.1 +// CHECK:STDOUT: .x = %.loc3 // CHECK:STDOUT: .Get = %Get.decl // CHECK:STDOUT: .GetAddr = %GetAddr.decl -// CHECK:STDOUT: complete_type_witness = %.loc8_1.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc8_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Get(@Class.%T.loc2_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc5_42.3: type = unbound_element_type @Get.%Class (%Class.2), @Get.%T (%T) [symbolic = %.loc5_42.3 (constants.%.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Get.%Class (%Class.1), @Get.%T (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Get.%Class (%Class.2)]() -> @Get.%T (%T) { +// CHECK:STDOUT: fn[%self.param_patt: @Get.%Class (%Class.1)]() -> @Get.%T (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @Get.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %x.ref: @Get.%.loc5_42.3 (%.1) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %self.ref: @Get.%Class (%Class.1) = name_ref self, %self +// CHECK:STDOUT: %x.ref: @Get.%Class.elem (%Class.elem.1) = name_ref x, @Class.%.loc3 [template = @Class.%.loc3] // CHECK:STDOUT: %.loc5_42.1: ref @Get.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc5_42.2: @Get.%T (%T) = bind_value %.loc5_42.1 // CHECK:STDOUT: return %.loc5_42.2 @@ -255,58 +255,58 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc2_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc7_29.1 (constants.%.2)] -// CHECK:STDOUT: %.loc7_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc7_38.1 (constants.%.3)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %ptr.loc7_29.1: type = ptr_type @GetAddr.%Class (%Class.1) [symbolic = %ptr.loc7_29.1 (constants.%ptr.1)] +// CHECK:STDOUT: %ptr.loc7_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %ptr.loc7_38.1 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc7_54.3 (constants.%.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @GetAddr.%Class (%Class.1), @GetAddr.%T (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc7_29.1 (%.2)]() -> @GetAddr.%.loc7_38.1 (%.3) { +// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%ptr.loc7_29.1 (%ptr.1)]() -> @GetAddr.%ptr.loc7_38.1 (%ptr.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetAddr.%.loc7_29.1 (%.2) = name_ref self, %self -// CHECK:STDOUT: %.loc7_54.1: ref @GetAddr.%Class (%Class.2) = deref %self.ref -// CHECK:STDOUT: %x.ref: @GetAddr.%.loc7_54.3 (%.1) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %self.ref: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = name_ref self, %self +// CHECK:STDOUT: %.loc7_54.1: ref @GetAddr.%Class (%Class.1) = deref %self.ref +// CHECK:STDOUT: %x.ref: @GetAddr.%Class.elem (%Class.elem.1) = name_ref x, @Class.%.loc3 [template = @Class.%.loc3] // CHECK:STDOUT: %.loc7_54.2: ref @GetAddr.%T (%T) = class_element_access %.loc7_54.1, element0 -// CHECK:STDOUT: %.loc7_49: @GetAddr.%.loc7_38.1 (%.3) = addr_of %.loc7_54.2 -// CHECK:STDOUT: return %.loc7_49 +// CHECK:STDOUT: %addr: @GetAddr.%ptr.loc7_38.1 (%ptr.2) = addr_of %.loc7_54.2 +// CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @DirectFieldAccess(%x.param_patt: %Class.3) -> %i32 { +// CHECK:STDOUT: fn @DirectFieldAccess(%x.param_patt: %Class.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc11_10: %Class.3 = name_ref x, %x -// CHECK:STDOUT: %x.ref.loc11_11: %.8 = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %x.ref.loc11_10: %Class.2 = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc11_11: %Class.elem.2 = name_ref x, @Class.%.loc3 [template = @Class.%.loc3] // CHECK:STDOUT: %.loc11_11.1: ref %i32 = class_element_access %x.ref.loc11_10, element0 // CHECK:STDOUT: %.loc11_11.2: %i32 = bind_value %.loc11_11.1 // CHECK:STDOUT: return %.loc11_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MethodCall(%x.param_patt: %Class.3) -> %i32 { +// CHECK:STDOUT: fn @MethodCall(%x.param_patt: %Class.2) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %Class.3 = name_ref x, %x -// CHECK:STDOUT: %.loc15_11.1: %Get.type.2 = specific_constant @Class.%Get.decl, @Class(constants.%i32) [template = constants.%Get.2] -// CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc15_11.1 [template = constants.%Get.2] -// CHECK:STDOUT: %.loc15_11.2: = bound_method %x.ref, %Get.ref -// CHECK:STDOUT: %.loc15_11.3: = specific_function %.loc15_11.2, @Get(constants.%i32) -// CHECK:STDOUT: %Get.call: init %i32 = call %.loc15_11.3(%x.ref) +// CHECK:STDOUT: %x.ref: %Class.2 = name_ref x, %x +// CHECK:STDOUT: %.loc15_11: %Get.type.2 = specific_constant @Class.%Get.decl, @Class(constants.%i32) [template = constants.%Get.2] +// CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc15_11 [template = constants.%Get.2] +// CHECK:STDOUT: %Get.bound: = bound_method %x.ref, %Get.ref +// CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.bound, @Get(constants.%i32) +// CHECK:STDOUT: %Get.call: init %i32 = call %Get.specific_fn(%x.ref) // CHECK:STDOUT: %.loc15_17.1: %i32 = value_of_initializer %Get.call // CHECK:STDOUT: %.loc15_17.2: %i32 = converted %Get.call, %.loc15_17.1 // CHECK:STDOUT: return %.loc15_17.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AddrMethodCall(%p.param_patt: %.12) -> %i32 { +// CHECK:STDOUT: fn @AddrMethodCall(%p.param_patt: %ptr.5) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.12 = name_ref p, %p -// CHECK:STDOUT: %.loc19_12.1: ref %Class.3 = deref %p.ref +// CHECK:STDOUT: %p.ref: %ptr.5 = name_ref p, %p +// CHECK:STDOUT: %.loc19_12.1: ref %Class.2 = deref %p.ref // CHECK:STDOUT: %.loc19_12.2: %GetAddr.type.2 = specific_constant @Class.%GetAddr.decl, @Class(constants.%i32) [template = constants.%GetAddr.2] // CHECK:STDOUT: %GetAddr.ref: %GetAddr.type.2 = name_ref GetAddr, %.loc19_12.2 [template = constants.%GetAddr.2] -// CHECK:STDOUT: %.loc19_12.3: = bound_method %.loc19_12.1, %GetAddr.ref -// CHECK:STDOUT: %.loc19_12.4: = specific_function %.loc19_12.3, @GetAddr(constants.%i32) -// CHECK:STDOUT: %.loc19_12.5: %.12 = addr_of %.loc19_12.1 -// CHECK:STDOUT: %GetAddr.call: init %.13 = call %.loc19_12.4(%.loc19_12.5) -// CHECK:STDOUT: %.loc19_22.1: %.13 = value_of_initializer %GetAddr.call -// CHECK:STDOUT: %.loc19_22.2: %.13 = converted %GetAddr.call, %.loc19_22.1 +// CHECK:STDOUT: %GetAddr.bound: = bound_method %.loc19_12.1, %GetAddr.ref +// CHECK:STDOUT: %GetAddr.specific_fn: = specific_function %GetAddr.bound, @GetAddr(constants.%i32) +// CHECK:STDOUT: %addr: %ptr.5 = addr_of %.loc19_12.1 +// CHECK:STDOUT: %GetAddr.call: init %ptr.6 = call %GetAddr.specific_fn(%addr) +// CHECK:STDOUT: %.loc19_22.1: %ptr.6 = value_of_initializer %GetAddr.call +// CHECK:STDOUT: %.loc19_22.2: %ptr.6 = converted %GetAddr.call, %.loc19_22.1 // CHECK:STDOUT: %.loc19_10.1: ref %i32 = deref %.loc19_22.2 // CHECK:STDOUT: %.loc19_10.2: %i32 = bind_value %.loc19_10.1 // CHECK:STDOUT: return %.loc19_10.2 @@ -317,14 +317,14 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T.patt.loc2_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.1 +// CHECK:STDOUT: %Class => constants.%Class.1 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.1 // CHECK:STDOUT: %Get.type => constants.%Get.type.1 // CHECK:STDOUT: %Get => constants.%Get.1 // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type.1 // CHECK:STDOUT: %GetAddr => constants.%GetAddr.1 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.4 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.5 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.1 +// CHECK:STDOUT: %complete_type.loc8_1.2 => constants.%complete_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Get.%T) { @@ -334,7 +334,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Get(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetAddr.%T) { @@ -344,9 +344,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc7_29.1 => constants.%.2 -// CHECK:STDOUT: %.loc7_38.1 => constants.%.3 +// CHECK:STDOUT: %Class => constants.%Class.1 +// CHECK:STDOUT: %ptr.loc7_29.1 => constants.%ptr.1 +// CHECK:STDOUT: %ptr.loc7_38.1 => constants.%ptr.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc2_13.2) { @@ -359,32 +359,32 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T.patt.loc2_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.8 +// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: %Get.type => constants.%Get.type.2 // CHECK:STDOUT: %Get => constants.%Get.2 // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type.2 // CHECK:STDOUT: %GetAddr => constants.%GetAddr.2 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.9 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.10 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc8_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Get(constants.%i32) { // CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %Class => constants.%Class.3 +// CHECK:STDOUT: %Class => constants.%Class.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc5_42.3 => constants.%.8 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%i32) { // CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc7_29.1 => constants.%.12 -// CHECK:STDOUT: %.loc7_38.1 => constants.%.13 +// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %ptr.loc7_29.1 => constants.%ptr.5 +// CHECK:STDOUT: %ptr.loc7_38.1 => constants.%ptr.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.3 => constants.%.8 +// CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_static_member_fn_call.carbon @@ -393,16 +393,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T) [symbolic] // CHECK:STDOUT: %Make: %Make.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %Class.2 = struct_value () [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Class.val: %Class = struct_value () [symbolic] // CHECK:STDOUT: %StaticMemberFunctionCall.type: type = fn_type @StaticMemberFunctionCall [template] // CHECK:STDOUT: %StaticMemberFunctionCall: %StaticMemberFunctionCall.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %Make, @Make(%T) [symbolic] +// CHECK:STDOUT: %Make.specific_fn: = specific_function %Make, @Make(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -420,7 +420,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: .StaticMemberFunctionCall = %StaticMemberFunctionCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -430,16 +430,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %StaticMemberFunctionCall.decl: %StaticMemberFunctionCall.type = fn_decl @StaticMemberFunctionCall [template = constants.%StaticMemberFunctionCall] { // CHECK:STDOUT: %T.patt.loc8_29.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_29.1, runtime_param [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc8: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref.loc8: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc8_49.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc8_49.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_29.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -453,36 +453,36 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Make.decl: @Class.%Make.type (%Make.type) = fn_decl @Make [symbolic = @Class.%Make (constants.%Make)] { -// CHECK:STDOUT: %return.patt: @Make.%Class.loc5_23.1 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Make.%Class.loc5_23.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Make.%Class.loc5_23.1 (%Class) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Make.%Class.loc5_23.1 (%Class) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = 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.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc5_23.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc5_23.1 (constants.%Class.2)] -// CHECK:STDOUT: %return.param: ref @Make.%Class.loc5_23.1 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @Make.%Class.loc5_23.1 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %Class.loc5_23.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc5_23.1 (constants.%Class)] +// CHECK:STDOUT: %return.param: ref @Make.%Class.loc5_23.1 (%Class) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @Make.%Class.loc5_23.1 (%Class) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make(@Class.%T.loc4_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc5_23.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc5_23.1 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc5_23.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc5_23.1 (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @Make.%Class.loc5_23.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %Class.val: @Make.%Class.loc5_23.1 (%Class) = struct_value () [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @Make.%Class.loc5_23.1 (%Class.2) { +// CHECK:STDOUT: fn() -> %return: @Make.%Class.loc5_23.1 (%Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_35.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc5_35.2: init @Make.%Class.loc5_23.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] -// CHECK:STDOUT: %.loc5_36: init @Make.%Class.loc5_23.1 (%Class.2) = converted %.loc5_35.1, %.loc5_35.2 [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc5_35.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc5_35.2: init @Make.%Class.loc5_23.1 (%Class) = class_init (), %return [symbolic = %Class.val (constants.%Class.val)] +// CHECK:STDOUT: %.loc5_36: init @Make.%Class.loc5_23.1 (%Class) = converted %.loc5_35.1, %.loc5_35.2 [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: return %.loc5_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -490,24 +490,24 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: generic fn @StaticMemberFunctionCall(%T.loc8_29.1: type) { // CHECK:STDOUT: %T.loc8_29.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_29.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_29.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] -// CHECK:STDOUT: %Class.loc8_49.2: type = class_type @Class, @Class(%T.loc8_29.2) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc8_49.2: type = class_type @Class, @Class(%T.loc8_29.2) [symbolic = %Class.loc8_49.2 (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.loc8_29.2) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.loc15_18.3: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %.loc15_18.3 (constants.%.4)] +// CHECK:STDOUT: %Make.specific_fn.loc15_18.2: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %Make.specific_fn.loc15_18.2 (constants.%Make.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> %return: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> %return: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref.loc15: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref.loc15: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] -// CHECK:STDOUT: %.loc15_18.1: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18.1 [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.loc15_18.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc15_18.3 (constants.%.4)] -// CHECK:STDOUT: %.loc15_24: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = temporary_storage -// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = call %.loc15_18.2() to %.loc15_24 -// CHECK:STDOUT: %.loc15_25: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = converted %Make.call, [template = ] +// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)] +// CHECK:STDOUT: %.loc15_18: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] +// CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18 [symbolic = %Make (constants.%Make)] +// CHECK:STDOUT: %Make.specific_fn.loc15_18.1: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc15_18.2 (constants.%Make.specific_fn)] +// CHECK:STDOUT: %.loc15_24: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = temporary_storage +// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = call %Make.specific_fn.loc15_18.1() to %.loc15_24 +// CHECK:STDOUT: %.loc15_25: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = converted %Make.call, [template = ] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -528,10 +528,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct => constants.%struct +// CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc4_13.2) { @@ -547,11 +547,11 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) { // CHECK:STDOUT: %T.loc8_29.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_29.2 => constants.%T -// CHECK:STDOUT: %Class.loc8_49.2 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc8_49.2 => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(@StaticMemberFunctionCall.%T.loc8_29.2) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index dc44291ae75dd..6cc17eac9b334 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -44,15 +44,15 @@ class C(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ class C(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -86,10 +86,10 @@ class C(T:! type) { // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T.loc4_13.2) [symbolic = %G.type (constants.%G.type)] // CHECK:STDOUT: %G: @Class.%G.type (%G.type) = struct_value () [symbolic = %G (constants.%G)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc13_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc13_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc4_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %struct_type.n (constants.%struct_type.n)] +// CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.n (%struct_type.n) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { @@ -106,29 +106,29 @@ class C(T:! type) { // CHECK:STDOUT: %return: ref @F.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = @Class.%G (constants.%G)] { -// CHECK:STDOUT: %self.patt: @G.%Class (%Class.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.%Class (%Class) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.%Class (%Class) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @G.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @G.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc9: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @G.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.%Class (%Class.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @G.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @G.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @G.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_8.1: @Class.%.loc13_8.2 (%.1) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc13: @Class.%Class.elem (%Class.elem) = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.n [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: .n = %.loc13_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc14_1.1 +// CHECK:STDOUT: .n = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc14_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -146,15 +146,15 @@ class C(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(@Class.%T.loc4_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc10_16.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T (%T) [symbolic = %.loc10_16.3 (constants.%.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @G.%Class (%Class), @G.%T (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.%Class (%Class.2)]() -> @G.%T (%T) { +// CHECK:STDOUT: fn[%self.param_patt: @G.%Class (%Class)]() -> @G.%T (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @G.%.loc10_16.3 (%.1) = name_ref n, @Class.%.loc13_8.1 [template = @Class.%.loc13_8.1] +// CHECK:STDOUT: %self.ref: @G.%Class (%Class) = name_ref self, %self +// CHECK:STDOUT: %n.ref: @G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc10_16.1: ref @G.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc10_16.2: @G.%T (%T) = bind_value %.loc10_16.1 // CHECK:STDOUT: return %.loc10_16.2 @@ -170,10 +170,10 @@ class C(T:! type) { // CHECK:STDOUT: %F => constants.%F // CHECK:STDOUT: %G.type => constants.%G.type // CHECK:STDOUT: %G => constants.%G -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc13_8.2 => constants.%.1 -// CHECK:STDOUT: %.loc14_1.2 => constants.%.2 -// CHECK:STDOUT: %.loc14_1.3 => constants.%.3 +// CHECK:STDOUT: %Class => constants.%Class +// CHECK:STDOUT: %Class.elem => constants.%Class.elem +// CHECK:STDOUT: %struct_type.n => constants.%struct_type.n +// CHECK:STDOUT: %complete_type.loc14_1.2 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { @@ -187,7 +187,7 @@ class C(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc4_13.2) { @@ -201,14 +201,14 @@ class C(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C.2, %.1 [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.data: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_struct_type [symbolic] +// CHECK:STDOUT: %struct_type.data: type = struct_type {.data: %empty_struct_type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.data [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -224,7 +224,7 @@ class C(T:! type) { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -240,33 +240,33 @@ class C(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%T.loc4_9.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @C.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc11_11.2: type = unbound_element_type @C.%C (%C.2), %.1 [symbolic = %.loc11_11.2 (constants.%.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C), %empty_struct_type [symbolic = %C.elem (constants.%C.elem)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @C.%F.type (%F.type) = fn_decl @F [symbolic = @C.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc11_14.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_11.1: @C.%.loc11_11.2 (%.2) = field_decl data, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_14.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc11_11: @C.%C.elem (%C.elem) = field_decl data, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.data [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 +// CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .data = %.loc11_11.1 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: .data = %.loc11_11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@C.%T.loc4_9.1: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc9: type = unbound_element_type @F.%C (%C.2), %.1 [symbolic = %.loc9 (constants.%.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @F.%C (%C), %empty_struct_type [symbolic = %C.elem (constants.%C.elem)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %data.ref: @F.%.loc9 (%.2) = name_ref data, @C.%.loc11_11.1 [template = @C.%.loc11_11.1] +// CHECK:STDOUT: %data.ref: @F.%C.elem (%C.elem) = name_ref data, @C.%.loc11_11 [template = @C.%.loc11_11] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -278,8 +278,8 @@ class C(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %C => constants.%C.2 -// CHECK:STDOUT: %.loc11_11.2 => constants.%.2 +// CHECK:STDOUT: %C => constants.%C +// CHECK:STDOUT: %C.elem => constants.%C.elem // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) {} diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 29d3e78fe9b69..f59f4bcc6b0c8 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -111,15 +111,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -135,7 +135,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -158,18 +158,18 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return: ref %T = return_slot %return.param.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] { -// CHECK:STDOUT: %self.patt: %Class.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %Class.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %Class = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc14: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14_28: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2] -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_28 [symbolic = constants.%Class.2] +// CHECK:STDOUT: %.loc14_28: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] +// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_28 [symbolic = constants.%Class] // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc14 [symbolic = constants.%T] -// CHECK:STDOUT: %self.param.loc14: %Class.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc14: %Class.2 = bind_name self, %self.param.loc14 +// CHECK:STDOUT: %self.param.loc14: %Class = value_param runtime_param0 +// CHECK:STDOUT: %self.loc14: %Class = bind_name self, %self.param.loc14 // CHECK:STDOUT: %return.param.loc14: ref %T = out_param runtime_param1 // CHECK:STDOUT: %return: ref %T = return_slot %return.param.loc14 // CHECK:STDOUT: } @@ -184,10 +184,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T.loc4_13.2) [symbolic = %G.type (constants.%G.type)] // CHECK:STDOUT: %G: @Class.%G.type (%G.type) = struct_value () [symbolic = %G (constants.%G)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc7_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.2) [symbolic = %.loc8_1.3 (constants.%.3)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc4_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %struct_type.n (constants.%struct_type.n)] +// CHECK:STDOUT: %complete_type.loc8_1.2: = complete_type_witness @Class.%struct_type.n (%struct_type.n) [symbolic = %complete_type.loc8_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { @@ -204,29 +204,29 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %.loc5: ref @F.%T.loc5 (%T) = return_slot %return.param.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = @Class.%G (constants.%G)] { -// CHECK:STDOUT: %self.patt: %Class.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %Class.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %Class = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_14: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6_14 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc6_14: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6_14 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T.loc6 (constants.%T)] -// CHECK:STDOUT: %self.param.loc6: @G.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self.loc6: @G.%Class (%Class.2) = bind_name self, %self.param.loc6 +// CHECK:STDOUT: %self.param.loc6: @G.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %self.loc6: @G.%Class (%Class) = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref @G.%T.loc6 (%T) = out_param runtime_param1 // CHECK:STDOUT: %.loc6_22: ref @G.%T.loc6 (%T) = return_slot %return.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_8.1: @Class.%.loc7_8.2 (%.1) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.2 [symbolic = %.loc8_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc7: @Class.%Class.elem (%Class.elem) = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type.loc8_1.1: = complete_type_witness %struct_type.n [symbolic = %complete_type.loc8_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: .n = %.loc7_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc8_1.1 +// CHECK:STDOUT: .n = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc8_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -244,15 +244,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(@Class.%T.loc4_13.1: type) { // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0 [symbolic = %T.loc6 (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc6) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc6) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc15_14.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T.loc6 (%T) [symbolic = %.loc15_14.3 (constants.%.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @G.%Class (%Class), @G.%T.loc6 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: %Class.2]() -> %T { +// CHECK:STDOUT: fn[%self.param_patt: %Class]() -> %T { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, %self.loc14 -// CHECK:STDOUT: %n.ref: @G.%.loc15_14.3 (%.1) = name_ref n, @Class.%.loc7_8.1 [template = @Class.%.loc7_8.1] +// CHECK:STDOUT: %self.ref: @G.%Class (%Class) = name_ref self, %self.loc14 +// CHECK:STDOUT: %n.ref: @G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc7 [template = @Class.%.loc7] // CHECK:STDOUT: %.loc15_14.1: ref @G.%T.loc6 (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc15_14.2: @G.%T.loc6 (%T) = bind_value %.loc15_14.1 // CHECK:STDOUT: return %.loc15_14.2 @@ -268,10 +268,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %F => constants.%F // CHECK:STDOUT: %G.type => constants.%G.type // CHECK:STDOUT: %G => constants.%G -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc7_8.2 => constants.%.1 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.2 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.3 +// CHECK:STDOUT: %Class => constants.%Class +// CHECK:STDOUT: %Class.elem => constants.%Class.elem +// CHECK:STDOUT: %struct_type.n => constants.%struct_type.n +// CHECK:STDOUT: %complete_type.loc8_1.2 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { @@ -285,7 +285,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc6 => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc4_13.2) { @@ -299,17 +299,17 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %A.1: %A.type = struct_value () [template] -// CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic] +// CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] +// CHECK:STDOUT: %A: type = class_type @A, @A(%T) [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %B.type: type = generic_class_type @B, @A(%T) [symbolic] -// CHECK:STDOUT: %B.1: %B.type = struct_value () [symbolic] -// CHECK:STDOUT: %B.2: type = class_type @B, @B(%T, %N) [symbolic] +// CHECK:STDOUT: %B.generic: %B.type = struct_value () [symbolic] +// CHECK:STDOUT: %B: type = class_type @B, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -325,7 +325,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { +// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -333,8 +333,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { -// CHECK:STDOUT: %self.patt: %B.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %B.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %B = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %a.patt: %T = binding_pattern a // CHECK:STDOUT: %a.param_patt: %T = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { @@ -343,11 +343,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %N.param: %T = value_param runtime_param // CHECK:STDOUT: %N.loc10: %T = bind_symbolic_name N, 1, %N.param [symbolic = constants.%N] -// CHECK:STDOUT: %.loc10: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = constants.%B.2] -// CHECK:STDOUT: %Self.ref.loc10: type = name_ref Self, %.loc10 [symbolic = constants.%B.2] +// CHECK:STDOUT: %.loc10: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = constants.%B] +// CHECK:STDOUT: %Self.ref.loc10: type = name_ref Self, %.loc10 [symbolic = constants.%B] // CHECK:STDOUT: %T.ref.loc10_42: type = name_ref T, %T.loc10 [symbolic = constants.%T] -// CHECK:STDOUT: %self.param.loc10: %B.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc10: %B.2 = bind_name self, %self.param.loc10 +// CHECK:STDOUT: %self.param.loc10: %B = value_param runtime_param0 +// CHECK:STDOUT: %self.loc10: %B = bind_name self, %self.param.loc10 // CHECK:STDOUT: %a.param.loc10: %T = value_param runtime_param1 // CHECK:STDOUT: %a.loc10: %T = bind_name a, %a.param.loc10 // CHECK:STDOUT: } @@ -359,10 +359,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %B.type: type = generic_class_type @B, @A(%T.loc4_9.2) [symbolic = %B.type (constants.%B.type)] -// CHECK:STDOUT: %B: @A.%B.type (%B.type) = struct_value () [symbolic = %B (constants.%B.1)] +// CHECK:STDOUT: %B.generic: @A.%B.type (%B.type) = struct_value () [symbolic = %B.generic (constants.%B.generic)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %B.decl: @A.%B.type (%B.type) = class_decl @B [symbolic = @A.%B (constants.%B.1)] { +// CHECK:STDOUT: %B.decl: @A.%B.type (%B.type) = class_decl @B [symbolic = @A.%B.generic (constants.%B.generic)] { // CHECK:STDOUT: %N.patt.loc5_11.1: @B.%T (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc5_11.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @B.%T (%T) = value_param_pattern %N.patt.loc5_11.1, runtime_param [symbolic = %N.patt.loc5_11.2 (constants.%N.patt)] // CHECK:STDOUT: } { @@ -370,12 +370,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %N.param: @B.%T (%T) = value_param runtime_param // CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc5_11.2 (constants.%N)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%A.2 +// CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .B = %B.decl -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -390,36 +390,36 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @B.%F.type (%F.type) = fn_decl @F [symbolic = @B.%F (constants.%F)] { -// CHECK:STDOUT: %self.patt: %B.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %B.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %B = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %a.patt: %T = binding_pattern a // CHECK:STDOUT: %a.param_patt: %T = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = %B (constants.%B.2)] -// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6 [symbolic = %B (constants.%B.2)] +// CHECK:STDOUT: %.loc6: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = %B (constants.%B)] +// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6 [symbolic = %B (constants.%B)] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @A.%T.loc4_9.1 [symbolic = %T.loc6 (constants.%T)] -// CHECK:STDOUT: %self.param.loc6: @F.%B (%B.2) = value_param runtime_param0 -// CHECK:STDOUT: %self.loc6: @F.%B (%B.2) = bind_name self, %self.param.loc6 +// CHECK:STDOUT: %self.param.loc6: @F.%B (%B) = value_param runtime_param0 +// CHECK:STDOUT: %self.loc6: @F.%B (%B) = bind_name self, %self.param.loc6 // CHECK:STDOUT: %a.param.loc6: @F.%T.loc6 (%T) = value_param runtime_param1 // CHECK:STDOUT: %a.loc6: @F.%T.loc6 (%T) = bind_name a, %a.param.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%B.2 +// CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@A.%T.loc4_9.1: type, @B.%N.loc5_11.1: @B.%T (%T)) { // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0 [symbolic = %T.loc6 (constants.%T)] // CHECK:STDOUT: %N.loc6: %T = bind_symbolic_name N, 1 [symbolic = %N.loc6 (constants.%N)] -// CHECK:STDOUT: %B: type = class_type @B, @B(%T.loc6, %N.loc6) [symbolic = %B (constants.%B.2)] +// CHECK:STDOUT: %B: type = class_type @B, @B(%T.loc6, %N.loc6) [symbolic = %B (constants.%B)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: %B.2](%a.param_patt: %T) { +// CHECK:STDOUT: fn[%self.param_patt: %B](%a.param_patt: %T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -431,7 +431,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %B.type => constants.%B.type -// CHECK:STDOUT: %B => constants.%B.1 +// CHECK:STDOUT: %B.generic => constants.%B.generic // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @B(constants.%T, constants.%N) { @@ -453,7 +453,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: specific @F(constants.%T, constants.%N) { // CHECK:STDOUT: %T.loc6 => constants.%T // CHECK:STDOUT: %N.loc6 => constants.%N -// CHECK:STDOUT: %B => constants.%B.2 +// CHECK:STDOUT: %B => constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @B(%T, %N.loc5_11.2) { @@ -473,12 +473,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %NotGeneric: type = class_type @NotGeneric [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -495,7 +495,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc15_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -503,12 +503,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class @NotGeneric { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NotGeneric // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -536,14 +536,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [template] +// CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -559,14 +559,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc4_15.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_15.1, runtime_param [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Generic(%T.loc4_15.1: type) { @@ -579,12 +579,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %TooFew.decl: @Generic.%TooFew.type (%TooFew.type) = fn_decl @TooFew [symbolic = @Generic.%TooFew (constants.%TooFew)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Generic.2 +// CHECK:STDOUT: .Self = constants.%Generic // CHECK:STDOUT: .TooFew = %TooFew.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -616,16 +616,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [template] +// CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -641,14 +641,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc4_15.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_15.1, runtime_param [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc15_12.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_12.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param @@ -666,12 +666,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %TooMany.decl: @Generic.%TooMany.type (%TooMany.type) = fn_decl @TooMany [symbolic = @Generic.%TooMany (constants.%TooMany)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Generic.2 +// CHECK:STDOUT: .Self = constants.%Generic // CHECK:STDOUT: .TooMany = %TooMany.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -720,16 +720,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T.1) [symbolic] +// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [template] +// CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T.1) [symbolic] // CHECK:STDOUT: %WrongType.type: type = fn_type @WrongType, @Generic(%T.1) [symbolic] // CHECK:STDOUT: %WrongType: %WrongType.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -745,14 +745,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc4_15.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_15.1, runtime_param [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { // CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %T.param: %empty_tuple.type = value_param runtime_param @@ -770,12 +770,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %WrongType.decl: @Generic.%WrongType.type (%WrongType.type) = fn_decl @WrongType [symbolic = @Generic.%WrongType (constants.%WrongType)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Generic.2 +// CHECK:STDOUT: .Self = constants.%Generic // CHECK:STDOUT: .WrongType = %WrongType.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index 04710568a7839..b93c7762e983e 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -28,14 +28,14 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] @@ -44,9 +44,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.1: %Get.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %GetNoDeduce.type.1: type = fn_type @GetNoDeduce, @Class(%T) [symbolic] // CHECK:STDOUT: %GetNoDeduce.1: %GetNoDeduce.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = specific_function %Get.1, @Get(%T, %U) [symbolic] -// CHECK:STDOUT: %.5: = specific_function %GetNoDeduce.1, @GetNoDeduce(%T, %U) [symbolic] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%A) [template] +// CHECK:STDOUT: %Get.specific_fn.1: = specific_function %Get.1, @Get(%T, %U) [symbolic] +// CHECK:STDOUT: %GetNoDeduce.specific_fn.1: = specific_function %GetNoDeduce.1, @GetNoDeduce(%T, %U) [symbolic] +// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%A) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%A, %B) [template] // CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [template] // CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [template] @@ -54,11 +54,11 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.2: %Get.type.2 = struct_value () [template] // CHECK:STDOUT: %GetNoDeduce.type.2: type = fn_type @GetNoDeduce, @Class(%A) [template] // CHECK:STDOUT: %GetNoDeduce.2: %GetNoDeduce.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: = specific_function %Get.2, @Get(%A, %B) [template] +// CHECK:STDOUT: %Get.specific_fn.2: = specific_function %Get.2, @Get(%A, %B) [template] // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam.type: type = fn_type @CallGenericMethodWithNonDeducedParam [template] // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam: %CallGenericMethodWithNonDeducedParam.type = struct_value () [template] -// CHECK:STDOUT: %.9: = specific_function %GetNoDeduce.2, @GetNoDeduce(%A, %B) [template] -// CHECK:STDOUT: %struct: %A = struct_value () [template] +// CHECK:STDOUT: %GetNoDeduce.specific_fn.2: = specific_function %GetNoDeduce.2, @GetNoDeduce(%A, %B) [template] +// CHECK:STDOUT: %A.val: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,7 +80,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc14_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc14_13.1, runtime_param [symbolic = %T.patt.loc14_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -88,57 +88,57 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %T.loc14_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [template = constants.%CallGenericMethod] { -// CHECK:STDOUT: %c.patt: %Class.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %Class.3 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %Class.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %Class.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %A.ref.loc19_31: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] // CHECK:STDOUT: %A.ref.loc19_39: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc19: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc19_43.1: %tuple.type.1 = tuple_literal (%A.ref.loc19_39, %B.ref.loc19) // CHECK:STDOUT: %.loc19_43.2: type = converted %.loc19_43.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %Class.3 = bind_name c, %c.param +// CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam.decl: %CallGenericMethodWithNonDeducedParam.type = fn_decl @CallGenericMethodWithNonDeducedParam [template = constants.%CallGenericMethodWithNonDeducedParam] { -// CHECK:STDOUT: %c.patt: %Class.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %Class.3 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %Class.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %Class.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %A.ref.loc23_50: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] // CHECK:STDOUT: %A.ref.loc23_58: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc23: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc23_62.1: %tuple.type.1 = tuple_literal (%A.ref.loc23_58, %B.ref.loc23) // CHECK:STDOUT: %.loc23_62.2: type = converted %.loc23_62.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %Class.3 = bind_name c, %c.param +// CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc14_13.1: type) { @@ -187,13 +187,13 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %return.param: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class.1 // CHECK:STDOUT: .Get = %Get.decl // CHECK:STDOUT: .GetNoDeduce = %GetNoDeduce.decl -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -206,27 +206,27 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type: type = fn_type @Get, @Class(%T) [symbolic = %Get.type (constants.%Get.type.1)] // CHECK:STDOUT: %Get: @Get.%Get.type (%Get.type.1) = struct_value () [symbolic = %Get (constants.%Get.1)] -// CHECK:STDOUT: %.loc15_39.3: = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %.loc15_39.3 (constants.%.4)] +// CHECK:STDOUT: %Get.specific_fn.loc15_39.2: = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%U.param_patt: type) -> %return: @Get.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_39.1: @Get.%Get.type (%Get.type.1) = specific_constant @Class.%Get.decl, @Class(constants.%T) [symbolic = %Get (constants.%Get.1)] -// CHECK:STDOUT: %Get.ref: @Get.%Get.type (%Get.type.1) = name_ref Get, %.loc15_39.1 [symbolic = %Get (constants.%Get.1)] +// CHECK:STDOUT: %.loc15_39: @Get.%Get.type (%Get.type.1) = specific_constant @Class.%Get.decl, @Class(constants.%T) [symbolic = %Get (constants.%Get.1)] +// CHECK:STDOUT: %Get.ref: @Get.%Get.type (%Get.type.1) = name_ref Get, %.loc15_39 [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %U.ref.loc15_43: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)] -// CHECK:STDOUT: %.loc15_39.2: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %.loc15_39.3 (constants.%.4)] +// CHECK:STDOUT: %Get.specific_fn.loc15_39.1: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.1)] // CHECK:STDOUT: %.loc15_44.1: ref @Get.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.2) = call %.loc15_39.2() to %.loc15_44.1 +// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.2) = call %Get.specific_fn.loc15_39.1() to %.loc15_44.1 // CHECK:STDOUT: %.loc15_44.2: ref @Get.%tuple.type (%tuple.type.2) = temporary %.loc15_44.1, %Get.call -// CHECK:STDOUT: %.loc15_44.3: ref @Get.%T (%T) = tuple_access %.loc15_44.2, element0 -// CHECK:STDOUT: %.loc15_44.4: @Get.%T (%T) = bind_value %.loc15_44.3 -// CHECK:STDOUT: %.loc15_44.5: ref @Get.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc15_44.6: init @Get.%T (%T) = initialize_from %.loc15_44.4 to %.loc15_44.5 -// CHECK:STDOUT: %.loc15_44.7: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_44.2, element1 -// CHECK:STDOUT: %.loc15_44.8: @Get.%U.loc15_10.1 (%U) = bind_value %.loc15_44.7 -// CHECK:STDOUT: %.loc15_44.9: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc15_44.10: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_44.8 to %.loc15_44.9 -// CHECK:STDOUT: %.loc15_44.11: init @Get.%tuple.type (%tuple.type.2) = tuple_init (%.loc15_44.6, %.loc15_44.10) to %return -// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.2) = converted %Get.call, %.loc15_44.11 +// CHECK:STDOUT: %tuple.elem0.loc15_44.1: ref @Get.%T (%T) = tuple_access %.loc15_44.2, element0 +// CHECK:STDOUT: %.loc15_44.3: @Get.%T (%T) = bind_value %tuple.elem0.loc15_44.1 +// CHECK:STDOUT: %tuple.elem0.loc15_44.2: ref @Get.%T (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc15_44.4: init @Get.%T (%T) = initialize_from %.loc15_44.3 to %tuple.elem0.loc15_44.2 +// CHECK:STDOUT: %tuple.elem1.loc15_44.1: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_44.2, element1 +// CHECK:STDOUT: %.loc15_44.5: @Get.%U.loc15_10.1 (%U) = bind_value %tuple.elem1.loc15_44.1 +// CHECK:STDOUT: %tuple.elem1.loc15_44.2: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc15_44.6: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_44.5 to %tuple.elem1.loc15_44.2 +// CHECK:STDOUT: %.loc15_44.7: init @Get.%tuple.type (%tuple.type.2) = tuple_init (%.loc15_44.4, %.loc15_44.6) to %return +// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.2) = converted %Get.call, %.loc15_44.7 // CHECK:STDOUT: return %.loc15_45 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -240,59 +240,59 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type: type = fn_type @GetNoDeduce, @Class(%T) [symbolic = %GetNoDeduce.type (constants.%GetNoDeduce.type.1)] // CHECK:STDOUT: %GetNoDeduce: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = struct_value () [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] -// CHECK:STDOUT: %.loc16_53.3: = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %.loc16_53.3 (constants.%.5)] +// CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2: = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param_patt: @GetNoDeduce.%T (%T), %U.param_patt: type) -> %return: @GetNoDeduce.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_53.1: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%T) [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] -// CHECK:STDOUT: %GetNoDeduce.ref: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = name_ref GetNoDeduce, %.loc16_53.1 [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] +// CHECK:STDOUT: %.loc16_53: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%T) [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] +// CHECK:STDOUT: %GetNoDeduce.ref: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = name_ref GetNoDeduce, %.loc16_53 [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] // CHECK:STDOUT: %x.ref: @GetNoDeduce.%T (%T) = name_ref x, %x // CHECK:STDOUT: %U.ref.loc16_68: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] -// CHECK:STDOUT: %.loc16_53.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %.loc16_53.3 (constants.%.5)] +// CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.1: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.1)] // CHECK:STDOUT: %.loc16_69.1: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.2) = call %.loc16_53.2(%x.ref) to %.loc16_69.1 +// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.2) = call %GetNoDeduce.specific_fn.loc16_53.1(%x.ref) to %.loc16_69.1 // CHECK:STDOUT: %.loc16_69.2: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary %.loc16_69.1, %GetNoDeduce.call -// CHECK:STDOUT: %.loc16_69.3: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_69.2, element0 -// CHECK:STDOUT: %.loc16_69.4: @GetNoDeduce.%T (%T) = bind_value %.loc16_69.3 -// CHECK:STDOUT: %.loc16_69.5: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_69.6: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_69.4 to %.loc16_69.5 -// CHECK:STDOUT: %.loc16_69.7: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_69.2, element1 -// CHECK:STDOUT: %.loc16_69.8: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %.loc16_69.7 -// CHECK:STDOUT: %.loc16_69.9: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_69.10: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_69.8 to %.loc16_69.9 -// CHECK:STDOUT: %.loc16_69.11: init @GetNoDeduce.%tuple.type (%tuple.type.2) = tuple_init (%.loc16_69.6, %.loc16_69.10) to %return -// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.2) = converted %GetNoDeduce.call, %.loc16_69.11 +// CHECK:STDOUT: %tuple.elem0.loc16_69.1: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_69.2, element0 +// CHECK:STDOUT: %.loc16_69.3: @GetNoDeduce.%T (%T) = bind_value %tuple.elem0.loc16_69.1 +// CHECK:STDOUT: %tuple.elem0.loc16_69.2: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_69.4: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_69.3 to %tuple.elem0.loc16_69.2 +// CHECK:STDOUT: %tuple.elem1.loc16_69.1: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_69.2, element1 +// CHECK:STDOUT: %.loc16_69.5: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %tuple.elem1.loc16_69.1 +// CHECK:STDOUT: %tuple.elem1.loc16_69.2: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_69.6: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_69.5 to %tuple.elem1.loc16_69.2 +// CHECK:STDOUT: %.loc16_69.7: init @GetNoDeduce.%tuple.type (%tuple.type.2) = tuple_init (%.loc16_69.4, %.loc16_69.6) to %return +// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.2) = converted %GetNoDeduce.call, %.loc16_69.7 // CHECK:STDOUT: return %.loc16_70 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGenericMethod(%c.param_patt: %Class.3) -> %return: %tuple.type.3 { +// CHECK:STDOUT: fn @CallGenericMethod(%c.param_patt: %Class.2) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c -// CHECK:STDOUT: %.loc20_11.1: %Get.type.2 = specific_constant @Class.%Get.decl, @Class(constants.%A) [template = constants.%Get.2] -// CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc20_11.1 [template = constants.%Get.2] +// CHECK:STDOUT: %c.ref: %Class.2 = name_ref c, %c +// CHECK:STDOUT: %.loc20: %Get.type.2 = specific_constant @Class.%Get.decl, @Class(constants.%A) [template = constants.%Get.2] +// CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc20 [template = constants.%Get.2] // CHECK:STDOUT: %B.ref.loc20: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc20_11.2: = specific_function %Get.ref, @Get(constants.%A, constants.%B) [template = constants.%.8] +// CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.ref, @Get(constants.%A, constants.%B) [template = constants.%Get.specific_fn.2] // CHECK:STDOUT: %.loc19_35.2: ref %tuple.type.3 = splice_block %return {} -// CHECK:STDOUT: %Get.call: init %tuple.type.3 = call %.loc20_11.2() to %.loc19_35.2 +// CHECK:STDOUT: %Get.call: init %tuple.type.3 = call %Get.specific_fn() to %.loc19_35.2 // CHECK:STDOUT: return %Get.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGenericMethodWithNonDeducedParam(%c.param_patt: %Class.3) -> %return: %tuple.type.3 { +// CHECK:STDOUT: fn @CallGenericMethodWithNonDeducedParam(%c.param_patt: %Class.2) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c -// CHECK:STDOUT: %.loc24_11.1: %GetNoDeduce.type.2 = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%A) [template = constants.%GetNoDeduce.2] -// CHECK:STDOUT: %GetNoDeduce.ref: %GetNoDeduce.type.2 = name_ref GetNoDeduce, %.loc24_11.1 [template = constants.%GetNoDeduce.2] -// CHECK:STDOUT: %.loc24_25.1: %.1 = struct_literal () +// CHECK:STDOUT: %c.ref: %Class.2 = name_ref c, %c +// CHECK:STDOUT: %.loc24_11: %GetNoDeduce.type.2 = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%A) [template = constants.%GetNoDeduce.2] +// CHECK:STDOUT: %GetNoDeduce.ref: %GetNoDeduce.type.2 = name_ref GetNoDeduce, %.loc24_11 [template = constants.%GetNoDeduce.2] +// CHECK:STDOUT: %.loc24_25.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %B.ref.loc24: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc24_11.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%A, constants.%B) [template = constants.%.9] +// CHECK:STDOUT: %GetNoDeduce.specific_fn: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%A, constants.%B) [template = constants.%GetNoDeduce.specific_fn.2] // CHECK:STDOUT: %.loc23_54.2: ref %tuple.type.3 = splice_block %return {} // CHECK:STDOUT: %.loc24_25.2: ref %A = temporary_storage -// CHECK:STDOUT: %.loc24_25.3: init %A = class_init (), %.loc24_25.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc24_25.3: init %A = class_init (), %.loc24_25.2 [template = constants.%A.val] // CHECK:STDOUT: %.loc24_25.4: ref %A = temporary %.loc24_25.2, %.loc24_25.3 // CHECK:STDOUT: %.loc24_25.5: ref %A = converted %.loc24_25.1, %.loc24_25.4 // CHECK:STDOUT: %.loc24_25.6: %A = bind_value %.loc24_25.5 -// CHECK:STDOUT: %GetNoDeduce.call: init %tuple.type.3 = call %.loc24_11.2(%.loc24_25.6) to %.loc23_54.2 +// CHECK:STDOUT: %GetNoDeduce.call: init %tuple.type.3 = call %GetNoDeduce.specific_fn(%.loc24_25.6) to %.loc23_54.2 // CHECK:STDOUT: return %GetNoDeduce.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +316,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type => constants.%Get.type.1 // CHECK:STDOUT: %Get => constants.%Get.1 -// CHECK:STDOUT: %.loc15_39.3 => constants.%.4 +// CHECK:STDOUT: %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%T, constants.%U) { @@ -328,7 +328,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type => constants.%GetNoDeduce.type.1 // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.1 -// CHECK:STDOUT: %.loc16_53.3 => constants.%.5 +// CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc14_13.2) { @@ -380,7 +380,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type => constants.%Get.type.2 // CHECK:STDOUT: %Get => constants.%Get.2 -// CHECK:STDOUT: %.loc15_39.3 => constants.%.8 +// CHECK:STDOUT: %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%A, constants.%B) { @@ -392,6 +392,6 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type => constants.%GetNoDeduce.type.2 // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.2 -// CHECK:STDOUT: %.loc16_53.3 => constants.%.9 +// CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 8c4086e8e61a9..17e39d80b9c7a 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -92,10 +92,10 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [template] +// CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -111,14 +111,14 @@ class E(U:! type) {} // CHECK:STDOUT: .Generic = %Generic.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc6: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6, runtime_param [symbolic = constants.%T.patt] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param.loc4: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param.loc4 [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc6: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6, runtime_param [symbolic = constants.%T.patt] // CHECK:STDOUT: } { @@ -134,11 +134,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Generic.2 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: .Self = constants.%Generic +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -154,10 +154,10 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.1: %.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%T) [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -174,7 +174,7 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -192,11 +192,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.2 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -208,23 +208,23 @@ class E(U:! type) {} // CHECK:STDOUT: --- fail_mismatch_implicit_param_list.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %B.type: type = generic_class_type @B [template] -// CHECK:STDOUT: %B.1: %B.type = struct_value () [template] +// CHECK:STDOUT: %B.generic: %B.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N.2: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.2: %T = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %N.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T, %N.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -241,18 +241,18 @@ class E(U:! type) {} // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] { +// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.generic] { // CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed, %.loc4_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc12_19.1: @.1.%T.loc12_9.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.2)] @@ -282,11 +282,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -308,18 +308,18 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %U: %i32 = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: %i32 = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %U) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T, %U) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -336,23 +336,23 @@ class E(U:! type) {} // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc12_19.1: %i32 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %i32 = value_param_pattern %U.patt.loc12_19.1, runtime_param [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.3: type = converted %int.make_type_signed, %.loc12_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_signed, %.loc12_23.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %U.param: %i32 = value_param runtime_param @@ -376,11 +376,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12_29: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc12_29 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -402,18 +402,18 @@ class E(U:! type) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] -// CHECK:STDOUT: %D.1: %D.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %D.generic: %D.type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %T.2: %i32 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %i32 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -430,21 +430,21 @@ class E(U:! type) {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] { +// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %T.patt.loc12_9.1: %i32 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %i32 = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %T.param: %i32 = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: %i32 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T.2)] // CHECK:STDOUT: } @@ -464,11 +464,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12_19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc12_19 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -488,14 +488,14 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %E.type: type = generic_class_type @E [template] -// CHECK:STDOUT: %E.1: %E.type = struct_value () [template] +// CHECK:STDOUT: %E.generic: %E.type = struct_value () [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.1: %.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%U) [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%U) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -511,14 +511,14 @@ class E(U:! type) {} // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %E.decl: %E.type = class_decl @E [template = constants.%E.1] { +// CHECK:STDOUT: %E.decl: %E.type = class_decl @E [template = constants.%E.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %U.patt.loc11_9.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_9.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc11_9.1, runtime_param [symbolic = %U.patt.loc11_9.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -541,11 +541,11 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.2 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 50fd35c491b92..d36492390d3f1 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -25,19 +25,19 @@ class Class(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic] // CHECK:STDOUT: %MakeSelf: %MakeSelf.type = struct_value () [symbolic] // CHECK:STDOUT: %MakeClass.type: type = fn_type @MakeClass, @Class(%T) [symbolic] // CHECK:STDOUT: %MakeClass: %MakeClass.type = struct_value () [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %Class.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic] -// CHECK:STDOUT: %.5: = specific_function %MakeClass, @MakeClass(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Class.val: %Class = struct_value () [symbolic] +// CHECK:STDOUT: %MakeSelf.specific_fn: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic] +// CHECK:STDOUT: %MakeClass.specific_fn: = specific_function %MakeClass, @MakeClass(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ class Class(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -76,64 +76,64 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %MakeSelf.decl: @Class.%MakeSelf.type (%MakeSelf.type) = fn_decl @MakeSelf [symbolic = @Class.%MakeSelf (constants.%MakeSelf)] { -// CHECK:STDOUT: %return.patt: @MakeSelf.%Class (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @MakeSelf.%Class (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @MakeSelf.%Class (%Class) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @MakeSelf.%Class (%Class) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_20: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14_20 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %return.param: ref @MakeSelf.%Class (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @MakeSelf.%Class (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %.loc14_20: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14_20 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %return.param: ref @MakeSelf.%Class (%Class) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @MakeSelf.%Class (%Class) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MakeClass.decl: @Class.%MakeClass.type (%MakeClass.type) = fn_decl @MakeClass [symbolic = @Class.%MakeClass (constants.%MakeClass)] { -// CHECK:STDOUT: %return.patt: @MakeClass.%Class.loc15_28.1 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @MakeClass.%Class.loc15_28.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @MakeClass.%Class.loc15_28.1 (%Class) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @MakeClass.%Class.loc15_28.1 (%Class) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = 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.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc15_28.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc15_28.1 (constants.%Class.2)] -// CHECK:STDOUT: %return.param: ref @MakeClass.%Class.loc15_28.1 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @MakeClass.%Class.loc15_28.1 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %Class.loc15_28.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc15_28.1 (constants.%Class)] +// CHECK:STDOUT: %return.param: ref @MakeClass.%Class.loc15_28.1 (%Class) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @MakeClass.%Class.loc15_28.1 (%Class) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .MakeSelf = %MakeSelf.decl // CHECK:STDOUT: .MakeClass = %MakeClass.decl // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @MakeSelf(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @MakeSelf.%Class (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %Class.val: @MakeSelf.%Class (%Class) = struct_value () [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @MakeSelf.%Class (%Class.2) { +// CHECK:STDOUT: fn() -> %return: @MakeSelf.%Class (%Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_35.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14_35.2: init @MakeSelf.%Class (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] -// CHECK:STDOUT: %.loc14_36: init @MakeSelf.%Class (%Class.2) = converted %.loc14_35.1, %.loc14_35.2 [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc14_35.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_35.2: init @MakeSelf.%Class (%Class) = class_init (), %return [symbolic = %Class.val (constants.%Class.val)] +// CHECK:STDOUT: %.loc14_36: init @MakeSelf.%Class (%Class) = converted %.loc14_35.1, %.loc14_35.2 [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: return %.loc14_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @MakeClass(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc15_28.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc15_28.1 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc15_28.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc15_28.1 (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @MakeClass.%Class.loc15_28.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %Class.val: @MakeClass.%Class.loc15_28.1 (%Class) = struct_value () [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @MakeClass.%Class.loc15_28.1 (%Class.2) { +// CHECK:STDOUT: fn() -> %return: @MakeClass.%Class.loc15_28.1 (%Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_40.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc15_40.2: init @MakeClass.%Class.loc15_28.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] -// CHECK:STDOUT: %.loc15_41: init @MakeClass.%Class.loc15_28.1 (%Class.2) = converted %.loc15_40.1, %.loc15_40.2 [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc15_40.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_40.2: init @MakeClass.%Class.loc15_28.1 (%Class) = class_init (), %return [symbolic = %Class.val (constants.%Class.val)] +// CHECK:STDOUT: %.loc15_41: init @MakeClass.%Class.loc15_28.1 (%Class) = converted %.loc15_40.1, %.loc15_40.2 [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: return %.loc15_41 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -141,36 +141,36 @@ class Class(T:! type) { // CHECK:STDOUT: generic fn @F(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc17_19.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc17_19.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic = %MakeSelf.type (constants.%MakeSelf.type)] // CHECK:STDOUT: %MakeSelf: @F.%MakeSelf.type (%MakeSelf.type) = struct_value () [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %.loc17_23.3: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %.loc17_23.3 (constants.%.4)] +// CHECK:STDOUT: %MakeSelf.specific_fn.loc17_23.2: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %MakeSelf.specific_fn.loc17_23.2 (constants.%MakeSelf.specific_fn)] // CHECK:STDOUT: %MakeClass.type: type = fn_type @MakeClass, @Class(%T) [symbolic = %MakeClass.type (constants.%MakeClass.type)] // CHECK:STDOUT: %MakeClass: @F.%MakeClass.type (%MakeClass.type) = struct_value () [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %.loc18_19.3: = specific_function %MakeClass, @MakeClass(%T) [symbolic = %.loc18_19.3 (constants.%.5)] +// CHECK:STDOUT: %MakeClass.specific_fn.loc18_19.2: = specific_function %MakeClass, @MakeClass(%T) [symbolic = %MakeClass.specific_fn.loc18_19.2 (constants.%MakeClass.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = 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.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc17_19.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] -// CHECK:STDOUT: %c.var: ref @F.%Class.loc17_19.2 (%Class.2) = var c -// CHECK:STDOUT: %c: ref @F.%Class.loc17_19.2 (%Class.2) = bind_name c, %c.var -// CHECK:STDOUT: %.loc17_23.1: @F.%MakeSelf.type (%MakeSelf.type) = specific_constant @Class.%MakeSelf.decl, @Class(constants.%T) [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %MakeSelf.ref: @F.%MakeSelf.type (%MakeSelf.type) = name_ref MakeSelf, %.loc17_23.1 [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %.loc17_23.2: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %.loc17_23.3 (constants.%.4)] -// CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_19.2 (%Class.2) = splice_block %c.var {} -// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_19.2 (%Class.2) = call %.loc17_23.2() to %.loc17_9 +// CHECK:STDOUT: %Class.loc17_19.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] +// CHECK:STDOUT: %c.var: ref @F.%Class.loc17_19.2 (%Class) = var c +// CHECK:STDOUT: %c: ref @F.%Class.loc17_19.2 (%Class) = bind_name c, %c.var +// CHECK:STDOUT: %.loc17_23: @F.%MakeSelf.type (%MakeSelf.type) = specific_constant @Class.%MakeSelf.decl, @Class(constants.%T) [symbolic = %MakeSelf (constants.%MakeSelf)] +// CHECK:STDOUT: %MakeSelf.ref: @F.%MakeSelf.type (%MakeSelf.type) = name_ref MakeSelf, %.loc17_23 [symbolic = %MakeSelf (constants.%MakeSelf)] +// CHECK:STDOUT: %MakeSelf.specific_fn.loc17_23.1: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %MakeSelf.specific_fn.loc17_23.2 (constants.%MakeSelf.specific_fn)] +// CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_19.2 (%Class) = splice_block %c.var {} +// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_19.2 (%Class) = call %MakeSelf.specific_fn.loc17_23.1() to %.loc17_9 // CHECK:STDOUT: assign %c.var, %MakeSelf.call -// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.loc17_19.2 (constants.%Class.2)] -// CHECK:STDOUT: %s.var: ref @F.%Class.loc17_19.2 (%Class.2) = var s -// CHECK:STDOUT: %s: ref @F.%Class.loc17_19.2 (%Class.2) = bind_name s, %s.var -// CHECK:STDOUT: %.loc18_19.1: @F.%MakeClass.type (%MakeClass.type) = specific_constant @Class.%MakeClass.decl, @Class(constants.%T) [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %MakeClass.ref: @F.%MakeClass.type (%MakeClass.type) = name_ref MakeClass, %.loc18_19.1 [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %.loc18_19.2: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %.loc18_19.3 (constants.%.5)] -// CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_19.2 (%Class.2) = splice_block %s.var {} -// CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_19.2 (%Class.2) = call %.loc18_19.2() to %.loc18_9 +// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.loc17_19.2 (constants.%Class)] +// CHECK:STDOUT: %s.var: ref @F.%Class.loc17_19.2 (%Class) = var s +// CHECK:STDOUT: %s: ref @F.%Class.loc17_19.2 (%Class) = bind_name s, %s.var +// CHECK:STDOUT: %.loc18_19: @F.%MakeClass.type (%MakeClass.type) = specific_constant @Class.%MakeClass.decl, @Class(constants.%T) [symbolic = %MakeClass (constants.%MakeClass)] +// CHECK:STDOUT: %MakeClass.ref: @F.%MakeClass.type (%MakeClass.type) = name_ref MakeClass, %.loc18_19 [symbolic = %MakeClass (constants.%MakeClass)] +// CHECK:STDOUT: %MakeClass.specific_fn.loc18_19.1: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %MakeClass.specific_fn.loc18_19.2 (constants.%MakeClass.specific_fn)] +// CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_19.2 (%Class) = splice_block %s.var {} +// CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_19.2 (%Class) = call %MakeClass.specific_fn.loc18_19.1() to %.loc18_9 // CHECK:STDOUT: assign %s.var, %MakeClass.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -196,10 +196,10 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeSelf(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct => constants.%struct +// CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@MakeClass.%T) { @@ -209,10 +209,10 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeClass(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct => constants.%struct +// CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) {} @@ -229,11 +229,11 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeSelf(@F.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeClass(@F.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 6a45f0a3fc509..305f11bf08e25 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -64,11 +64,11 @@ var v: C(123) = (); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NoParams: type = class_type @NoParams [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %EmptyParams.type: type = generic_class_type @EmptyParams [template] -// CHECK:STDOUT: %EmptyParams.1: %EmptyParams.type = struct_value () [template] -// CHECK:STDOUT: %EmptyParams.2: type = class_type @EmptyParams [template] +// CHECK:STDOUT: %EmptyParams.generic: %EmptyParams.type = struct_value () [template] +// CHECK:STDOUT: %EmptyParams: type = class_type @EmptyParams [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,36 +89,36 @@ var v: C(123) = (); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NoParams.decl: type = class_decl @NoParams [template = constants.%NoParams] {} {} -// CHECK:STDOUT: %EmptyParams.decl: %EmptyParams.type = class_decl @EmptyParams [template = constants.%EmptyParams.1] {} {} +// CHECK:STDOUT: %EmptyParams.decl: %EmptyParams.type = class_decl @EmptyParams [template = constants.%EmptyParams.generic] {} {} // CHECK:STDOUT: %NoParams.ref: type = name_ref NoParams, %NoParams.decl [template = constants.%NoParams] // CHECK:STDOUT: %v.var: ref %NoParams = var v // CHECK:STDOUT: %v: ref %NoParams = bind_name v, %v.var -// CHECK:STDOUT: %EmptyParams.ref: %EmptyParams.type = name_ref EmptyParams, %EmptyParams.decl [template = constants.%EmptyParams.1] -// CHECK:STDOUT: %EmptyParams: type = class_type @EmptyParams [template = constants.%EmptyParams.2] -// CHECK:STDOUT: %w.var: ref %EmptyParams.2 = var w -// CHECK:STDOUT: %w: ref %EmptyParams.2 = bind_name w, %w.var +// CHECK:STDOUT: %EmptyParams.ref: %EmptyParams.type = name_ref EmptyParams, %EmptyParams.decl [template = constants.%EmptyParams.generic] +// CHECK:STDOUT: %EmptyParams: type = class_type @EmptyParams [template = constants.%EmptyParams] +// CHECK:STDOUT: %w.var: ref %EmptyParams = var w +// CHECK:STDOUT: %w: ref %EmptyParams = bind_name w, %w.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NoParams { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NoParams -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @EmptyParams { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%EmptyParams.2 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: .Self = constants.%EmptyParams +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.ref: ref %NoParams = name_ref v, file.%v -// CHECK:STDOUT: %.loc15: %EmptyParams.2 = converted %v.ref, [template = ] +// CHECK:STDOUT: %.loc15: %EmptyParams = converted %v.ref, [template = ] // CHECK:STDOUT: assign file.%w.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -129,26 +129,26 @@ var v: C(123) = (); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [template] -// CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] -// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] +// CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [template] +// CHECK:STDOUT: %Outer.1: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %Inner.type.1: type = generic_class_type @Inner, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.1: %Inner.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] -// CHECK:STDOUT: %Outer.3: type = class_type @Outer, @Outer(%.3) [template] -// CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%.3) [template] -// CHECK:STDOUT: %Inner.3: %Inner.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Inner.generic.1: %Inner.type.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.1: type = class_type @Inner, @Inner(%T, %U) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %empty_struct_type [template] +// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%ptr.1) [template] +// CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%ptr.1) [template] +// CHECK:STDOUT: %Inner.generic.2: %Inner.type.2 = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] -// CHECK:STDOUT: %Inner.4: type = class_type @Inner, @Inner(%.3, %.6) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %struct_type.a [template] +// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%ptr.1, %ptr.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -168,36 +168,36 @@ var v: C(123) = (); // CHECK:STDOUT: .w = %w // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.1] { +// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Outer.ref.loc9: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.1] -// CHECK:STDOUT: %.loc9_15: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_16.1: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc9_16.2: type = ptr_type %.1 [template = constants.%.3] -// CHECK:STDOUT: %Outer.loc9: type = class_type @Outer, @Outer(constants.%.3) [template = constants.%Outer.3] -// CHECK:STDOUT: %v.var: ref %Outer.3 = var v -// CHECK:STDOUT: %v: ref %Outer.3 = bind_name v, %v.var -// CHECK:STDOUT: %Outer.ref.loc19: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.1] -// CHECK:STDOUT: %.loc19_15: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_16.1: type = converted %.loc19_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_16.2: type = ptr_type %.1 [template = constants.%.3] -// CHECK:STDOUT: %Outer.loc19: type = class_type @Outer, @Outer(constants.%.3) [template = constants.%Outer.3] -// CHECK:STDOUT: %.loc19_18: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%.3) [template = constants.%Inner.3] -// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc19_18 [template = constants.%Inner.3] -// CHECK:STDOUT: %.loc19_30.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_30.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_30.3: type = converted %int.make_type_signed, %.loc19_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33: type = struct_type {.a: %i32} [template = constants.%.5] -// CHECK:STDOUT: %.loc19_34: type = ptr_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%.3, constants.%.6) [template = constants.%Inner.4] -// CHECK:STDOUT: %w.var: ref %Inner.4 = var w -// CHECK:STDOUT: %w: ref %Inner.4 = bind_name w, %w.var +// CHECK:STDOUT: %Outer.ref.loc9: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.generic] +// CHECK:STDOUT: %.loc9_15: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc9_16: type = converted %.loc9_15, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %ptr.loc9: type = ptr_type %empty_struct_type [template = constants.%ptr.1] +// CHECK:STDOUT: %Outer.loc9: type = class_type @Outer, @Outer(constants.%ptr.1) [template = constants.%Outer.2] +// CHECK:STDOUT: %v.var: ref %Outer.2 = var v +// CHECK:STDOUT: %v: ref %Outer.2 = bind_name v, %v.var +// CHECK:STDOUT: %Outer.ref.loc19: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.generic] +// CHECK:STDOUT: %.loc19_15: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_16: type = converted %.loc19_15, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %ptr.loc19_16: type = ptr_type %empty_struct_type [template = constants.%ptr.1] +// CHECK:STDOUT: %Outer.loc19: type = class_type @Outer, @Outer(constants.%ptr.1) [template = constants.%Outer.2] +// CHECK:STDOUT: %.loc19_18: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%ptr.1) [template = constants.%Inner.generic.2] +// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc19_18 [template = constants.%Inner.generic.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_30.2: type = converted %int.make_type_signed, %.loc19_30.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %ptr.loc19_34: type = ptr_type %struct_type.a [template = constants.%ptr.2] +// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%ptr.1, constants.%ptr.2) [template = constants.%Inner.2] +// CHECK:STDOUT: %w.var: ref %Inner.2 = var w +// CHECK:STDOUT: %w: ref %Inner.2 = bind_name w, %w.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_13.1: type) { @@ -206,22 +206,22 @@ var v: C(123) = (); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc4_13.2) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.generic: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner (constants.%Inner.1)] { +// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.1)] { // CHECK:STDOUT: %U.patt.loc5_15.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_15.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc5_15.1, runtime_param [symbolic = %U.patt.loc5_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc5_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Outer.2 +// CHECK:STDOUT: .Self = constants.%Outer.1 // CHECK:STDOUT: .Inner = %Inner.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,18 +232,18 @@ var v: C(123) = (); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Inner.2 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: .Self = constants.%Inner.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: ref %Outer.3 = name_ref v, file.%v -// CHECK:STDOUT: %.loc19: %Inner.4 = converted %v.ref, [template = ] +// CHECK:STDOUT: %v.ref: ref %Outer.2 = name_ref v, file.%v +// CHECK:STDOUT: %.loc19: %Inner.2 = converted %v.ref, [template = ] // CHECK:STDOUT: assign file.%w.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -263,18 +263,18 @@ var v: C(123) = (); // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%.3) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: specific @Outer(constants.%ptr.1) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 -// CHECK:STDOUT: %Inner => constants.%Inner.3 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%.3, constants.%.6) { -// CHECK:STDOUT: %U.loc5_15.2 => constants.%.6 -// CHECK:STDOUT: %U.patt.loc5_15.2 => constants.%.6 +// CHECK:STDOUT: specific @Inner(constants.%ptr.1, constants.%ptr.2) { +// CHECK:STDOUT: %U.loc5_15.2 => constants.%ptr.2 +// CHECK:STDOUT: %U.patt.loc5_15.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -282,27 +282,27 @@ var v: C(123) = (); // CHECK:STDOUT: --- fail_int_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%N.1) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 123 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%N.1) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 123 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.31) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_123.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -321,28 +321,28 @@ var v: C(123) = (); // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed, %.loc4_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 123 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_13.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_13.2: = bound_method %.loc12_10, %.loc12_13.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_13.3: = specific_function %.loc12_13.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_13.3(%.loc12_10) [template = constants.%.31] -// CHECK:STDOUT: %.loc12_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc12_13.5: %i32 = converted %.loc12_10, %.loc12_13.4 [template = constants.%.31] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] -// CHECK:STDOUT: %v.var: ref %C.3 = var v -// CHECK:STDOUT: %v: ref %C.3 = bind_name v, %v.var +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_123, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_123) [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc12_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_123.2] +// CHECK:STDOUT: %.loc12_13.2: %i32 = converted %int_123, %.loc12_13.1 [template = constants.%int_123.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_123.2) [template = constants.%C.2] +// CHECK:STDOUT: %v.var: ref %C.2 = var v +// CHECK:STDOUT: %v: ref %C.2 = bind_name v, %v.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%N.loc4_9.1: %i32) { @@ -352,18 +352,18 @@ var v: C(123) = (); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_19 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_18: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_19: %C.3 = converted %.loc12_18, [template = ] +// CHECK:STDOUT: %.loc12_19: %C.2 = converted %.loc12_18, [template = ] // CHECK:STDOUT: assign file.%v.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -373,9 +373,9 @@ var v: C(123) = (); // CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.31) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%.31 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%.31 +// CHECK:STDOUT: specific @C(constants.%int_123.2) { +// CHECK:STDOUT: %N.loc4_9.2 => constants.%int_123.2 +// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%int_123.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index 06f52de231607..b008b066f3dbc 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: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,7 +43,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -51,18 +51,18 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { -// CHECK:STDOUT: %self.patt: %Class.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %Class.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %Class = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %n.patt: %T = binding_pattern n // CHECK:STDOUT: %n.param_patt: %T = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc16: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2] -// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, %.loc16 [symbolic = constants.%Class.2] +// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] +// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, %.loc16 [symbolic = constants.%Class] // CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc16 [symbolic = constants.%T] -// CHECK:STDOUT: %self.param.loc16: %Class.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc16: %Class.2 = bind_name self, %self.param.loc16 +// CHECK:STDOUT: %self.param.loc16: %Class = value_param runtime_param0 +// CHECK:STDOUT: %self.loc16: %Class = bind_name self, %self.param.loc16 // CHECK:STDOUT: %n.param.loc16: %T = value_param runtime_param1 // CHECK:STDOUT: %n.loc16: %T = bind_name n, %n.param.loc16 // CHECK:STDOUT: } @@ -73,47 +73,47 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.a (constants.%struct_type.a)] +// CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { -// CHECK:STDOUT: %self.patt: %Class.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %Class.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %Class = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %n.patt: %T = binding_pattern n // CHECK:STDOUT: %n.param_patt: %T = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T.loc13 (constants.%T)] -// CHECK:STDOUT: %self.param.loc13: @F.%Class (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %self.loc13: @F.%Class (%Class.2) = bind_name self, %self.param.loc13 +// CHECK:STDOUT: %self.param.loc13: @F.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %self.loc13: @F.%Class (%Class) = bind_name self, %self.param.loc13 // CHECK:STDOUT: %n.param.loc13: @F.%T.loc13 (%T) = value_param runtime_param1 // CHECK:STDOUT: %n.loc13: @F.%T.loc13 (%T) = bind_name n, %n.param.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] +// CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 -// CHECK:STDOUT: .a = %.loc12_8.1 +// CHECK:STDOUT: .Self = constants.%Class +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc14_1.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc14_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T.loc13: type = bind_symbolic_name T, 0 [symbolic = %T.loc13 (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc13) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc13) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: %Class.2](%n.param_patt: %T) { +// CHECK:STDOUT: fn[%self.param_patt: %Class](%n.param_patt: %T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -124,12 +124,12 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.1 +// CHECK:STDOUT: %Class => constants.%Class +// CHECK:STDOUT: %Class.elem => constants.%Class.elem // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc14_1.2 => constants.%.2 -// CHECK:STDOUT: %.loc14_1.3 => constants.%.3 +// CHECK:STDOUT: %struct_type.a => constants.%struct_type.a +// CHECK:STDOUT: %complete_type.loc14_1.2 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@F.%T.loc13) { @@ -139,7 +139,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc13 => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(%T.loc11_13.2) { diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 9ad6b11c60668..d10065cc72352 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -53,20 +53,20 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty: type = class_type @Empty [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Field, %i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %ForwardDeclared [template] +// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] @@ -97,25 +97,25 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Empty { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Empty -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Field { -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed, %.loc8_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %.4 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8: %Field.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Field // CHECK:STDOUT: .x = %.loc8_8 -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared { @@ -128,29 +128,29 @@ fn Run() { // CHECK:STDOUT: %self: %ForwardDeclared = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %.loc15_23: type = ptr_type %ForwardDeclared [template = constants.%.7] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared [template = constants.%ptr] +// CHECK:STDOUT: %self.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%ForwardDeclared // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.7](); +// CHECK:STDOUT: fn @G[addr %self.param_patt: %ptr](); // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: @@ -159,38 +159,38 @@ fn Run() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Empty: type = class_type @Empty [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct.1: %Empty = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Empty.val: %Empty = struct_value () [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.5: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.4) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.4) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %Field = struct_value (%.36) [template] -// CHECK:STDOUT: %.37: type = unbound_element_type %Field, %i32 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.4) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Field.val: %Field = struct_value (%int_1.2) [template] +// CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] -// CHECK:STDOUT: %struct.3: %ForwardDeclared.1 = struct_value () [template] +// CHECK:STDOUT: %ForwardDeclared.val: %ForwardDeclared.1 = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.42: type = ptr_type %ForwardDeclared.1 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %ForwardDeclared.1 [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.43: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -203,16 +203,16 @@ fn Run() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+4, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//a, inst+29, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//a, inst+29, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst+9, unloaded -// CHECK:STDOUT: %import_ref.9: %.37 = import_ref Main//a, inst+27, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.46: = import_ref Main//a, inst+53, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.9: %Field.elem = import_ref Main//a, inst+27, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.46: = import_ref Main//a, inst+53, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.47 = import_ref Main//a, inst+32, unloaded // CHECK:STDOUT: %import_ref.48: %F.type = import_ref Main//a, inst+39, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.49: %G.type = import_ref Main//a, inst+50, loaded [template = constants.%G] -// CHECK:STDOUT: %import_ref.50: = import_ref Main//a, inst+53, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.50: = import_ref Main//a, inst+53, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.51 = import_ref Main//a, inst+32, unloaded // CHECK:STDOUT: %import_ref.52 = import_ref Main//a, inst+39, unloaded // CHECK:STDOUT: %import_ref.53 = import_ref Main//a, inst+50, unloaded @@ -268,67 +268,67 @@ fn Run() { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty] // CHECK:STDOUT: %a.var: ref %Empty = var a // CHECK:STDOUT: %a: ref %Empty = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_19.1: %.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: %.loc7_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_19.2: init %Empty = class_init (), %a.var [template = constants.%Empty.val] +// CHECK:STDOUT: %.loc7_20: init %Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%Empty.val] // CHECK:STDOUT: assign %a.var, %.loc7_20 // CHECK:STDOUT: %Field.ref: type = name_ref Field, imports.%import_ref.2 [template = constants.%Field] // CHECK:STDOUT: %b.var: ref %Field = var b // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var -// CHECK:STDOUT: %.loc9_24: Core.IntLiteral = int_value 1 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_25.1: %.9 = struct_literal (%.loc9_24) -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_24, %.loc9_25.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.4) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_25.4(%.loc9_24) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_25.5: init %i32 = converted %.loc9_24, %int.convert_checked.loc9 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_25.6: ref %i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc9_25.7: init %i32 = initialize_from %.loc9_25.5 to %.loc9_25.6 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_25.8: init %Field = class_init (%.loc9_25.7), %b.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc9_26: init %Field = converted %.loc9_25.1, %.loc9_25.8 [template = constants.%struct.2] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_25.1: %struct_type.x.2 = struct_literal (%int_1) +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_25.2: init %i32 = converted %int_1, %int.convert_checked.loc9 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_25.3: ref %i32 = class_element_access %b.var, element0 +// CHECK:STDOUT: %.loc9_25.4: init %i32 = initialize_from %.loc9_25.2 to %.loc9_25.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_25.5: init %Field = class_init (%.loc9_25.4), %b.var [template = constants.%Field.val] +// CHECK:STDOUT: %.loc9_26: init %Field = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%Field.val] // CHECK:STDOUT: assign %b.var, %.loc9_26 // CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b -// CHECK:STDOUT: %x.ref: %.37 = name_ref x, imports.%import_ref.9 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%import_ref.9 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 -// CHECK:STDOUT: %.loc10_9: Core.IntLiteral = int_value 2 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_9, %.loc10_7.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc10_7.3: = specific_function %.loc10_7.2, @Convert.2(constants.%.4) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_7.3(%.loc10_9) [template = constants.%.41] -// CHECK:STDOUT: %.loc10_7.4: init %i32 = converted %.loc10_9, %int.convert_checked.loc10 [template = constants.%.41] -// CHECK:STDOUT: assign %.loc10_4, %.loc10_7.4 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10: = bound_method %int_2, %impl.elem0.loc10 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10: = specific_function %Convert.bound.loc10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.specific_fn.loc10(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc10_7: init %i32 = converted %int_2, %int.convert_checked.loc10 [template = constants.%int_2.2] +// CHECK:STDOUT: assign %.loc10_4, %.loc10_7 // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %c.var: ref %ForwardDeclared.1 = var c // CHECK:STDOUT: %c: ref %ForwardDeclared.1 = bind_name c, %c.var -// CHECK:STDOUT: %.loc12_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc12_29.2: init %ForwardDeclared.1 = class_init (), %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc12_30: init %ForwardDeclared.1 = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc12_29.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_29.2: init %ForwardDeclared.1 = class_init (), %c.var [template = constants.%ForwardDeclared.val] +// CHECK:STDOUT: %.loc12_30: init %ForwardDeclared.1 = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%ForwardDeclared.val] // CHECK:STDOUT: assign %c.var, %.loc12_30 // CHECK:STDOUT: %c.ref.loc13: ref %ForwardDeclared.1 = name_ref c, %c // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.48 [template = constants.%F] -// CHECK:STDOUT: %.loc13_4: = bound_method %c.ref.loc13, %F.ref -// CHECK:STDOUT: %.loc13_3: %ForwardDeclared.1 = bind_value %c.ref.loc13 -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4(%.loc13_3) +// CHECK:STDOUT: %F.bound: = bound_method %c.ref.loc13, %F.ref +// CHECK:STDOUT: %.loc13: %ForwardDeclared.1 = bind_value %c.ref.loc13 +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc13) // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.1 = name_ref c, %c // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.49 [template = constants.%G] -// CHECK:STDOUT: %.loc14_4: = bound_method %c.ref.loc14, %G.ref -// CHECK:STDOUT: %.loc14_3: %.42 = addr_of %c.ref.loc14 -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc14_4(%.loc14_3) +// CHECK:STDOUT: %G.bound: = bound_method %c.ref.loc14, %G.ref +// CHECK:STDOUT: %addr.loc14: %ptr.3 = addr_of %c.ref.loc14 +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%addr.loc14) // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.42] -// CHECK:STDOUT: %d.var: ref %.42 = var d -// CHECK:STDOUT: %d: ref %.42 = bind_name d, %d.var +// CHECK:STDOUT: %ptr.loc16: type = ptr_type %ForwardDeclared.1 [template = constants.%ptr.3] +// CHECK:STDOUT: %d.var: ref %ptr.3 = var d +// CHECK:STDOUT: %d: ref %ptr.3 = bind_name d, %d.var // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %.loc16_29: %.42 = addr_of %c.ref.loc16 -// CHECK:STDOUT: assign %d.var, %.loc16_29 +// CHECK:STDOUT: %addr.loc16: %ptr.3 = addr_of %c.ref.loc16 +// CHECK:STDOUT: assign %d.var, %addr.loc16 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.4 [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.43] -// CHECK:STDOUT: %e.var: ref %.43 = var e -// CHECK:STDOUT: %e: ref %.43 = bind_name e, %e.var +// CHECK:STDOUT: %ptr.loc18: type = ptr_type %Incomplete [template = constants.%ptr.4] +// CHECK:STDOUT: %e.var: ref %ptr.4 = var e +// CHECK:STDOUT: %e: ref %ptr.4 = bind_name e, %e.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst+403: %.42](); +// CHECK:STDOUT: fn @G[addr .inst+403: %ptr.3](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 60190fc4965fd..b85408fe8d827 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -44,17 +44,17 @@ fn Run() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Unused.type: type = fn_type @Unused [template] // CHECK:STDOUT: %Unused: %Unused.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32, .unused: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %struct_type.x.unused: type = struct_type {.x: %i32, .unused: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.unused [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Child, %Base [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %Child.elem: type = unbound_element_type %Child, %Base [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,17 +93,17 @@ fn Run() { // CHECK:STDOUT: %self.param: %Base = value_param runtime_param0 // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed.loc8, %.loc8_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc9_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.3: type = converted %int.make_type_signed.loc9, %.loc9_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_13: %.2 = field_decl unused, element1 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed.loc8, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8: %Base.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_13: %Base.elem = field_decl unused, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.unused [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -111,19 +111,19 @@ fn Run() { // CHECK:STDOUT: .Unused = %Unused.decl // CHECK:STDOUT: .x = %.loc8_8 // CHECK:STDOUT: .unused = %.loc9_13 -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Child { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc13: %.6 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc13: %Child.elem = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Child // CHECK:STDOUT: .base = %.loc13 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Base](); @@ -138,33 +138,33 @@ fn Run() { // 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: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %i32, .unused: %i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.12: type = struct_type {.x: Core.IntLiteral, .unused: Core.IntLiteral} [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: %.12} [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.x.unused.1: type = struct_type {.x: %i32, .unused: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.unused.1 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.x.unused.2: type = struct_type {.x: Core.IntLiteral, .unused: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %struct_type.x.unused.2} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.38: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.41: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.40, %.43) [template] -// CHECK:STDOUT: %struct.2: %Child = struct_value (%struct.1) [template] -// CHECK:STDOUT: %.44: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Base.val: %Base = struct_value (%int_0.2, %int_1.2) [template] +// CHECK:STDOUT: %Child.val: %Child = struct_value (%Base.val) [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -177,13 +177,13 @@ fn Run() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+45, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+45, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.5: %F.type = import_ref Main//a, inst+10, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+19, unloaded -// CHECK:STDOUT: %import_ref.7: %.44 = import_ref Main//a, inst+38, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: %Base.elem = import_ref Main//a, inst+38, loaded [template = %.1] // CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst+43, unloaded -// CHECK:STDOUT: %import_ref.10: = import_ref Main//a, inst+54, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.10: = import_ref Main//a, inst+54, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst+48, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//a, inst+52, unloaded // CHECK:STDOUT: %import_ref.13: type = import_ref Main//a, inst+49, loaded [template = constants.%Base] @@ -224,49 +224,49 @@ fn Run() { // CHECK:STDOUT: %Child.ref: type = name_ref Child, imports.%import_ref.2 [template = constants.%Child] // CHECK:STDOUT: %a.var: ref %Child = var a // CHECK:STDOUT: %a: ref %Child = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_33: Core.IntLiteral = int_value 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc7_46: Core.IntLiteral = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc7_47.1: %.12 = struct_literal (%.loc7_33, %.loc7_46) -// CHECK:STDOUT: %.loc7_48.1: %.13 = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_47.3: = bound_method %.loc7_33, %.loc7_47.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc7_47.4: = specific_function %.loc7_47.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %.loc7_47.4(%.loc7_33) [template = constants.%.40] -// CHECK:STDOUT: %.loc7_47.5: init %i32 = converted %.loc7_33, %int.convert_checked.loc7_47.1 [template = constants.%.40] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc7_47.1: %struct_type.x.unused.2 = struct_literal (%int_0, %int_1) +// CHECK:STDOUT: %.loc7_48.1: %struct_type.base.3 = struct_literal (%.loc7_47.1) +// CHECK:STDOUT: %impl.elem0.loc7_47.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_47.1: = bound_method %int_0, %impl.elem0.loc7_47.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc7_47.1: = specific_function %Convert.bound.loc7_47.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %Convert.specific_fn.loc7_47.1(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_47.2: init %i32 = converted %int_0, %int.convert_checked.loc7_47.1 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc7_47.6: ref %i32 = class_element_access %.loc7_48.2, element0 -// CHECK:STDOUT: %.loc7_47.7: init %i32 = initialize_from %.loc7_47.5 to %.loc7_47.6 [template = constants.%.40] -// CHECK:STDOUT: %.loc7_47.8: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_47.9: = bound_method %.loc7_46, %.loc7_47.8 [template = constants.%.41] -// CHECK:STDOUT: %.loc7_47.10: = specific_function %.loc7_47.9, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %.loc7_47.10(%.loc7_46) [template = constants.%.43] -// CHECK:STDOUT: %.loc7_47.11: init %i32 = converted %.loc7_46, %int.convert_checked.loc7_47.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc7_47.12: ref %i32 = class_element_access %.loc7_48.2, element1 -// CHECK:STDOUT: %.loc7_47.13: init %i32 = initialize_from %.loc7_47.11 to %.loc7_47.12 [template = constants.%.43] -// CHECK:STDOUT: %.loc7_47.14: init %Base = class_init (%.loc7_47.7, %.loc7_47.13), %.loc7_48.2 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc7_48.3: init %Base = converted %.loc7_47.1, %.loc7_47.14 [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.3: ref %i32 = class_element_access %.loc7_48.2, element0 +// CHECK:STDOUT: %.loc7_47.4: init %i32 = initialize_from %.loc7_47.2 to %.loc7_47.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7_47.2: = bound_method %int_1, %impl.elem0.loc7_47.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc7_47.2: = specific_function %Convert.bound.loc7_47.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %Convert.specific_fn.loc7_47.2(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_47.5: init %i32 = converted %int_1, %int.convert_checked.loc7_47.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_47.6: ref %i32 = class_element_access %.loc7_48.2, element1 +// CHECK:STDOUT: %.loc7_47.7: init %i32 = initialize_from %.loc7_47.5 to %.loc7_47.6 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_47.8: init %Base = class_init (%.loc7_47.4, %.loc7_47.7), %.loc7_48.2 [template = constants.%Base.val] +// CHECK:STDOUT: %.loc7_48.3: init %Base = converted %.loc7_47.1, %.loc7_47.8 [template = constants.%Base.val] +// CHECK:STDOUT: %.loc7_48.4: init %Child = class_init (%.loc7_48.3), %a.var [template = constants.%Child.val] +// CHECK:STDOUT: %.loc7_49: init %Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%Child.val] // CHECK:STDOUT: assign %a.var, %.loc7_49 // CHECK:STDOUT: %a.ref.loc8: ref %Child = name_ref a, %a -// CHECK:STDOUT: %x.ref: %.44 = name_ref x, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %Base.elem = name_ref x, imports.%import_ref.7 [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: Core.IntLiteral = int_value 2 [template = constants.%.45] -// CHECK:STDOUT: %.loc8_7.1: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_7.2: = bound_method %.loc8_9, %.loc8_7.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc8_7.3: = specific_function %.loc8_7.2, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_7.3(%.loc8_9) [template = constants.%.48] -// CHECK:STDOUT: %.loc8_7.4: init %i32 = converted %.loc8_9, %int.convert_checked.loc8 [template = constants.%.48] -// CHECK:STDOUT: assign %.loc8_4.3, %.loc8_7.4 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2, %impl.elem0.loc8 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_7: init %i32 = converted %int_2, %int.convert_checked.loc8 [template = constants.%int_2.2] +// CHECK:STDOUT: assign %.loc8_4.3, %.loc8_7 // CHECK:STDOUT: %a.ref.loc9: ref %Child = name_ref a, %a // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.5 [template = constants.%F] -// CHECK:STDOUT: %.loc9_4: = bound_method %a.ref.loc9, %F.ref +// CHECK:STDOUT: %F.bound: = bound_method %a.ref.loc9, %F.ref // CHECK:STDOUT: %.loc9_3.1: ref %Base = class_element_access %a.ref.loc9, element0 // CHECK:STDOUT: %.loc9_3.2: ref %Base = converted %a.ref.loc9, %.loc9_3.1 // CHECK:STDOUT: %.loc9_3.3: %Base = bind_value %.loc9_3.2 -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc9_4(%.loc9_3.3) +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc9_3.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_forward_decl.carbon b/toolchain/check/testdata/class/import_forward_decl.carbon index 916a3f2345cf5..681a11700efff 100644 --- a/toolchain/check/testdata/class/import_forward_decl.carbon +++ b/toolchain/check/testdata/class/import_forward_decl.carbon @@ -49,8 +49,8 @@ class ForwardDecl { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardDecl: type = class_type @ForwardDecl [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,10 +72,10 @@ class ForwardDecl { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDecl { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%ForwardDecl -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index 8e1f7704bcac7..03179cdb39fd7 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -104,8 +104,8 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -125,21 +125,21 @@ var ptr: E* = &val; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -148,7 +148,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,9 +168,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %b_val.var: ref %C = var b_val // CHECK:STDOUT: %b_val: ref %C = bind_name b_val, %b_val.var // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.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: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %b_ptr.var: ref %ptr.2 = var b_ptr +// CHECK:STDOUT: %b_ptr: ref %ptr.2 = bind_name b_ptr, %b_ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -181,13 +181,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc8_17.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_17.2: init %C = class_init (), file.%b_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc8_18: init %C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%C.val] // 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: %.4 = addr_of %b_val.ref -// CHECK:STDOUT: assign file.%b_ptr.var, %.loc9 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %b_val.ref +// CHECK:STDOUT: assign file.%b_ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -195,10 +195,10 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -207,7 +207,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -227,9 +227,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %c_val.var: ref %C = var c_val // CHECK:STDOUT: %c_val: ref %C = bind_name c_val, %c_val.var // CHECK:STDOUT: %E.ref: type = name_ref E, %E [template = constants.%C] -// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.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: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %c_ptr.var: ref %ptr.2 = var c_ptr +// CHECK:STDOUT: %c_ptr: ref %ptr.2 = bind_name c_ptr, %c_ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -240,13 +240,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc8_17.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_17.2: init %C = class_init (), file.%c_val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc8_18: init %C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%C.val] // 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: %.4 = addr_of %c_val.ref -// CHECK:STDOUT: assign file.%c_ptr.var, %.loc9 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %c_val.ref +// CHECK:STDOUT: assign file.%c_ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -254,10 +254,10 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -269,7 +269,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -281,7 +281,7 @@ var ptr: E* = &val; // CHECK:STDOUT: .b_ptr = imports.%import_ref.4 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr +// CHECK:STDOUT: .ptr = %ptr.loc8_5 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import @@ -289,9 +289,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr -// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr +// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -302,13 +302,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc7_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // 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: %addr: %ptr.2 = addr_of %val.ref +// CHECK:STDOUT: assign file.%ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,10 +316,10 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -331,7 +331,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//a, inst+6, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -343,7 +343,7 @@ var ptr: E* = &val; // CHECK:STDOUT: .C = imports.%import_ref.4 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr +// CHECK:STDOUT: .ptr = %ptr.loc8_5 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import @@ -351,9 +351,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr -// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr +// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -364,13 +364,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc7_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // 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: %addr: %ptr.2 = addr_of %val.ref +// CHECK:STDOUT: assign file.%ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -378,10 +378,10 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -395,7 +395,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref Main//b, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//b, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.8 = import_ref Main//b, inst+10, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -409,7 +409,7 @@ var ptr: E* = &val; // CHECK:STDOUT: .c_ptr = imports.%import_ref.6 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr +// CHECK:STDOUT: .ptr = %ptr.loc8_5 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import @@ -417,9 +417,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr -// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr +// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -430,13 +430,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc7_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // 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: %addr: %ptr.2 = addr_of %val.ref +// CHECK:STDOUT: assign file.%ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -444,10 +444,10 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -461,7 +461,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref Main//b, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//b, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.8 = import_ref Main//b, inst+10, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -475,7 +475,7 @@ var ptr: E* = &val; // CHECK:STDOUT: .b_ptr = imports.%import_ref.6 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr +// CHECK:STDOUT: .ptr = %ptr.loc8_5 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import @@ -483,9 +483,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr -// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr +// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -496,13 +496,13 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc7_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // 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: %addr: %ptr.2 = addr_of %val.ref +// CHECK:STDOUT: assign file.%ptr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index bac31948f32a4..8d86dd902c7c2 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -30,10 +30,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 = unbound_element_type %Cycle, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %Cycle.elem: type = unbound_element_type %Cycle, %ptr [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %ptr} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,14 +54,14 @@ 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: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] +// CHECK:STDOUT: %.loc5: %Cycle.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Cycle -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: .a = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon @@ -70,9 +70,9 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %ptr} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,7 +81,7 @@ fn Run() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+11, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst+9, unloaded // CHECK:STDOUT: } @@ -107,9 +107,9 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, imports.%import_ref.1 [template = constants.%Cycle] -// CHECK:STDOUT: %.loc7: type = ptr_type %Cycle [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] +// CHECK:STDOUT: %a.var: ref %ptr = var a +// CHECK:STDOUT: %a: ref %ptr = 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 393c25fc67967..fa0e873cce95b 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -35,11 +35,11 @@ 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: %.1} [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Cycle, %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: %.2} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr} [template] +// CHECK:STDOUT: %Cycle.elem: type = unbound_element_type %Cycle, %struct_type.b [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %struct_type.b} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,24 +58,24 @@ fn Run() { // CHECK:STDOUT: %Core.import = import Core // 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: %.1} [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr} [template = constants.%struct_type.b] +// CHECK:STDOUT: %a.var: ref %struct_type.b = var a +// CHECK:STDOUT: %a: ref %struct_type.b = 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: %.1} [template = constants.%.2] -// CHECK:STDOUT: %.loc10_8: %.3 = field_decl c, element0 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr} [template = constants.%struct_type.b] +// CHECK:STDOUT: %.loc10: %Cycle.elem = field_decl c, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Cycle -// CHECK:STDOUT: .c = %.loc10_8 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: .c = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon @@ -84,23 +84,23 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] -// CHECK:STDOUT: %.2: type = struct_type {.b: %.1} [template] -// CHECK:STDOUT: %.3: type = struct_type {.c: %.2} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Cycle, %.2 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr.1} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %struct_type.b} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c [template] +// CHECK:STDOUT: %Cycle.elem: type = unbound_element_type %Cycle, %struct_type.b [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref Main//a, inst+11, loaded +// CHECK:STDOUT: %import_ref.2: ref %struct_type.b = import_ref Main//a, inst+11, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+19, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, inst+19, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst+4, unloaded -// CHECK:STDOUT: %import_ref.5: %.6 = import_ref Main//a, inst+17, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.5: %Cycle.elem = import_ref Main//a, inst+17, loaded [template = %.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -124,16 +124,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref.loc7_3: ref %.2 = name_ref a, imports.%import_ref.2 -// CHECK:STDOUT: %.loc7_4: ref %.1 = struct_access %a.ref.loc7_3, element0 -// CHECK:STDOUT: %a.ref.loc7_11: ref %.2 = name_ref a, imports.%import_ref.2 -// CHECK:STDOUT: %.loc7_12.1: ref %.1 = struct_access %a.ref.loc7_11, element0 -// CHECK:STDOUT: %.loc7_12.2: %.1 = bind_value %.loc7_12.1 +// CHECK:STDOUT: %a.ref.loc7_3: ref %struct_type.b = name_ref a, imports.%import_ref.2 +// CHECK:STDOUT: %.loc7_4: ref %ptr.1 = struct_access %a.ref.loc7_3, element0 +// CHECK:STDOUT: %a.ref.loc7_11: ref %struct_type.b = name_ref a, imports.%import_ref.2 +// CHECK:STDOUT: %.loc7_12.1: ref %ptr.1 = struct_access %a.ref.loc7_11, element0 +// CHECK:STDOUT: %.loc7_12.2: %ptr.1 = bind_value %.loc7_12.1 // CHECK:STDOUT: %.loc7_10: ref %Cycle = deref %.loc7_12.2 -// CHECK:STDOUT: %c.ref: %.6 = name_ref c, imports.%import_ref.5 [template = imports.%.1] -// CHECK:STDOUT: %.loc7_15: ref %.2 = class_element_access %.loc7_10, element0 -// CHECK:STDOUT: %.loc7_17.1: ref %.1 = struct_access %.loc7_15, element0 -// CHECK:STDOUT: %.loc7_17.2: %.1 = bind_value %.loc7_17.1 +// CHECK:STDOUT: %c.ref: %Cycle.elem = name_ref c, imports.%import_ref.5 [template = imports.%.1] +// CHECK:STDOUT: %.loc7_15: ref %struct_type.b = class_element_access %.loc7_10, element0 +// CHECK:STDOUT: %.loc7_17.1: ref %ptr.1 = struct_access %.loc7_15, element0 +// CHECK:STDOUT: %.loc7_17.2: %ptr.1 = bind_value %.loc7_17.1 // CHECK:STDOUT: assign %.loc7_4, %.loc7_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 61745ebb7a236..9aa93c14b6fe2 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -230,21 +230,21 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Shape, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Shape.elem: type = unbound_element_type %Shape, %i32 [template] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.y [template] // CHECK:STDOUT: %Circle: type = class_type @Circle [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Circle, %Shape [template] +// CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %Shape [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Shape} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -267,28 +267,28 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { -// CHECK:STDOUT: %.loc5_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.3: type = converted %int.make_type_signed.loc5, %.loc5_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.3: type = converted %int.make_type_signed.loc6, %.loc6_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18: %.2 = field_decl y, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed.loc5, %.loc5_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18: %Shape.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_20.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_20.2: type = converted %int.make_type_signed.loc6, %.loc6_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_18: %Shape.elem = field_decl y, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape // CHECK:STDOUT: .x [protected] = %.loc5_18 // CHECK:STDOUT: .y [protected] = %.loc6_18 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { // CHECK:STDOUT: %Shape.ref: type = name_ref Shape, file.%Shape.decl [template = constants.%Shape] -// CHECK:STDOUT: %.loc10: %.6 = base_decl %Shape.ref, element0 [template] +// CHECK:STDOUT: %.loc10: %Circle.elem = base_decl %Shape.ref, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Circle = value_param_pattern %self.patt, runtime_param0 @@ -296,10 +296,10 @@ class B { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %.loc12_36: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_36: init type = call constants.%Int(%.loc12_36) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_41: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_41: init type = call constants.%Int(%.loc12_41) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_36: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_36: init type = call constants.%Int(%int_32.loc12_36) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_41: init type = call constants.%Int(%int_32.loc12_41) [template = constants.%i32] // CHECK:STDOUT: %.loc12_44.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_36, %int.make_type_signed.loc12_41) // CHECK:STDOUT: %.loc12_44.2: type = value_of_initializer %int.make_type_signed.loc12_36 [template = constants.%i32] // CHECK:STDOUT: %.loc12_44.3: type = converted %int.make_type_signed.loc12_36, %.loc12_44.2 [template = constants.%i32] @@ -311,37 +311,37 @@ class B { // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle // CHECK:STDOUT: .base = %.loc10 // CHECK:STDOUT: .GetPosition = %GetPosition.decl // CHECK:STDOUT: extend %Shape.ref -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @GetPosition[%self.param_patt: %Circle]() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc13_13: %Circle = name_ref self, %self -// CHECK:STDOUT: %x.ref: %.2 = name_ref x, @Shape.%.loc5_18 [template = @Shape.%.loc5_18] +// CHECK:STDOUT: %x.ref: %Shape.elem = name_ref x, @Shape.%.loc5_18 [template = @Shape.%.loc5_18] // CHECK:STDOUT: %.loc13_17.1: ref %Shape = class_element_access %self.ref.loc13_13, element0 // CHECK:STDOUT: %.loc13_17.2: ref %Shape = converted %self.ref.loc13_13, %.loc13_17.1 // CHECK:STDOUT: %.loc13_17.3: ref %i32 = class_element_access %.loc13_17.2, element0 // CHECK:STDOUT: %self.ref.loc13_21: %Circle = name_ref self, %self -// CHECK:STDOUT: %y.ref: %.2 = name_ref y, @Shape.%.loc6_18 [template = @Shape.%.loc6_18] +// CHECK:STDOUT: %y.ref: %Shape.elem = name_ref y, @Shape.%.loc6_18 [template = @Shape.%.loc6_18] // CHECK:STDOUT: %.loc13_25.1: ref %Shape = class_element_access %self.ref.loc13_21, element0 // CHECK:STDOUT: %.loc13_25.2: ref %Shape = converted %self.ref.loc13_21, %.loc13_25.1 // CHECK:STDOUT: %.loc13_25.3: ref %i32 = class_element_access %.loc13_25.2, element1 // CHECK:STDOUT: %.loc13_27.1: %tuple.type.2 = tuple_literal (%.loc13_17.3, %.loc13_25.3) // CHECK:STDOUT: %.loc13_17.4: %i32 = bind_value %.loc13_17.3 -// CHECK:STDOUT: %.loc13_27.2: ref %i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_27.3: init %i32 = initialize_from %.loc13_17.4 to %.loc13_27.2 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 +// CHECK:STDOUT: %.loc13_27.2: init %i32 = initialize_from %.loc13_17.4 to %tuple.elem0 // CHECK:STDOUT: %.loc13_25.4: %i32 = bind_value %.loc13_25.3 -// CHECK:STDOUT: %.loc13_27.4: ref %i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_25.4 to %.loc13_27.4 -// CHECK:STDOUT: %.loc13_27.6: init %tuple.type.2 = tuple_init (%.loc13_27.3, %.loc13_27.5) to %return -// CHECK:STDOUT: %.loc13_28: init %tuple.type.2 = converted %.loc13_27.1, %.loc13_27.6 +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return, element1 +// CHECK:STDOUT: %.loc13_27.3: init %i32 = initialize_from %.loc13_25.4 to %tuple.elem1 +// CHECK:STDOUT: %.loc13_27.4: init %tuple.type.2 = tuple_init (%.loc13_27.2, %.loc13_27.3) to %return +// CHECK:STDOUT: %.loc13_28: init %tuple.type.2 = converted %.loc13_27.1, %.loc13_27.4 // CHECK:STDOUT: return %.loc13_28 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -352,24 +352,24 @@ class B { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.3 [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -396,41 +396,41 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.4 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %B.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_21.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_21.3: type = converted %int.make_type_signed, %.loc10_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_21.2: type = converted %int.make_type_signed, %.loc10_21.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .F [private] = %F.decl // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc14: %.10 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %.loc14: %C.elem = base_decl %B.ref, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 @@ -445,14 +445,14 @@ class B { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.11 [template = constants.%.12] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc14 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); @@ -475,30 +475,30 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [template] // CHECK:STDOUT: %SomeProtectedFunction: %SomeProtectedFunction.type = struct_value () [template] -// CHECK:STDOUT: %.30: type = struct_type {} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.33: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.34: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.35: = complete_type_witness %.34 [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -522,49 +522,49 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed, %.loc5_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_39.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_39.2: = bound_method %.loc5_38, %.loc5_39.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_39.3: = specific_function %.loc5_39.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_39.3(%.loc5_38) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_39.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc5_39.5: %i32 = converted %.loc5_38, %.loc5_39.4 [template = constants.%.29] -// CHECK:STDOUT: %SOME_CONSTANT: %i32 = bind_name SOME_CONSTANT, %.loc5_39.5 +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_signed, %.loc5_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int_5, %.loc5_39.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %SOME_CONSTANT: %i32 = bind_name SOME_CONSTANT, %.loc5_39.2 // CHECK:STDOUT: %SomeProtectedFunction.decl: %SomeProtectedFunction.type = fn_decl @SomeProtectedFunction [template = constants.%SomeProtectedFunction] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_43.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_43.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.3: type = converted %int.make_type_signed, %.loc6_43.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_43.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_43.2: type = converted %int.make_type_signed, %.loc6_43.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .SOME_CONSTANT [protected] = %SOME_CONSTANT // CHECK:STDOUT: .SomeProtectedFunction [protected] = %SomeProtectedFunction.decl -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc12: %.33 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc12: %B.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed, %.loc14_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -572,14 +572,14 @@ class B { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.3: type = converted %int.make_type_signed, %.loc18_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed, %.loc18_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.34 [template = constants.%.35] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -587,19 +587,19 @@ class B { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeProtectedFunction() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_12: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_13.2: = bound_method %.loc7_12, %.loc7_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_13.3: = specific_function %.loc7_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_13.3(%.loc7_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc7_13.5: %i32 = converted %.loc7_12, %.loc7_13.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc7_13.5 +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc7_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc7_13.2: %i32 = converted %int_5, %.loc7_13.1 [template = constants.%int_5.2] +// CHECK:STDOUT: return %.loc7_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -623,19 +623,19 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Shape, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Shape.elem: type = unbound_element_type %Shape, %i32 [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %Square: type = class_type @Square [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Square, %Shape [template] +// CHECK:STDOUT: %Square.elem: type = unbound_element_type %Square, %Shape [template] // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Shape} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -658,22 +658,22 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { -// CHECK:STDOUT: %.loc5_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.3: type = converted %int.make_type_signed, %.loc5_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_16: %.2 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed, %.loc5_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_16: %Shape.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape // CHECK:STDOUT: .y [private] = %.loc5_16 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Square { // CHECK:STDOUT: %Shape.ref: type = name_ref Shape, file.%Shape.decl [template = constants.%Shape] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %Shape.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %Square.elem = base_decl %Shape.ref, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %self.patt: %Square = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Square = value_param_pattern %self.patt, runtime_param0 @@ -681,23 +681,23 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Square [template = constants.%Square] -// CHECK:STDOUT: %.loc11_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_35.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_35.3: type = converted %int.make_type_signed, %.loc11_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_35.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_35.2: type = converted %int.make_type_signed, %.loc11_35.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %Square = value_param runtime_param0 // CHECK:STDOUT: %self: %Square = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Square // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .GetPosition = %GetPosition.decl // CHECK:STDOUT: extend %Shape.ref -// CHECK:STDOUT: complete_type_witness = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @GetPosition[%self.param_patt: %Square]() -> %i32 { @@ -716,8 +716,8 @@ class B { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -739,13 +739,13 @@ class B { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F [private] = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -770,8 +770,8 @@ class B { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -793,13 +793,13 @@ class B { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F [protected] = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -821,14 +821,14 @@ class B { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -851,26 +851,26 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .F [private] = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc9: %.4 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %C.elem = base_decl %B.ref, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc18: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -892,14 +892,14 @@ class B { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -922,26 +922,26 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .F [protected] = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc9: %.4 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %C.elem = base_decl %B.ref, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc11: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -961,29 +961,29 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.30: type = struct_type {} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Internal: type = class_type @Internal [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.33: type = unbound_element_type %B, %Internal [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %Internal [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %SomeFunc.type: type = fn_type @SomeFunc [template] // CHECK:STDOUT: %SomeFunc: %SomeFunc.type = struct_value () [template] -// CHECK:STDOUT: %.34: type = struct_type {.internal: %Internal} [template] -// CHECK:STDOUT: %.35: = complete_type_witness %.34 [template] +// CHECK:STDOUT: %struct_type.internal.1: type = struct_type {.internal: %Internal} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.internal.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1009,71 +1009,71 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_42.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_42.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_42.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_42.3: type = converted %int.make_type_signed.loc5, %.loc5_42.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_48: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_49.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_49.2: = bound_method %.loc5_48, %.loc5_49.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_49.3: = specific_function %.loc5_49.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_49.3(%.loc5_48) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_49.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_49.5: %i32 = converted %.loc5_48, %.loc5_49.4 [template = constants.%.29] -// CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: %i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_49.5 -// CHECK:STDOUT: %.loc6_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_38.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_38.3: type = converted %int.make_type_signed.loc6, %.loc6_38.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_45.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_45.2: = bound_method %.loc6_44, %.loc6_45.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_45.3: = specific_function %.loc6_45.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_45.3(%.loc6_44) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_45.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_45.5: %i32 = converted %.loc6_44, %.loc6_45.4 [template = constants.%.29] -// CHECK:STDOUT: %SOME_PRIVATE_CONSTANT: %i32 = bind_name SOME_PRIVATE_CONSTANT, %.loc6_45.5 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_42.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_42.2: type = converted %int.make_type_signed.loc5, %.loc5_42.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_49.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc5_49.2: %i32 = converted %int_5.loc5, %.loc5_49.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: %i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_49.2 +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_38.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_38.2: type = converted %int.make_type_signed.loc6, %.loc6_38.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_45.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc6_45.2: %i32 = converted %int_5.loc6, %.loc6_45.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %SOME_PRIVATE_CONSTANT: %i32 = bind_name SOME_PRIVATE_CONSTANT, %.loc6_45.2 +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .SOME_PROTECTED_CONSTANT [protected] = %SOME_PROTECTED_CONSTANT // CHECK:STDOUT: .SOME_PRIVATE_CONSTANT [private] = %SOME_PRIVATE_CONSTANT -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Internal { -// CHECK:STDOUT: %.loc10_36.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_36.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_36.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_36.3: type = converted %int.make_type_signed, %.loc10_36.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_42: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_43.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_43.2: = bound_method %.loc10_42, %.loc10_43.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_43.3: = specific_function %.loc10_43.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_43.3(%.loc10_42) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_43.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc10_43.5: %i32 = converted %.loc10_42, %.loc10_43.4 [template = constants.%.29] -// CHECK:STDOUT: %INTERNAL_CONSTANT: %i32 = bind_name INTERNAL_CONSTANT, %.loc10_43.5 -// CHECK:STDOUT: %.loc11: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_36.2: type = converted %int.make_type_signed, %.loc10_36.1 [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int_5, %.loc10_43.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %INTERNAL_CONSTANT: %i32 = bind_name INTERNAL_CONSTANT, %.loc10_43.2 +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Internal // CHECK:STDOUT: .INTERNAL_CONSTANT [protected] = %INTERNAL_CONSTANT -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %Internal.ref: type = name_ref Internal, file.%Internal.decl [template = constants.%Internal] -// CHECK:STDOUT: %.loc14: %.33 = field_decl internal, element0 [template] +// CHECK:STDOUT: %.loc14: %B.elem = field_decl internal, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = converted %int.make_type_signed, %.loc16_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1084,23 +1084,23 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %.loc36_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc36_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_32.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc36_32.3: type = converted %int.make_type_signed, %.loc36_32.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc36_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc36_32.2: type = converted %int.make_type_signed, %.loc36_32.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc46: = complete_type_witness %.34 [template = constants.%.35] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.internal.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .internal [private] = %.loc14 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .SomeFunc = %SomeFunc.decl -// CHECK:STDOUT: complete_type_witness = %.loc46 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -1115,7 +1115,7 @@ class B { // CHECK:STDOUT: fn @SomeFunc[%self.param_patt: %B]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self -// CHECK:STDOUT: %internal.ref: %.33 = name_ref internal, @B.%.loc14 [template = @B.%.loc14] +// CHECK:STDOUT: %internal.ref: %B.elem = name_ref internal, @B.%.loc14 [template = @B.%.loc14] // CHECK:STDOUT: %.loc44_16.1: ref %Internal = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc44_16.2: %Internal = bind_value %.loc44_16.1 // CHECK:STDOUT: %INTERNAL_CONSTANT.ref: = name_ref INTERNAL_CONSTANT, [template = ] @@ -1126,19 +1126,19 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1161,22 +1161,22 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.3: type = converted %int.make_type_signed, %.loc5_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_16: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed, %.loc5_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_16: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x [private] = %.loc5_16 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %B.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 @@ -1185,14 +1185,14 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %B]() { @@ -1207,19 +1207,19 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1242,22 +1242,22 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.3: type = converted %int.make_type_signed, %.loc5_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed, %.loc5_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .x [protected] = %.loc5_18 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %A.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %B.elem = base_decl %A.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 @@ -1266,21 +1266,21 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %A.ref -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %B]() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %x.ref: %.2 = name_ref x, @A.%.loc5_18 [template = @A.%.loc5_18] +// CHECK:STDOUT: %x.ref: %A.elem = name_ref x, @A.%.loc5_18 [template = @A.%.loc5_18] // CHECK:STDOUT: %.loc12_9.1: ref %A = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_9.2: ref %A = converted %self.ref, %.loc12_9.1 // CHECK:STDOUT: %.loc12_9.3: ref %i32 = class_element_access %.loc12_9.2, element0 diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index 0c7597e4adc4d..469a7bd268ad6 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -25,20 +25,20 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Class [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Class, %.3 [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: %i32, .next: %.3} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem.1: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] +// CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class, %ptr.1 [template] +// CHECK:STDOUT: %struct_type.n.next: type = struct_type {.n: %i32, .next: %ptr.1} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [template] // CHECK:STDOUT: %MakeReorder: %MakeReorder.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.next: %.3, .n: %i32} [template] +// CHECK:STDOUT: %struct_type.next.n: type = struct_type {.next: %ptr.1, .n: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,90 +61,90 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %next.patt: %.3 = binding_pattern next -// CHECK:STDOUT: %next.param_patt: %.3 = value_param_pattern %next.patt, runtime_param1 +// CHECK:STDOUT: %next.patt: %ptr.1 = binding_pattern next +// CHECK:STDOUT: %next.param_patt: %ptr.1 = value_param_pattern %next.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.3: type = converted %int.make_type_signed, %.loc16_12.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_signed, %.loc16_12.1 [template = constants.%i32] // CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16_28: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param -// CHECK:STDOUT: %next.param: %.3 = value_param runtime_param1 -// CHECK:STDOUT: %next: %.3 = bind_name next, %next.param +// CHECK:STDOUT: %next.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %next: %ptr.1 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MakeReorder.decl: %MakeReorder.type = fn_decl @MakeReorder [template = constants.%MakeReorder] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %next.patt: %.3 = binding_pattern next -// CHECK:STDOUT: %next.param_patt: %.3 = value_param_pattern %next.patt, runtime_param1 +// CHECK:STDOUT: %next.patt: %ptr.1 = binding_pattern next +// CHECK:STDOUT: %next.param_patt: %ptr.1 = value_param_pattern %next.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc20_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.3: type = converted %int.make_type_signed, %.loc20_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_signed, %.loc20_19.1 [template = constants.%i32] // CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc20_35: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param -// CHECK:STDOUT: %next.param: %.3 = value_param runtime_param1 -// CHECK:STDOUT: %next: %.3 = bind_name next, %next.param +// CHECK:STDOUT: %next.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %next: %ptr.1 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem.1 = field_decl n, element0 [template] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_18: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %.loc13_11: %.4 = field_decl next, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc13: %Class.elem.2 = field_decl next, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .n = %.loc12_8 -// CHECK:STDOUT: .next = %.loc13_11 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: .next = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make(%n.param_patt: %i32, %next.param_patt: %.3) -> %return: %Class { +// CHECK:STDOUT: fn @Make(%n.param_patt: %i32, %next.param_patt: %ptr.1) -> %return: %Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next -// CHECK:STDOUT: %.loc17_31.1: %.5 = struct_literal (%n.ref, %next.ref) +// CHECK:STDOUT: %next.ref: %ptr.1 = name_ref next, %next +// CHECK:STDOUT: %.loc17_31.1: %struct_type.n.next = struct_literal (%n.ref, %next.ref) // CHECK:STDOUT: %.loc17_31.2: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc17_31.3: init %i32 = initialize_from %n.ref to %.loc17_31.2 -// CHECK:STDOUT: %.loc17_31.4: ref %.3 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_31.5: init %.3 = initialize_from %next.ref to %.loc17_31.4 +// CHECK:STDOUT: %.loc17_31.4: ref %ptr.1 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc17_31.5: init %ptr.1 = initialize_from %next.ref to %.loc17_31.4 // CHECK:STDOUT: %.loc17_31.6: init %Class = class_init (%.loc17_31.3, %.loc17_31.5), %return // CHECK:STDOUT: %.loc17_32: init %Class = converted %.loc17_31.1, %.loc17_31.6 // CHECK:STDOUT: return %.loc17_32 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeReorder(%n.param_patt: %i32, %next.param_patt: %.3) -> %return: %Class { +// CHECK:STDOUT: fn @MakeReorder(%n.param_patt: %i32, %next.param_patt: %ptr.1) -> %return: %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next +// CHECK:STDOUT: %next.ref: %ptr.1 = name_ref next, %next // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc21_31.1: %.8 = struct_literal (%next.ref, %n.ref) +// CHECK:STDOUT: %.loc21_31.1: %struct_type.next.n = struct_literal (%next.ref, %n.ref) // CHECK:STDOUT: %.loc21_31.2: ref %i32 = class_element_access %return, element1 // CHECK:STDOUT: %.loc21_31.3: init %i32 = initialize_from %n.ref to %.loc21_31.2 -// CHECK:STDOUT: %.loc21_31.4: ref %.3 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc21_31.5: init %.3 = initialize_from %next.ref to %.loc21_31.4 +// CHECK:STDOUT: %.loc21_31.4: ref %ptr.1 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc21_31.5: init %ptr.1 = initialize_from %next.ref to %.loc21_31.4 // CHECK:STDOUT: %.loc21_31.6: init %Class = class_init (%.loc21_31.3, %.loc21_31.5), %return // CHECK:STDOUT: %.loc21_32: init %Class = converted %.loc21_31.1, %.loc21_31.6 // CHECK:STDOUT: return %.loc21_32 to %return diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index c2e8735dc7dd8..9d28cc678f092 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -95,28 +95,28 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -176,33 +176,33 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %.loc5_8 // CHECK:STDOUT: .b = %.loc6_8 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeC() -> %C; @@ -211,27 +211,27 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_26: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_27.1: %.8 = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.6: ref %C = temporary_storage -// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.6, element0 -// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.13: ref %i32 = class_element_access %.loc13_27.6, element1 -// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.15: init %C = class_init (%.loc13_27.8, %.loc13_27.14), %.loc13_27.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_27.16: ref %C = temporary %.loc13_27.6, %.loc13_27.15 -// CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.16 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_27.2: init %i32 = converted %int_1, %int.convert_checked.loc13_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage +// CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 +// CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.6: init %i32 = converted %int_2, %int.convert_checked.loc13_27.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.3, element1 +// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.6 to %.loc13_27.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.9: init %C = class_init (%.loc13_27.5, %.loc13_27.8), %.loc13_27.3 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_27.10: ref %C = temporary %.loc13_27.3, %.loc13_27.9 +// CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.10 // CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 // CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %a.ref: %C = name_ref a, %a @@ -265,28 +265,28 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -346,33 +346,33 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed.loc5, %.loc5_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %.loc5_8 // CHECK:STDOUT: .b = %.loc6_8 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.ref [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeC() -> %C; @@ -381,27 +381,27 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_26: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_27.1: %.8 = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.6: ref %C = temporary_storage -// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.6, element0 -// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.13: ref %i32 = class_element_access %.loc13_27.6, element1 -// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_27.15: init %C = class_init (%.loc13_27.8, %.loc13_27.14), %.loc13_27.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_27.16: ref %C = temporary %.loc13_27.6, %.loc13_27.15 -// CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.16 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_27.2: init %i32 = converted %int_1, %int.convert_checked.loc13_27.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage +// CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 +// CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.6: init %i32 = converted %int_2, %int.convert_checked.loc13_27.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.3, element1 +// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.6 to %.loc13_27.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_27.9: init %C = class_init (%.loc13_27.5, %.loc13_27.8), %.loc13_27.3 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_27.10: ref %C = temporary %.loc13_27.3, %.loc13_27.9 +// CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.10 // CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 // CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %a.ref: %C = name_ref a, %a diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 31059fec87359..5852c378d6319 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -21,29 +21,29 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,60 +67,60 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.3: type = converted %int.make_type_signed, %.loc16_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed, %.loc16_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_17: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_25: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_26.1: %.7 = struct_literal (%.loc17_17, %.loc17_25) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc17_26.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_26.3: = bound_method %.loc17_17, %.loc17_26.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_26.4: = specific_function %.loc17_26.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %.loc17_26.4(%.loc17_17) [template = constants.%.35] -// CHECK:STDOUT: %.loc17_26.5: init %i32 = converted %.loc17_17, %int.convert_checked.loc17_26.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_26.6: ref %Class = temporary_storage -// CHECK:STDOUT: %.loc17_26.7: ref %i32 = class_element_access %.loc17_26.6, element0 -// CHECK:STDOUT: %.loc17_26.8: init %i32 = initialize_from %.loc17_26.5 to %.loc17_26.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_26.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_26.10: = bound_method %.loc17_25, %.loc17_26.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc17_26.11: = specific_function %.loc17_26.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %.loc17_26.11(%.loc17_25) [template = constants.%.38] -// CHECK:STDOUT: %.loc17_26.12: init %i32 = converted %.loc17_25, %int.convert_checked.loc17_26.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_26.13: ref %i32 = class_element_access %.loc17_26.6, element1 -// CHECK:STDOUT: %.loc17_26.14: init %i32 = initialize_from %.loc17_26.12 to %.loc17_26.13 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_26.15: init %Class = class_init (%.loc17_26.8, %.loc17_26.14), %.loc17_26.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc17_26.16: ref %Class = temporary %.loc17_26.6, %.loc17_26.15 -// CHECK:STDOUT: %.loc17_28: ref %Class = converted %.loc17_26.1, %.loc17_26.16 -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %impl.elem0.loc17_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_26.1: = bound_method %int_1, %impl.elem0.loc17_26.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc17_26.1: = specific_function %Convert.bound.loc17_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %Convert.specific_fn.loc17_26.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_26.2: init %i32 = converted %int_1, %int.convert_checked.loc17_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_26.3: ref %Class = temporary_storage +// CHECK:STDOUT: %.loc17_26.4: ref %i32 = class_element_access %.loc17_26.3, element0 +// CHECK:STDOUT: %.loc17_26.5: init %i32 = initialize_from %.loc17_26.2 to %.loc17_26.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_26.2: = bound_method %int_2, %impl.elem0.loc17_26.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_26.2: = specific_function %Convert.bound.loc17_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %Convert.specific_fn.loc17_26.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_26.6: init %i32 = converted %int_2, %int.convert_checked.loc17_26.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_26.7: ref %i32 = class_element_access %.loc17_26.3, element1 +// CHECK:STDOUT: %.loc17_26.8: init %i32 = initialize_from %.loc17_26.6 to %.loc17_26.7 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_26.9: init %Class = class_init (%.loc17_26.5, %.loc17_26.8), %.loc17_26.3 [template = constants.%Class.val] +// CHECK:STDOUT: %.loc17_26.10: ref %Class = temporary %.loc17_26.3, %.loc17_26.9 +// CHECK:STDOUT: %.loc17_28: ref %Class = converted %.loc17_26.1, %.loc17_26.10 +// CHECK:STDOUT: %a.ref: %Class.elem = 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 fb03e7038e8e4..460e576e9785d 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -28,19 +28,19 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Inner, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %MakeInner.type: type = fn_type @MakeInner [template] // CHECK:STDOUT: %MakeInner: %MakeInner.type = struct_value () [template] // CHECK:STDOUT: %Outer: type = class_type @Outer [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Outer, %Inner [template] -// CHECK:STDOUT: %.7: type = struct_type {.c: %Inner, .d: %Inner} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %Outer.elem: type = unbound_element_type %Outer, %Inner [template] +// CHECK:STDOUT: %struct_type.c.d.1: type = struct_type {.c: %Inner, .d: %Inner} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.c.d.1 [template] // CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [template] // CHECK:STDOUT: %MakeOuter: %MakeOuter.type = struct_value () [template] // CHECK:STDOUT: } @@ -83,37 +83,37 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Inner.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %Inner.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { // CHECK:STDOUT: %Inner.ref.loc19: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc19: %.6 = field_decl c, element0 [template] +// CHECK:STDOUT: %.loc19: %Outer.elem = field_decl c, element0 [template] // CHECK:STDOUT: %Inner.ref.loc20: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc20: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc20: %Outer.elem = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.d.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer // CHECK:STDOUT: .c = %.loc19 // CHECK:STDOUT: .d = %.loc20 -// CHECK:STDOUT: complete_type_witness = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeInner() -> %Inner; @@ -126,7 +126,7 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %MakeInner.ref.loc24_34: %MakeInner.type = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.2: ref %Inner = class_element_access %return, element1 // CHECK:STDOUT: %MakeInner.call.loc24_44: init %Inner = call %MakeInner.ref.loc24_34() to %.loc24_45.2 -// CHECK:STDOUT: %.loc24_45.3: %.7 = struct_literal (%MakeInner.call.loc24_26, %MakeInner.call.loc24_44) +// CHECK:STDOUT: %.loc24_45.3: %struct_type.c.d.1 = struct_literal (%MakeInner.call.loc24_26, %MakeInner.call.loc24_44) // CHECK:STDOUT: %.loc24_45.4: init %Outer = class_init (%MakeInner.call.loc24_26, %MakeInner.call.loc24_44), %return // CHECK:STDOUT: %.loc24_46: init %Outer = converted %.loc24_45.3, %.loc24_45.4 // CHECK:STDOUT: return %.loc24_46 to %return diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index bb27361be6c08..74bbb21f30ced 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -62,34 +62,34 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.4: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.k.1: type = struct_type {.k: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.1 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %CallAlias.type: type = fn_type @CallAlias [template] // CHECK:STDOUT: %CallAlias: %CallAlias.type = struct_value () [template] // CHECK:STDOUT: %CallOnConstBoundMethod.type: type = fn_type @CallOnConstBoundMethod [template] // CHECK:STDOUT: %CallOnConstBoundMethod: %CallOnConstBoundMethod.type = struct_value () [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.8: type = struct_type {.k: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.k.2: type = struct_type {.k: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.35) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2) [template] // CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [template] // CHECK:STDOUT: %CallWithAddr: %CallWithAddr.type = struct_value () [template] // CHECK:STDOUT: %CallFThroughPointer.type: type = fn_type @CallFThroughPointer [template] @@ -136,10 +136,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc20_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_signed.loc20, %.loc20_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_signed.loc20, %.loc20_29.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc20: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc20: %Class = bind_name self, %self.param.loc20 // CHECK:STDOUT: %return.param.loc20: ref %i32 = out_param runtime_param1 @@ -152,10 +152,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc24_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_22.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_22.3: type = converted %int.make_type_signed, %.loc24_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_22.2: type = converted %int.make_type_signed, %.loc24_22.1 [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -168,10 +168,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc30_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc30_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_27.3: type = converted %int.make_type_signed, %.loc30_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc30_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc30_27.2: type = converted %int.make_type_signed, %.loc30_27.1 [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -181,10 +181,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc34_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc34_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_32.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc34_32.3: type = converted %int.make_type_signed, %.loc34_32.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc34_32.2: type = converted %int.make_type_signed, %.loc34_32.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -192,44 +192,44 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc38_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc38_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_22.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc38_22.3: type = converted %int.make_type_signed, %.loc38_22.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc38_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc38_22.2: type = converted %int.make_type_signed, %.loc38_22.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallFThroughPointer.decl: %CallFThroughPointer.type = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc43_32: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc43_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc43_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc43_38.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc43_38.3: type = converted %int.make_type_signed, %.loc43_38.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc43_38.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc43_38.2: type = converted %int.make_type_signed, %.loc43_38.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallGThroughPointer.decl: %CallGThroughPointer.type = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc47_32: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc47_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc47_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc47_38.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc47_38.3: type = converted %int.make_type_signed, %.loc47_38.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc47_38.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc47_38.2: type = converted %int.make_type_signed, %.loc47_38.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -245,10 +245,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc53_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc53_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_33.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc53_33.3: type = converted %int.make_type_signed, %.loc53_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc53_33.2: type = converted %int.make_type_signed, %.loc53_33.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -256,10 +256,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc57_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc57_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_33.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc57_33.3: type = converted %int.make_type_signed, %.loc57_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc57_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc57_33.2: type = converted %int.make_type_signed, %.loc57_33.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -273,41 +273,41 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc12_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.3: type = converted %int.make_type_signed.loc12, %.loc12_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12, %.loc12_25.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc12_22: ref %i32 = return_slot %return.param.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc13_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed, %.loc13_31.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %.loc17_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.3: type = converted %int.make_type_signed, %.loc17_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8: %.3 = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_signed, %.loc17_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8: %Class.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -315,26 +315,26 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .A = %A // CHECK:STDOUT: .k = %.loc17_8 -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc20 -// CHECK:STDOUT: %k.ref: %.3 = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] +// CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] // CHECK:STDOUT: %.loc21_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc21_14.2: %i32 = bind_value %.loc21_14.1 // CHECK:STDOUT: return %.loc21_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.2]() -> %i32; +// CHECK:STDOUT: fn @G[addr %self.param_patt: %ptr.1]() -> %i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @Call(%c.param_patt: %Class) -> %i32 { // CHECK:STDOUT: !entry: // 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: %F.bound: = bound_method %c.ref, %F.ref +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%c.ref) // CHECK:STDOUT: %.loc27_15.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc27_15.2: %i32 = converted %F.call, %.loc27_15.1 // CHECK:STDOUT: return %.loc27_15.2 @@ -344,8 +344,8 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: // 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: %F.bound: = bound_method %c.ref, %A.ref +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%c.ref) // CHECK:STDOUT: %.loc31_15.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc31_15.2: %i32 = converted %F.call, %.loc31_15.1 // CHECK:STDOUT: return %.loc31_15.2 @@ -353,24 +353,24 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallOnConstBoundMethod() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc35_17: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc35_18.1: %.8 = struct_literal (%.loc35_17) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc35_18.1: %struct_type.k.2 = struct_literal (%int_1) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc35_18.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_18.3: = bound_method %.loc35_17, %.loc35_18.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc35_18.4: = specific_function %.loc35_18.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_18.4(%.loc35_17) [template = constants.%.35] -// CHECK:STDOUT: %.loc35_18.5: init %i32 = converted %.loc35_17, %int.convert_checked [template = constants.%.35] -// CHECK:STDOUT: %.loc35_18.6: ref %Class = temporary_storage -// CHECK:STDOUT: %.loc35_18.7: ref %i32 = class_element_access %.loc35_18.6, element0 -// CHECK:STDOUT: %.loc35_18.8: init %i32 = initialize_from %.loc35_18.5 to %.loc35_18.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc35_18.9: init %Class = class_init (%.loc35_18.8), %.loc35_18.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc35_18.10: ref %Class = temporary %.loc35_18.6, %.loc35_18.9 -// CHECK:STDOUT: %.loc35_20.1: ref %Class = converted %.loc35_18.1, %.loc35_18.10 +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_18.2: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_18.3: ref %Class = temporary_storage +// CHECK:STDOUT: %.loc35_18.4: ref %i32 = class_element_access %.loc35_18.3, element0 +// CHECK:STDOUT: %.loc35_18.5: init %i32 = initialize_from %.loc35_18.2 to %.loc35_18.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_18.6: init %Class = class_init (%.loc35_18.5), %.loc35_18.3 [template = constants.%Class.val] +// CHECK:STDOUT: %.loc35_18.7: ref %Class = temporary %.loc35_18.3, %.loc35_18.6 +// CHECK:STDOUT: %.loc35_20.1: ref %Class = converted %.loc35_18.1, %.loc35_18.7 // 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: %F.bound: = bound_method %.loc35_20.1, %F.ref // 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: %F.call: init %i32 = call %F.bound(%.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 // CHECK:STDOUT: return %.loc35_33.2 @@ -383,35 +383,35 @@ fn CallGOnInitializingExpr() -> i32 { // 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: %.2 = addr_of %c.ref -// CHECK:STDOUT: %G.call: init %i32 = call %.loc40_11(%.loc40_10) +// CHECK:STDOUT: %G.bound: = bound_method %c.ref, %G.ref +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %c.ref +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%addr) // CHECK:STDOUT: %.loc40_15.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc40_15.2: %i32 = converted %G.call, %.loc40_15.1 // CHECK:STDOUT: return %.loc40_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallFThroughPointer(%p.param_patt: %.2) -> %i32 { +// CHECK:STDOUT: fn @CallFThroughPointer(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc44_11.1: ref %Class = deref %p.ref // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc44_14: = bound_method %.loc44_11.1, %F.ref +// CHECK:STDOUT: %F.bound: = bound_method %.loc44_11.1, %F.ref // 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: %F.call: init %i32 = call %F.bound(%.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.param_patt: %.2) -> %i32 { +// CHECK:STDOUT: fn @CallGThroughPointer(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p -// CHECK:STDOUT: %.loc48_11.1: ref %Class = deref %p.ref +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p +// CHECK:STDOUT: %.loc48_11: ref %Class = deref %p.ref // CHECK:STDOUT: %G.ref: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc48_14: = bound_method %.loc48_11.1, %G.ref -// CHECK:STDOUT: %.loc48_11.2: %.2 = addr_of %.loc48_11.1 -// CHECK:STDOUT: %G.call: init %i32 = call %.loc48_14(%.loc48_11.2) +// CHECK:STDOUT: %G.bound: = bound_method %.loc48_11, %G.ref +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %.loc48_11 +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%addr) // 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 @@ -426,9 +426,9 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc54_15.1 // CHECK:STDOUT: %.loc54_15.2: ref %Class = temporary %.loc54_15.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_15.2, %F.ref +// CHECK:STDOUT: %F.bound: = bound_method %.loc54_15.2, %F.ref // CHECK:STDOUT: %.loc54_15.3: %Class = bind_value %.loc54_15.2 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc54_16(%.loc54_15.3) +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc54_15.3) // CHECK:STDOUT: %.loc54_20.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc54_20.2: %i32 = converted %F.call, %.loc54_20.1 // CHECK:STDOUT: return %.loc54_20.2 @@ -441,9 +441,9 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc58_15.1 // CHECK:STDOUT: %.loc58_15.2: ref %Class = temporary %.loc58_15.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_15.2, %G.ref -// CHECK:STDOUT: %.loc58_15.3: %.2 = addr_of %.loc58_15.2 -// CHECK:STDOUT: %G.call: init %i32 = call %.loc58_16(%.loc58_15.3) +// CHECK:STDOUT: %G.bound: = bound_method %.loc58_15.2, %G.ref +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %.loc58_15.2 +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%addr) // CHECK:STDOUT: %.loc58_20.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc58_20.2: %i32 = converted %G.call, %.loc58_20.1 // CHECK:STDOUT: return %.loc58_20.2 diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index 72a963381e98f..2693c4c10a232 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -56,20 +56,20 @@ fn F(a: Outer*) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %.1: type = ptr_type %Inner [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Inner, %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Outer [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Inner, %.3 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Inner [template] +// CHECK:STDOUT: %Inner.elem.1: type = unbound_element_type %Inner, %ptr.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %Outer [template] +// CHECK:STDOUT: %Inner.elem.2: type = unbound_element_type %Inner, %ptr.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.pi: %.1, .po: %.3, .qi: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %struct_type.pi.po.qi: type = struct_type {.pi: %ptr.1, .po: %ptr.2, .qi: %ptr.1} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.pi.po.qi [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Outer, %.3 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Outer, %.1 [template] -// CHECK:STDOUT: %.9: type = struct_type {.po: %.3, .qo: %.3, .pi: %.1} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %Outer.elem.1: type = unbound_element_type %Outer, %ptr.2 [template] +// CHECK:STDOUT: %Outer.elem.2: type = unbound_element_type %Outer, %ptr.1 [template] +// CHECK:STDOUT: %struct_type.po.qo.pi: type = struct_type {.po: %ptr.2, .qo: %ptr.2, .pi: %ptr.1} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.po.qo.pi [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -90,13 +90,13 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %a.patt: %.3 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref.loc41: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %.loc41: type = ptr_type %Outer [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.3 = bind_name a, %a.param +// CHECK:STDOUT: %ptr.loc41: type = ptr_type %Outer [template = constants.%ptr.2] +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -105,47 +105,47 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer [template = constants.%Outer] -// CHECK:STDOUT: %.loc36_15: type = ptr_type %Outer [template = constants.%.3] -// CHECK:STDOUT: %.loc36_9: %.7 = field_decl po, element0 [template] +// CHECK:STDOUT: %ptr.loc36: type = ptr_type %Outer [template = constants.%ptr.2] +// CHECK:STDOUT: %.loc36: %Outer.elem.1 = 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.%.3] -// CHECK:STDOUT: %.loc37_9: %.7 = field_decl qo, element1 [template] +// CHECK:STDOUT: %ptr.loc37: type = ptr_type %Outer [template = constants.%ptr.2] +// CHECK:STDOUT: %.loc37: %Outer.elem.1 = 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.%.1] -// CHECK:STDOUT: %.loc38_9: %.8 = field_decl pi, element2 [template] -// CHECK:STDOUT: %.loc39: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %ptr.loc38: type = ptr_type %Inner [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc38: %Outer.elem.2 = field_decl pi, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.po.qo.pi [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Inner = %Inner.decl // CHECK:STDOUT: .H = %H.decl -// CHECK:STDOUT: .po = %.loc36_9 -// CHECK:STDOUT: .qo = %.loc37_9 -// CHECK:STDOUT: .pi = %.loc38_9 -// CHECK:STDOUT: complete_type_witness = %.loc39 +// CHECK:STDOUT: .po = %.loc36 +// CHECK:STDOUT: .qo = %.loc37 +// CHECK:STDOUT: .pi = %.loc38 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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.%.1] -// CHECK:STDOUT: %.loc19_11: %.2 = field_decl pi, element0 [template] +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Inner [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc19: %Inner.elem.1 = 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.%.3] -// CHECK:STDOUT: %.loc20_11: %.4 = field_decl po, element1 [template] +// CHECK:STDOUT: %ptr.loc20: type = ptr_type %Outer [template = constants.%ptr.2] +// CHECK:STDOUT: %.loc20: %Inner.elem.2 = 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.%.1] -// CHECK:STDOUT: %.loc21_11: %.2 = field_decl qi, element2 [template] +// CHECK:STDOUT: %ptr.loc21: type = ptr_type %Inner [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc21: %Inner.elem.1 = field_decl qi, element2 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc28: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.pi.po.qi [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner -// CHECK:STDOUT: .pi = %.loc19_11 -// CHECK:STDOUT: .po = %.loc20_11 -// CHECK:STDOUT: .qi = %.loc21_11 +// CHECK:STDOUT: .pi = %.loc19 +// CHECK:STDOUT: .po = %.loc20 +// CHECK:STDOUT: .qi = %.loc21 // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc28 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() { @@ -181,64 +181,64 @@ fn F(a: Outer*) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%a.param_patt: %.3) { +// CHECK:STDOUT: fn @F.2(%a.param_patt: %ptr.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref.loc42: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc42_21: type = ptr_type %Inner [template = constants.%.1] -// CHECK:STDOUT: %a.ref.loc42: %.3 = name_ref a, %a +// CHECK:STDOUT: %ptr.loc42: type = ptr_type %Inner [template = constants.%ptr.1] +// CHECK:STDOUT: %a.ref.loc42: %ptr.2 = 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 %.1 = class_element_access %.loc42_26, element2 -// CHECK:STDOUT: %.loc42_29.2: %.1 = bind_value %.loc42_29.1 -// CHECK:STDOUT: %b: %.1 = bind_name b, %.loc42_29.2 -// CHECK:STDOUT: %a.ref.loc44_3: %.3 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc42: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] +// CHECK:STDOUT: %.loc42_29.1: ref %ptr.1 = class_element_access %.loc42_26, element2 +// CHECK:STDOUT: %.loc42_29.2: %ptr.1 = bind_value %.loc42_29.1 +// CHECK:STDOUT: %b: %ptr.1 = bind_name b, %.loc42_29.2 +// CHECK:STDOUT: %a.ref.loc44_3: %ptr.2 = 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 %.3 = class_element_access %.loc44_4.1, element0 -// CHECK:STDOUT: %a.ref.loc44_11: %.3 = name_ref a, %a +// CHECK:STDOUT: %po.ref.loc44: %Outer.elem.1 = name_ref po, @Outer.%.loc36 [template = @Outer.%.loc36] +// CHECK:STDOUT: %.loc44_4.2: ref %ptr.2 = class_element_access %.loc44_4.1, element0 +// CHECK:STDOUT: %a.ref.loc44_11: %ptr.2 = name_ref a, %a // CHECK:STDOUT: assign %.loc44_4.2, %a.ref.loc44_11 -// CHECK:STDOUT: %a.ref.loc45_3: %.3 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc45_3: %ptr.2 = 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 %.3 = class_element_access %.loc45_4.1, element1 -// CHECK:STDOUT: %a.ref.loc45_11: %.3 = name_ref a, %a +// CHECK:STDOUT: %qo.ref: %Outer.elem.1 = name_ref qo, @Outer.%.loc37 [template = @Outer.%.loc37] +// CHECK:STDOUT: %.loc45_4.2: ref %ptr.2 = class_element_access %.loc45_4.1, element1 +// CHECK:STDOUT: %a.ref.loc45_11: %ptr.2 = name_ref a, %a // CHECK:STDOUT: assign %.loc45_4.2, %a.ref.loc45_11 -// CHECK:STDOUT: %a.ref.loc46_3: %.3 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc46_3: %ptr.2 = 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 %.1 = class_element_access %.loc46_4.1, element2 -// CHECK:STDOUT: %a.ref.loc46_11: %.3 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc46_4: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] +// CHECK:STDOUT: %.loc46_4.2: ref %ptr.1 = class_element_access %.loc46_4.1, element2 +// CHECK:STDOUT: %a.ref.loc46_11: %ptr.2 = 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 %.1 = class_element_access %.loc46_12.1, element2 -// CHECK:STDOUT: %.loc46_12.3: %.1 = bind_value %.loc46_12.2 +// CHECK:STDOUT: %pi.ref.loc46_12: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] +// CHECK:STDOUT: %.loc46_12.2: ref %ptr.1 = class_element_access %.loc46_12.1, element2 +// CHECK:STDOUT: %.loc46_12.3: %ptr.1 = bind_value %.loc46_12.2 // CHECK:STDOUT: assign %.loc46_4.2, %.loc46_12.3 -// CHECK:STDOUT: %b.ref.loc47: %.1 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc47: %ptr.1 = name_ref b, %b // CHECK:STDOUT: %.loc47_4.1: ref %Inner = deref %b.ref.loc47 -// CHECK:STDOUT: %po.ref.loc47: %.4 = name_ref po, @Inner.%.loc20_11 [template = @Inner.%.loc20_11] -// CHECK:STDOUT: %.loc47_4.2: ref %.3 = class_element_access %.loc47_4.1, element1 -// CHECK:STDOUT: %a.ref.loc47: %.3 = name_ref a, %a +// CHECK:STDOUT: %po.ref.loc47: %Inner.elem.2 = name_ref po, @Inner.%.loc20 [template = @Inner.%.loc20] +// CHECK:STDOUT: %.loc47_4.2: ref %ptr.2 = class_element_access %.loc47_4.1, element1 +// CHECK:STDOUT: %a.ref.loc47: %ptr.2 = name_ref a, %a // CHECK:STDOUT: assign %.loc47_4.2, %a.ref.loc47 -// CHECK:STDOUT: %b.ref.loc48: %.1 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc48: %ptr.1 = name_ref b, %b // CHECK:STDOUT: %.loc48_4.1: ref %Inner = deref %b.ref.loc48 -// CHECK:STDOUT: %pi.ref.loc48_4: %.2 = name_ref pi, @Inner.%.loc19_11 [template = @Inner.%.loc19_11] -// CHECK:STDOUT: %.loc48_4.2: ref %.1 = class_element_access %.loc48_4.1, element0 -// CHECK:STDOUT: %a.ref.loc48: %.3 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc48_4: %Inner.elem.1 = name_ref pi, @Inner.%.loc19 [template = @Inner.%.loc19] +// CHECK:STDOUT: %.loc48_4.2: ref %ptr.1 = class_element_access %.loc48_4.1, element0 +// CHECK:STDOUT: %a.ref.loc48: %ptr.2 = 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 %.1 = class_element_access %.loc48_12.1, element2 -// CHECK:STDOUT: %.loc48_12.3: %.1 = bind_value %.loc48_12.2 +// CHECK:STDOUT: %pi.ref.loc48_12: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] +// CHECK:STDOUT: %.loc48_12.2: ref %ptr.1 = class_element_access %.loc48_12.1, element2 +// CHECK:STDOUT: %.loc48_12.3: %ptr.1 = bind_value %.loc48_12.2 // CHECK:STDOUT: assign %.loc48_4.2, %.loc48_12.3 -// CHECK:STDOUT: %b.ref.loc49: %.1 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc49: %ptr.1 = name_ref b, %b // CHECK:STDOUT: %.loc49_4.1: ref %Inner = deref %b.ref.loc49 -// CHECK:STDOUT: %qi.ref: %.2 = name_ref qi, @Inner.%.loc21_11 [template = @Inner.%.loc21_11] -// CHECK:STDOUT: %.loc49_4.2: ref %.1 = class_element_access %.loc49_4.1, element2 -// CHECK:STDOUT: %a.ref.loc49: %.3 = name_ref a, %a +// CHECK:STDOUT: %qi.ref: %Inner.elem.1 = name_ref qi, @Inner.%.loc21 [template = @Inner.%.loc21] +// CHECK:STDOUT: %.loc49_4.2: ref %ptr.1 = class_element_access %.loc49_4.1, element2 +// CHECK:STDOUT: %a.ref.loc49: %ptr.2 = 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 %.1 = class_element_access %.loc49_12.1, element2 -// CHECK:STDOUT: %.loc49_12.3: %.1 = bind_value %.loc49_12.2 +// CHECK:STDOUT: %pi.ref.loc49: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] +// CHECK:STDOUT: %.loc49_12.2: ref %ptr.1 = class_element_access %.loc49_12.1, element2 +// CHECK:STDOUT: %.loc49_12.3: %ptr.1 = bind_value %.loc49_12.2 // CHECK:STDOUT: assign %.loc49_4.2, %.loc49_12.3 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 2cc1cc627aab6..370e751d5c197 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -27,15 +27,15 @@ fn G(o: Outer) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Inner, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -67,10 +67,10 @@ fn G(o: Outer) { // CHECK:STDOUT: } { // 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: %.loc17_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_26.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_26.3: type = converted %int.make_type_signed, %.loc17_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_26.2: type = converted %int.make_type_signed, %.loc17_26.1 [template = constants.%i32] // CHECK:STDOUT: %oi.param: %Inner = value_param runtime_param0 // CHECK:STDOUT: %oi: %Inner = bind_name oi, %oi.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -88,32 +88,32 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer // CHECK:STDOUT: .Inner = %Inner.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// CHECK:STDOUT: %.loc13_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.3: type = converted %int.make_type_signed, %.loc13_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed, %.loc13_12.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10: %Inner.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner // CHECK:STDOUT: .n = %.loc13_10 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%oi.param_patt: %Inner) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %oi.ref: %Inner = name_ref oi, %oi -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] +// CHECK:STDOUT: %n.ref: %Inner.elem = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] // CHECK:STDOUT: %.loc18_12.1: ref %i32 = class_element_access %oi.ref, element0 // CHECK:STDOUT: %.loc18_12.2: %i32 = bind_value %.loc18_12.1 // CHECK:STDOUT: return %.loc18_12.2 diff --git a/toolchain/check/testdata/class/no_prelude/export_name.carbon b/toolchain/check/testdata/class/no_prelude/export_name.carbon index f730ce27bbe0c..9e43090de8cb4 100644 --- a/toolchain/check/testdata/class/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/class/no_prelude/export_name.carbon @@ -42,8 +42,8 @@ var c: C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,24 +54,24 @@ var c: C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -93,14 +93,14 @@ var c: C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export, inst+9, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export, inst+7, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export, inst+7, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export, inst+8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -123,9 +123,9 @@ var c: C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc6_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_13.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_14: init %C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/extern.carbon b/toolchain/check/testdata/class/no_prelude/extern.carbon index f8c89413b3954..20c83909b08e3 100644 --- a/toolchain/check/testdata/class/no_prelude/extern.carbon +++ b/toolchain/check/testdata/class/no_prelude/extern.carbon @@ -330,8 +330,8 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -342,11 +342,11 @@ extern class C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_decl_fn_in_extern.carbon @@ -373,8 +373,8 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -385,11 +385,11 @@ extern class C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_extern_decl_after_extern_decl.carbon @@ -429,8 +429,8 @@ extern class C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -442,12 +442,12 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D; @@ -456,8 +456,8 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -469,11 +469,11 @@ extern class C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_extern_decl_after_decl.carbon @@ -599,12 +599,12 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.2: = import_ref Main//def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -626,12 +626,12 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.2: = import_ref Main//def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index fad17b3f501f0..50bad07d19691 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -57,37 +57,37 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NotGenericNoParams: type = class_type @NotGenericNoParams [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %NotGenericButParams.type: type = generic_class_type @NotGenericButParams [template] -// CHECK:STDOUT: %NotGenericButParams.1: %NotGenericButParams.type = struct_value () [template] -// CHECK:STDOUT: %NotGenericButParams.2: type = class_type @NotGenericButParams [template] +// CHECK:STDOUT: %NotGenericButParams.generic: %NotGenericButParams.type = struct_value () [template] +// CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericAndParams.type.1: type = generic_class_type @GenericAndParams.1 [template] -// CHECK:STDOUT: %GenericAndParams.1: %GenericAndParams.type.1 = struct_value () [template] -// CHECK:STDOUT: %GenericAndParams.2: type = class_type @GenericAndParams.1, @GenericAndParams.1(%T) [symbolic] +// CHECK:STDOUT: %GenericAndParams.generic.1: %GenericAndParams.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.1: type = class_type @GenericAndParams.1, @GenericAndParams.1(%T) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %GenericNoParams.1: type = class_type @GenericNoParams [template] // CHECK:STDOUT: %GenericNoParams.2: type = class_type @GenericNoParams, @GenericNoParams(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %GenericAndParams.type.2: type = generic_class_type @GenericAndParams.2, @C(%T) [symbolic] -// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %GenericAndParams.4: type = class_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] +// CHECK:STDOUT: %GenericAndParams.generic.2: %GenericAndParams.type.2 = struct_value () [symbolic] +// CHECK:STDOUT: %GenericAndParams.2: type = class_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %struct.1: %NotGenericNoParams = struct_value () [template] -// CHECK:STDOUT: %struct.2: %NotGenericButParams.2 = struct_value () [template] -// CHECK:STDOUT: %GenericAndParams.5: type = class_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] -// CHECK:STDOUT: %struct.3: %GenericAndParams.5 = struct_value () [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] +// CHECK:STDOUT: %NotGenericNoParams.val: %NotGenericNoParams = struct_value () [template] +// CHECK:STDOUT: %NotGenericButParams.val: %NotGenericButParams = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.3: type = class_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] +// CHECK:STDOUT: %GenericAndParams.val.1: %GenericAndParams.3 = struct_value () [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.type.3: type = generic_class_type @GenericAndParams.2, @C(%X) [template] -// CHECK:STDOUT: %GenericAndParams.6: %GenericAndParams.type.3 = struct_value () [template] -// CHECK:STDOUT: %struct.4: %GenericNoParams.1 = struct_value () [template] -// CHECK:STDOUT: %GenericAndParams.7: type = class_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] -// CHECK:STDOUT: %struct.5: %GenericAndParams.7 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.generic.3: %GenericAndParams.type.3 = struct_value () [template] +// CHECK:STDOUT: %GenericNoParams.val: %GenericNoParams.1 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.4: type = class_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] +// CHECK:STDOUT: %GenericAndParams.val.2: %GenericAndParams.4 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -104,15 +104,15 @@ fn F(T:! type) { // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } // CHECK:STDOUT: %NotGenericNoParams.decl: type = class_decl @NotGenericNoParams [template = constants.%NotGenericNoParams] {} {} -// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type = class_decl @NotGenericButParams [template = constants.%NotGenericButParams.1] {} {} -// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = class_decl @GenericAndParams.1 [template = constants.%GenericAndParams.1] { +// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type = class_decl @NotGenericButParams [template = constants.%NotGenericButParams.generic] {} {} +// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = class_decl @GenericAndParams.1 [template = constants.%GenericAndParams.generic.1] { // CHECK:STDOUT: %T.patt.loc6_24.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_24.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_24.1, runtime_param [symbolic = %T.patt.loc6_24.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_24.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_24.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_9.1, runtime_param [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -123,46 +123,46 @@ fn F(T:! type) { // CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, %NotGenericNoParams.decl [template = constants.%NotGenericNoParams] // CHECK:STDOUT: %a.var: ref %NotGenericNoParams = var a // CHECK:STDOUT: %a: ref %NotGenericNoParams = bind_name a, %a.var -// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, %NotGenericButParams.decl [template = constants.%NotGenericButParams.1] -// CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [template = constants.%NotGenericButParams.2] -// CHECK:STDOUT: %b.var: ref %NotGenericButParams.2 = var b -// CHECK:STDOUT: %b: ref %NotGenericButParams.2 = bind_name b, %b.var -// CHECK:STDOUT: %GenericAndParams.ref.loc17: %GenericAndParams.type.1 = name_ref GenericAndParams, %GenericAndParams.decl [template = constants.%GenericAndParams.1] +// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, %NotGenericButParams.decl [template = constants.%NotGenericButParams.generic] +// CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [template = constants.%NotGenericButParams] +// CHECK:STDOUT: %b.var: ref %NotGenericButParams = var b +// CHECK:STDOUT: %b: ref %NotGenericButParams = bind_name b, %b.var +// CHECK:STDOUT: %GenericAndParams.ref.loc17: %GenericAndParams.type.1 = name_ref GenericAndParams, %GenericAndParams.decl [template = constants.%GenericAndParams.generic.1] // CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %GenericAndParams.loc17: type = class_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%GenericAndParams.5] -// CHECK:STDOUT: %c.var: ref %GenericAndParams.5 = var c -// CHECK:STDOUT: %c: ref %GenericAndParams.5 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc18: %C.type = name_ref C, %C.decl [template = constants.%C.1] +// CHECK:STDOUT: %GenericAndParams.loc17: type = class_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %c.var: ref %GenericAndParams.3 = var c +// CHECK:STDOUT: %c: ref %GenericAndParams.3 = bind_name c, %c.var +// CHECK:STDOUT: %C.ref.loc18: %C.type = name_ref C, %C.decl [template = constants.%C.generic] // CHECK:STDOUT: %X.ref.loc18: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %C.loc18: type = class_type @C, @C(constants.%X) [template = constants.%C.3] +// CHECK:STDOUT: %C.loc18: type = class_type @C, @C(constants.%X) [template = constants.%C.2] // CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%GenericNoParams.1] // CHECK:STDOUT: %d.var: ref %GenericNoParams.1 = var d // CHECK:STDOUT: %d: ref %GenericNoParams.1 = bind_name d, %d.var -// CHECK:STDOUT: %C.ref.loc19: %C.type = name_ref C, %C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref.loc19: %C.type = name_ref C, %C.decl [template = constants.%C.generic] // CHECK:STDOUT: %X.ref.loc19_10: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %C.loc19: type = class_type @C, @C(constants.%X) [template = constants.%C.3] -// CHECK:STDOUT: %.loc19: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.6] -// CHECK:STDOUT: %GenericAndParams.ref.loc19: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc19 [template = constants.%GenericAndParams.6] +// CHECK:STDOUT: %C.loc19: type = class_type @C, @C(constants.%X) [template = constants.%C.2] +// CHECK:STDOUT: %.loc19: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.generic.3] +// CHECK:STDOUT: %GenericAndParams.ref.loc19: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc19 [template = constants.%GenericAndParams.generic.3] // CHECK:STDOUT: %X.ref.loc19_30: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %GenericAndParams.loc19: type = class_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%GenericAndParams.7] -// CHECK:STDOUT: %e.var: ref %GenericAndParams.7 = var e -// CHECK:STDOUT: %e: ref %GenericAndParams.7 = bind_name e, %e.var +// CHECK:STDOUT: %GenericAndParams.loc19: type = class_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%GenericAndParams.4] +// CHECK:STDOUT: %e.var: ref %GenericAndParams.4 = var e +// CHECK:STDOUT: %e: ref %GenericAndParams.4 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NotGenericNoParams { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NotGenericNoParams -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NotGenericButParams { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%NotGenericButParams.2 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: .Self = constants.%NotGenericButParams +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @GenericAndParams.1(%T.loc6_24.1: type) { @@ -172,11 +172,11 @@ fn F(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%GenericAndParams.2 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: .Self = constants.%GenericAndParams.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -186,24 +186,24 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type: type = generic_class_type @GenericAndParams.2, @C(%T.loc8_9.2) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.2)] -// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.2) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.3)] +// CHECK:STDOUT: %GenericAndParams.generic: @C.%GenericAndParams.type (%GenericAndParams.type.2) = struct_value () [symbolic = %GenericAndParams.generic (constants.%GenericAndParams.generic.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GenericNoParams.decl: type = class_decl @GenericNoParams [template = constants.%GenericNoParams.1] {} {} -// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.2) = class_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams (constants.%GenericAndParams.3)] { +// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.2) = class_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.2)] { // CHECK:STDOUT: %U.patt.loc10_26.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc10_26.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc10_26.1, runtime_param [symbolic = %U.patt.loc10_26.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc10_26.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc10_26.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 +// CHECK:STDOUT: .Self = constants.%C.1 // CHECK:STDOUT: .GenericNoParams = %GenericNoParams.decl // CHECK:STDOUT: .GenericAndParams = %GenericAndParams.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -211,11 +211,11 @@ fn F(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%GenericNoParams.2 -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,43 +226,43 @@ fn F(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%GenericAndParams.4 -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: .Self = constants.%GenericAndParams.2 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_30.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc15_30.2: init %NotGenericNoParams = class_init (), file.%a.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc15_31: init %NotGenericNoParams = converted %.loc15_30.1, %.loc15_30.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc15_30.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_30.2: init %NotGenericNoParams = class_init (), file.%a.var [template = constants.%NotGenericNoParams.val] +// CHECK:STDOUT: %.loc15_31: init %NotGenericNoParams = converted %.loc15_30.1, %.loc15_30.2 [template = constants.%NotGenericNoParams.val] // CHECK:STDOUT: assign file.%a.var, %.loc15_31 -// CHECK:STDOUT: %.loc16_33.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc16_33.2: init %NotGenericButParams.2 = class_init (), file.%b.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc16_34: init %NotGenericButParams.2 = converted %.loc16_33.1, %.loc16_33.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc16_33.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc16_33.2: init %NotGenericButParams = class_init (), file.%b.var [template = constants.%NotGenericButParams.val] +// CHECK:STDOUT: %.loc16_34: init %NotGenericButParams = converted %.loc16_33.1, %.loc16_33.2 [template = constants.%NotGenericButParams.val] // CHECK:STDOUT: assign file.%b.var, %.loc16_34 -// CHECK:STDOUT: %.loc17_31.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc17_31.2: init %GenericAndParams.5 = class_init (), file.%c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_32: init %GenericAndParams.5 = converted %.loc17_31.1, %.loc17_31.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_31.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc17_31.2: init %GenericAndParams.3 = class_init (), file.%c.var [template = constants.%GenericAndParams.val.1] +// CHECK:STDOUT: %.loc17_32: init %GenericAndParams.3 = converted %.loc17_31.1, %.loc17_31.2 [template = constants.%GenericAndParams.val.1] // CHECK:STDOUT: assign file.%c.var, %.loc17_32 -// CHECK:STDOUT: %.loc18_32.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc18_32.2: init %GenericNoParams.1 = class_init (), file.%d.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc18_33: init %GenericNoParams.1 = converted %.loc18_32.1, %.loc18_32.2 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc18_32.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc18_32.2: init %GenericNoParams.1 = class_init (), file.%d.var [template = constants.%GenericNoParams.val] +// CHECK:STDOUT: %.loc18_33: init %GenericNoParams.1 = converted %.loc18_32.1, %.loc18_32.2 [template = constants.%GenericNoParams.val] // CHECK:STDOUT: assign file.%d.var, %.loc18_33 -// CHECK:STDOUT: %.loc19_36.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_36.2: init %GenericAndParams.7 = class_init (), file.%e.var [template = constants.%struct.5] -// CHECK:STDOUT: %.loc19_37: init %GenericAndParams.7 = converted %.loc19_36.1, %.loc19_36.2 [template = constants.%struct.5] +// CHECK:STDOUT: %.loc19_36.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_36.2: init %GenericAndParams.4 = class_init (), file.%e.var [template = constants.%GenericAndParams.val.2] +// CHECK:STDOUT: %.loc19_37: init %GenericAndParams.4 = converted %.loc19_36.1, %.loc19_36.2 [template = constants.%GenericAndParams.val.2] // CHECK:STDOUT: assign file.%e.var, %.loc19_37 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -302,7 +302,7 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.3 -// CHECK:STDOUT: %GenericAndParams => constants.%GenericAndParams.6 +// CHECK:STDOUT: %GenericAndParams.generic => constants.%GenericAndParams.generic.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.2(constants.%X, constants.%X) { @@ -316,35 +316,35 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %A.1: %A.type = struct_value () [template] -// CHECK:STDOUT: %A.2: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] +// CHECK:STDOUT: %A: type = class_type @A [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] {} {} +// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%A.2 -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: .Self = constants.%A +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_generic_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %A.1: %A.type = struct_value () [template] -// CHECK:STDOUT: %A.2: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] +// CHECK:STDOUT: %A: type = class_type @A [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -356,7 +356,7 @@ fn F(T:! type) { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] {} {} +// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc10_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_6.1, runtime_param [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] @@ -367,11 +367,11 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%A.2 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: .Self = constants.%A +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc10_6.1: type) { @@ -382,9 +382,9 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] -// CHECK:STDOUT: %A: type = class_type @A [template = constants.%A.2] +// CHECK:STDOUT: %A: type = class_type @A [template = constants.%A] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/implicit_import.carbon b/toolchain/check/testdata/class/no_prelude/implicit_import.carbon index 86f9eb71739ab..fccd958aea6eb 100644 --- a/toolchain/check/testdata/class/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/class/no_prelude/implicit_import.carbon @@ -99,8 +99,8 @@ class B {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -116,19 +116,19 @@ class B {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- redecl_after_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -139,23 +139,23 @@ class B {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_redecl_after_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.2: = import_ref Main//redecl_after_def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//redecl_after_def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//redecl_after_def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -178,8 +178,8 @@ class B {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -190,25 +190,25 @@ class B {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_redef_after_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = class_type @.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %.1: type = class_type @.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//redef_after_def, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//redef_after_def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//redef_after_def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//redef_after_def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -218,7 +218,7 @@ class B {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -228,11 +228,11 @@ class B {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- def_alias.carbon @@ -258,8 +258,8 @@ class B {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = class_type @.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -280,10 +280,10 @@ class B {} // CHECK:STDOUT: class @C; // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.1 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // 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 e91b9c22e6420..1322ae724a333 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -139,8 +139,8 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Def: type = class_type @Def [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -151,19 +151,19 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Def { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Def -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardWithDef: type = class_type @ForwardWithDef [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -175,11 +175,11 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardWithDef { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%ForwardWithDef -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- forward.carbon @@ -201,14 +201,14 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Def: type = class_type @Def [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %Def = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Def.val: %Def = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Test//def, inst+1, loaded [template = constants.%Def] -// CHECK:STDOUT: %import_ref.2: = import_ref Test//def, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Test//def, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Test//def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,9 +232,9 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_15.2: init %Def = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc4_16: init %Def = converted %.loc4_15.1, %.loc4_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc4_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_15.2: init %Def = class_init (), file.%c.var [template = constants.%Def.val] +// CHECK:STDOUT: %.loc4_16: init %Def = converted %.loc4_15.1, %.loc4_15.2 [template = constants.%Def.val] // CHECK:STDOUT: assign file.%c.var, %.loc4_16 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -242,7 +242,7 @@ private class Redecl {} // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -257,7 +257,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: %.1 = struct_literal () +// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -265,7 +265,7 @@ private class Redecl {} // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -288,7 +288,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: %.1 = struct_literal () +// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -297,14 +297,14 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardWithDef: type = class_type @ForwardWithDef [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %ForwardWithDef = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ForwardWithDef.val: %ForwardWithDef = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Test//forward_with_def, inst+1, loaded [template = constants.%ForwardWithDef] -// CHECK:STDOUT: %import_ref.2: = import_ref Test//forward_with_def, inst+5, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Test//forward_with_def, inst+5, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Test//forward_with_def, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -328,9 +328,9 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_26.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_26.2: init %ForwardWithDef = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc4_27: init %ForwardWithDef = converted %.loc4_26.1, %.loc4_26.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc4_26.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_26.2: init %ForwardWithDef = class_init (), file.%c.var [template = constants.%ForwardWithDef.val] +// CHECK:STDOUT: %.loc4_27: init %ForwardWithDef = converted %.loc4_26.1, %.loc4_26.2 [template = constants.%ForwardWithDef.val] // CHECK:STDOUT: assign file.%c.var, %.loc4_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -338,7 +338,7 @@ private class Redecl {} // CHECK:STDOUT: --- fail_local_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -353,7 +353,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: %.1 = struct_literal () +// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -361,7 +361,7 @@ private class Redecl {} // CHECK:STDOUT: --- fail_other_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -384,7 +384,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: %.1 = struct_literal () +// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -393,11 +393,11 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Forward: type = class_type @Forward [template] -// CHECK:STDOUT: %.1: type = ptr_type %Forward [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Forward [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -412,26 +412,26 @@ private class Redecl {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %c.patt: %.1 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.1 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %ptr = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %ptr = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Forward.ref: type = name_ref Forward, imports.%import_ref [template = constants.%Forward] -// CHECK:STDOUT: %.loc4: type = ptr_type %Forward [template = constants.%.1] -// CHECK:STDOUT: %c.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.1 = bind_name c, %c.param +// CHECK:STDOUT: %ptr: type = ptr_type %Forward [template = constants.%ptr] +// CHECK:STDOUT: %c.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %c: %ptr = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %Forward.decl: type = class_decl @Forward [template = constants.%Forward] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Forward { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Forward -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%c.param_patt: %.1) { +// CHECK:STDOUT: fn @F(%c.param_patt: %ptr) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -453,7 +453,7 @@ private class Redecl {} // CHECK:STDOUT: %c.param_patt: = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %.loc10: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %c.param: = value_param runtime_param0 // CHECK:STDOUT: %c: = bind_name c, %c.param // CHECK:STDOUT: } @@ -489,7 +489,7 @@ private class Redecl {} // CHECK:STDOUT: } { // CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %.loc9: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %c.param: = value_param runtime_param0 // CHECK:STDOUT: %c: = bind_name c, %c.param // CHECK:STDOUT: } @@ -504,8 +504,8 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Redecl: type = class_type @Redecl [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -517,10 +517,10 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Redecl { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Redecl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon index 5612b9a0dd685..449782c540fbd 100644 --- a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon @@ -106,8 +106,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,12 +119,12 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -149,13 +149,13 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst+3, unloaded // CHECK:STDOUT: } @@ -193,13 +193,13 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//c, inst+10, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//c, inst+8, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//c, inst+9, unloaded // CHECK:STDOUT: } @@ -216,12 +216,12 @@ var x: () = D.C.F(); // CHECK:STDOUT: class @D { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %C: type = bind_alias C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .C = %C -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -249,15 +249,15 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//a, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+2, unloaded // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Main//a, inst+3, loaded [template = constants.%F] // CHECK:STDOUT: } @@ -297,15 +297,15 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//c, inst+10, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//c, inst+8, unloaded // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Main//c, inst+9, loaded [template = constants.%F] // CHECK:STDOUT: } @@ -345,15 +345,15 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//c, inst+10, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//c, inst+7, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//c, inst+8, unloaded // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Main//c, inst+9, loaded [template = constants.%F] // CHECK:STDOUT: } @@ -393,8 +393,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -402,10 +402,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//e, inst+3, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//e, inst+14, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//e, inst+14, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//e, inst+4, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//e, inst+13, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//e, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//e, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//e, inst+10, unloaded // CHECK:STDOUT: %import_ref.7: %F.type = import_ref Main//e, inst+11, loaded [template = constants.%F] // CHECK:STDOUT: } @@ -453,8 +453,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -462,10 +462,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//e, inst+3, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//e, inst+14, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//e, inst+14, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//e, inst+4, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//e, inst+13, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//e, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//e, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//e, inst+10, unloaded // CHECK:STDOUT: %import_ref.7: %F.type = import_ref Main//e, inst+11, loaded [template = constants.%F] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon index b6f3a69617da2..1066e952d6003 100644 --- a/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon @@ -90,8 +90,8 @@ class D; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -108,11 +108,11 @@ class D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- use_decl_in_api.carbon diff --git a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon index ed633c5560638..246480c76958a 100644 --- a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon @@ -183,16 +183,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template] -// CHECK:STDOUT: %Bar.1: %Bar.type = struct_value () [template] -// CHECK:STDOUT: %Bar.2: type = class_type @Bar, @Bar(%a) [symbolic] +// CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template] +// CHECK:STDOUT: %Bar: type = class_type @Bar, @Bar(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -205,7 +205,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -213,7 +213,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -221,7 +221,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { +// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -229,7 +229,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param // CHECK:STDOUT: %a.loc10_11.1: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.loc10_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { +// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -240,11 +240,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc7_11.1: %C) { @@ -254,11 +254,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Foo.2 -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: .Self = constants.%Foo +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -269,11 +269,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Bar.2 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: .Self = constants.%Bar +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -291,13 +291,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -306,7 +306,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -314,7 +314,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_17.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_17.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -325,11 +325,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc6_17.1: %C) { @@ -339,11 +339,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Foo.2 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: .Self = constants.%Foo +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -356,15 +356,15 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -373,7 +373,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -381,7 +381,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc14_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_11.1, runtime_param [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -392,11 +392,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc6_11.1: %C) { @@ -413,11 +413,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.4 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -435,13 +435,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -450,7 +450,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -458,7 +458,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -469,11 +469,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc6_11.1: %C) { @@ -483,11 +483,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Foo.2 -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: .Self = constants.%Foo +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -500,14 +500,14 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template] -// CHECK:STDOUT: %Bar.1: %Bar.type = struct_value () [template] +// CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -520,7 +520,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -528,7 +528,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { +// CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc8_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8_11.1, runtime_param [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -539,11 +539,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc7_11.1: %C) { @@ -574,22 +574,22 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template] -// CHECK:STDOUT: %Bar.1: %Bar.type = struct_value () [template] -// CHECK:STDOUT: %Bar.2: type = class_type @Bar, @Bar(%a) [symbolic] +// CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template] +// CHECK:STDOUT: %Bar: type = class_type @Bar, @Bar(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//two_file, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//two_file, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -602,7 +602,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc4: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc4, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -610,7 +610,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc4: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { +// CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc5: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc5, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -633,11 +633,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Foo.2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: .Self = constants.%Foo +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -648,11 +648,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Bar.2 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: .Self = constants.%Bar +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -670,17 +670,17 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -692,7 +692,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -700,7 +700,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %b.patt.loc15_11.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_11.1, runtime_param [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: } { @@ -711,11 +711,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc7_11.1: %C) { @@ -732,11 +732,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.4 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -754,15 +754,15 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -774,7 +774,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -782,7 +782,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -793,11 +793,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc7_11.1: %C) { @@ -814,11 +814,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.4 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -836,15 +836,15 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -856,7 +856,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -864,7 +864,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -875,11 +875,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc7_11.1: %C) { @@ -896,11 +896,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.4 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -918,12 +918,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -932,7 +932,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -943,11 +943,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Foo(%a.loc6_11.1: %C) { @@ -966,18 +966,18 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//alias_two_file, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//alias_two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -991,7 +991,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { @@ -1014,11 +1014,11 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Foo.2 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: .Self = constants.%Foo +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1031,16 +1031,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = const_type %C [template] -// CHECK:STDOUT: %a: %.3 = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %a.patt: %.3 = symbolic_binding_pattern a, 0 [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %const: type = const_type %C [template] +// CHECK:STDOUT: %a: %const = bind_symbolic_name a, 0 [symbolic] +// CHECK:STDOUT: %a.patt: %const = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1049,54 +1049,54 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { -// CHECK:STDOUT: %a.patt.loc6_11.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] +// CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { +// CHECK:STDOUT: %a.patt.loc6_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param -// CHECK:STDOUT: %a.loc6_11.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %a.loc6_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %a.patt.loc18_11.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc18_11.1, runtime_param [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { +// CHECK:STDOUT: %a.patt.loc18_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc18_11.1, runtime_param [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc18_22: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %.loc18_15: type = const_type %.3 [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param -// CHECK:STDOUT: %a.loc18_11.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc18_11.2 (constants.%a)] +// CHECK:STDOUT: %const.loc18_22: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc18_15: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %a.loc18_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc18_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Foo(%a.loc6_11.1: %.3) { -// CHECK:STDOUT: %a.loc6_11.2: %.3 = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)] -// CHECK:STDOUT: %a.patt.loc6_11.2: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] +// CHECK:STDOUT: generic class @Foo(%a.loc6_11.1: %const) { +// CHECK:STDOUT: %a.loc6_11.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)] +// CHECK:STDOUT: %a.patt.loc6_11.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @.1(%a.loc18_11.1: %.3) { -// CHECK:STDOUT: %a.loc18_11.2: %.3 = bind_symbolic_name a, 0 [symbolic = %a.loc18_11.2 (constants.%a)] -// CHECK:STDOUT: %a.patt.loc18_11.2: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] +// CHECK:STDOUT: generic class @.1(%a.loc18_11.1: %const) { +// CHECK:STDOUT: %a.loc18_11.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc18_11.2 (constants.%a)] +// CHECK:STDOUT: %a.patt.loc18_11.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc18_33: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.5 -// CHECK:STDOUT: complete_type_witness = %.loc18_33 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1115,14 +1115,14 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %Base, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = ptr_type %Base [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %empty_tuple.type [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %empty_tuple.type} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1131,48 +1131,48 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Base = %Base.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc16_11: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc16: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16_26: type = ptr_type %Base [template = constants.%.2] -// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_8: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc7_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc7: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc7_23: type = ptr_type %Base [template = constants.%.2] -// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .a = %.loc5_8 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt: %.2](); +// CHECK:STDOUT: fn @F[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1[addr %self.param_patt: %.2]() { +// CHECK:STDOUT: fn @.1[addr %self.param_patt: %ptr.1]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self +// CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self // CHECK:STDOUT: %.loc17_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8] // CHECK:STDOUT: %.loc17_10: ref %empty_tuple.type = class_element_access %.loc17_4, element0 // CHECK:STDOUT: %.loc17_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc17_16.2: init %empty_tuple.type = tuple_init () to %.loc17_10 [template = constants.%empty_tuple] diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index 21e41a802c3f0..e7680acab8ecf 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: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.4: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,20 +58,20 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt.loc17_17: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt.loc17_21: %.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 +// CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 // CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc17_38.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_38.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_38.3: type = converted %int.make_type_signed.loc17, %.loc17_38.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param.loc17_21: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc17_17: %.1 = bind_name self, %self.param.loc17_21 +// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_38.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_38.2: type = converted %int.make_type_signed.loc17, %.loc17_38.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param.loc17_21: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc17_17: %ptr.1 = bind_name self, %self.param.loc17_21 // CHECK:STDOUT: %self.param.loc17_36: %i32 = value_param runtime_param1 // CHECK:STDOUT: %self.loc17_30: %i32 = bind_name r#self, %self.param.loc17_36 // CHECK:STDOUT: } @@ -84,14 +84,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc21_32.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc21_32: init type = call constants.%Int(%.loc21_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_32.2: type = value_of_initializer %int.make_type_signed.loc21_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_32.3: type = converted %int.make_type_signed.loc21_32, %.loc21_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_41: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc21_41: init type = call constants.%Int(%.loc21_41) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_46: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc21_46: init type = call constants.%Int(%.loc21_46) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_32: init type = call constants.%Int(%int_32.loc21_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %int.make_type_signed.loc21_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_signed.loc21_32, %.loc21_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_41: init type = call constants.%Int(%int_32.loc21_41) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_46: init type = call constants.%Int(%int_32.loc21_46) [template = constants.%i32] // CHECK:STDOUT: %.loc21_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc21_41, %int.make_type_signed.loc21_46) // CHECK:STDOUT: %.loc21_49.2: type = value_of_initializer %int.make_type_signed.loc21_41 [template = constants.%i32] // CHECK:STDOUT: %.loc21_49.3: type = converted %int.make_type_signed.loc21_41, %.loc21_49.2 [template = constants.%i32] @@ -109,20 +109,20 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt.loc17_17: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt.loc17_21: %.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 +// CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 // CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc12_34.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.3: type = converted %int.make_type_signed.loc12, %.loc12_34.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param.loc12_17: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc12_13: %.1 = bind_name self, %self.param.loc12_17 +// CHECK:STDOUT: %ptr.loc12: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_signed.loc12, %.loc12_34.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param.loc12_17: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc12_13: %ptr.1 = bind_name self, %self.param.loc12_17 // CHECK:STDOUT: %self.param.loc12_32: %i32 = value_param runtime_param1 // CHECK:STDOUT: %self.loc12_26: %i32 = bind_name r#self, %self.param.loc12_32 // CHECK:STDOUT: } @@ -135,14 +135,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13_28.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13_28: init type = call constants.%Int(%.loc13_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_28.2: type = value_of_initializer %int.make_type_signed.loc13_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_28.3: type = converted %int.make_type_signed.loc13_28, %.loc13_28.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_37: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13_37: init type = call constants.%Int(%.loc13_37) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_42: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13_42: init type = call constants.%Int(%.loc13_42) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_28: init type = call constants.%Int(%int_32.loc13_28) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %int.make_type_signed.loc13_28 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_signed.loc13_28, %.loc13_28.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_37: init type = call constants.%Int(%int_32.loc13_37) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_42: init type = call constants.%Int(%int_32.loc13_42) [template = constants.%i32] // CHECK:STDOUT: %.loc13_45.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc13_37, %int.make_type_signed.loc13_42) // CHECK:STDOUT: %.loc13_45.2: type = value_of_initializer %int.make_type_signed.loc13_37 [template = constants.%i32] // CHECK:STDOUT: %.loc13_45.3: type = converted %int.make_type_signed.loc13_37, %.loc13_45.2 [template = constants.%i32] @@ -156,26 +156,26 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.param.loc13: ref %tuple.type.2 = out_param runtime_param2 // CHECK:STDOUT: %.loc13_33: ref %tuple.type.2 = return_slot %return.param.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed, %.loc14_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %.3 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .n = %.loc14_8 -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt.loc17_21: %.1](%self.param_patt.loc17_36: %i32) { +// CHECK:STDOUT: fn @F[addr %self.param_patt.loc17_21: %ptr.1](%self.param_patt.loc17_36: %i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref.loc18_5: %.1 = name_ref self, %self.loc17_17 +// CHECK:STDOUT: %self.ref.loc18_5: %ptr.1 = name_ref self, %self.loc17_17 // CHECK:STDOUT: %.loc18_4: ref %Class = deref %self.ref.loc18_5 -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %Class.elem = 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 @@ -185,17 +185,17 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: fn @G[%self.param_patt.loc21_16: %Class](%self.param_patt.loc21_30: %i32) -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc22_11: %Class = name_ref self, %self.loc21_12 -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %Class.elem = 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: %tuple.type.2 = tuple_literal (%.loc22_15.2, %self.ref.loc22_19) -// CHECK:STDOUT: %.loc22_25.2: ref %i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc22_25.3: init %i32 = initialize_from %.loc22_15.2 to %.loc22_25.2 -// CHECK:STDOUT: %.loc22_25.4: ref %i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc22_25.5: init %i32 = initialize_from %self.ref.loc22_19 to %.loc22_25.4 -// CHECK:STDOUT: %.loc22_25.6: init %tuple.type.2 = tuple_init (%.loc22_25.3, %.loc22_25.5) to %return -// CHECK:STDOUT: %.loc22_26: init %tuple.type.2 = converted %.loc22_25.1, %.loc22_25.6 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 +// CHECK:STDOUT: %.loc22_25.2: init %i32 = initialize_from %.loc22_15.2 to %tuple.elem0 +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return, element1 +// CHECK:STDOUT: %.loc22_25.3: init %i32 = initialize_from %self.ref.loc22_19 to %tuple.elem1 +// CHECK:STDOUT: %.loc22_25.4: init %tuple.type.2 = tuple_init (%.loc22_25.2, %.loc22_25.3) to %return +// CHECK:STDOUT: %.loc22_26: init %tuple.type.2 = converted %.loc22_25.1, %.loc22_25.4 // 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 2eef1a9462339..b24e0deef1567 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -29,9 +29,9 @@ 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: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Class [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [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] @@ -71,12 +71,12 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MemberNamedSelf { @@ -94,36 +94,36 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %y.param.loc21: %Self = value_param runtime_param1 // CHECK:STDOUT: %y.loc21: %Self = bind_name y, %y.param.loc21 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MemberNamedSelf // CHECK:STDOUT: .r#Self = %Self.decl // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Self { -// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Self -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // 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 %.3 = var r#Self -// CHECK:STDOUT: %Self: ref %.3 = bind_name r#Self, %Self.var +// CHECK:STDOUT: %ptr.loc13: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %Self.var: ref %ptr.1 = var r#Self +// CHECK:STDOUT: %Self: ref %ptr.1 = 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 %.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: %ptr.loc14: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %p.var: ref %ptr.1 = var p +// CHECK:STDOUT: %p: ref %ptr.1 = bind_name p, %p.var +// CHECK:STDOUT: %Self.ref.loc14_20: ref %ptr.1 = name_ref r#Self, %Self +// CHECK:STDOUT: %.loc14: %ptr.1 = bind_value %Self.ref.loc14_20 +// CHECK:STDOUT: assign %p.var, %.loc14 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index 40cb757394918..e1dfd868b2889 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -24,8 +24,8 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,12 +77,12 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %b.param.loc14: bool = value_param runtime_param1 // CHECK:STDOUT: %b.loc14: bool = bind_name b, %b.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class](%b.param_patt: bool) { diff --git a/toolchain/check/testdata/class/redeclaration_introducer.carbon b/toolchain/check/testdata/class/redeclaration_introducer.carbon index 9874c233d1fb9..875315dcbcf94 100644 --- a/toolchain/check/testdata/class/redeclaration_introducer.carbon +++ b/toolchain/check/testdata/class/redeclaration_introducer.carbon @@ -22,8 +22,8 @@ abstract class C {} // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,26 +50,26 @@ abstract class C {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reenter_scope.carbon b/toolchain/check/testdata/class/reenter_scope.carbon index fb79106ea3a3e..6f2b8693b6b14 100644 --- a/toolchain/check/testdata/class/reenter_scope.carbon +++ b/toolchain/check/testdata/class/reenter_scope.carbon @@ -22,16 +22,16 @@ fn Class.F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,10 +53,10 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_17.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_17.3: type = converted %int.make_type_signed.loc16, %.loc16_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_17.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_17.2: type = converted %int.make_type_signed.loc16, %.loc16_17.1 [template = constants.%i32] // CHECK:STDOUT: %return.param.loc16: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc16 // CHECK:STDOUT: } @@ -67,10 +67,10 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %.loc12_10: ref %i32 = return_slot %return.param.loc12 // CHECK:STDOUT: } @@ -78,20 +78,20 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = converted %int.make_type_signed, %.loc13_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 2fe4ee4d5d792..3beded487809a 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -22,24 +22,24 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,10 +65,10 @@ class Class { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -76,20 +76,20 @@ class Class { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = converted %int.make_type_signed, %.loc16_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -104,13 +104,13 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_12: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_13.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_13.2: = bound_method %.loc17_12, %.loc17_13.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc17_13.3: = specific_function %.loc17_13.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_13.3(%.loc17_12) [template = constants.%.32] -// CHECK:STDOUT: %.loc17_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc17_13.5: %i32 = converted %.loc17_12, %.loc17_13.4 [template = constants.%.32] -// CHECK:STDOUT: return %.loc17_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_13.2: %i32 = converted %int_1, %.loc17_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc17_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 3e423a950afa4..4332d925468fe 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -55,59 +55,59 @@ class A { // CHECK:STDOUT: %BF.type: type = fn_type @BF [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %BF: %BF.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %B, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [template] +// CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.b.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %DF.type: type = fn_type @DF [template] // CHECK:STDOUT: %DF: %DF.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %D, %i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.d: %i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [template] +// CHECK:STDOUT: %struct_type.d.1: type = struct_type {.d: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.d.1 [template] // CHECK:STDOUT: %CF.type: type = fn_type @CF [template] // CHECK:STDOUT: %CF: %CF.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.9: type = struct_type {.c: %i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.c.1: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.c.1 [template] // CHECK:STDOUT: %AF.type: type = fn_type @AF [template] // CHECK:STDOUT: %AF: %AF.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = unbound_element_type %A, %i32 [template] -// CHECK:STDOUT: %.12: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.13: = complete_type_witness %.12 [template] -// CHECK:STDOUT: %.15: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.16: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.a.1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.40: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.41: = bound_method %.15, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.43) [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.46: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.47: = bound_method %.45, %Convert.14 [template] -// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.49: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%.49) [template] -// CHECK:STDOUT: %.51: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.52: type = struct_type {.c: Core.IntLiteral} [template] -// CHECK:STDOUT: %.53: = bound_method %.51, %Convert.14 [template] -// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.55: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%.55) [template] -// CHECK:STDOUT: %.57: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.58: type = struct_type {.d: Core.IntLiteral} [template] -// CHECK:STDOUT: %.59: = bound_method %.57, %Convert.14 [template] -// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.61: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.4: %D = struct_value (%.61) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %B.val: %B = struct_value (%int_2.2) [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.c.2: type = struct_type {.c: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%int_3.2) [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.d.2: type = struct_type {.d: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %D.val: %D = struct_value (%int_4.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -132,74 +132,74 @@ 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: %AF.type = fn_decl @AF [template = constants.%AF] {} {} -// CHECK:STDOUT: %.loc46_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc46_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc46_10.3: type = converted %int.make_type_signed, %.loc46_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_8: %.11 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc47: = complete_type_witness %.12 [template = constants.%.13] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc46_10.2: type = converted %int.make_type_signed, %.loc46_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_8: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .AF = %AF.decl // CHECK:STDOUT: .a = %.loc46_8 -// CHECK:STDOUT: complete_type_witness = %.loc47 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %BF.decl: %BF.type = fn_decl @BF [template = constants.%BF] {} {} -// CHECK:STDOUT: %.loc16_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.3: type = converted %int.make_type_signed, %.loc16_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10: %.2 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_signed, %.loc16_12.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10: %B.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .BF = %BF.decl // CHECK:STDOUT: .b = %.loc16_10 -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // 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: %.loc42_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc42_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc42_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc42_12.3: type = converted %int.make_type_signed, %.loc42_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc42_10: %.8 = field_decl c, element0 [template] -// CHECK:STDOUT: %.loc43: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc42_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc42_12.2: type = converted %int.make_type_signed, %.loc42_12.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc42_10: %C.elem = field_decl c, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: .CF = %CF.decl // CHECK:STDOUT: .c = %.loc42_10 -// CHECK:STDOUT: complete_type_witness = %.loc43 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { // 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: %.loc24_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_14.3: type = converted %int.make_type_signed, %.loc24_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_12: %.5 = field_decl d, element0 [template] -// CHECK:STDOUT: %.loc25: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_14.2: type = converted %int.make_type_signed, %.loc24_14.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc24_12: %D.elem = field_decl d, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .DF = %DF.decl // CHECK:STDOUT: .d = %.loc24_12 -// CHECK:STDOUT: complete_type_witness = %.loc25 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @BF(); @@ -211,62 +211,62 @@ class A { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var -// CHECK:STDOUT: %.loc29_24: Core.IntLiteral = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %.loc29_25.1: %.16 = struct_literal (%.loc29_24) -// CHECK:STDOUT: %.loc29_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_25.3: = bound_method %.loc29_24, %.loc29_25.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc29_25.4: = specific_function %.loc29_25.3, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.4(%.loc29_24) [template = constants.%.43] -// CHECK:STDOUT: %.loc29_25.5: init %i32 = converted %.loc29_24, %int.convert_checked.loc29 [template = constants.%.43] -// CHECK:STDOUT: %.loc29_25.6: ref %i32 = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc29_25.7: init %i32 = initialize_from %.loc29_25.5 to %.loc29_25.6 [template = constants.%.43] -// CHECK:STDOUT: %.loc29_25.8: init %A = class_init (%.loc29_25.7), %a.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc29_26: init %A = converted %.loc29_25.1, %.loc29_25.8 [template = constants.%struct.1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc29_25.1: %struct_type.a.2 = struct_literal (%int_1) +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_1, %impl.elem0.loc29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc29_25.2: init %i32 = converted %int_1, %int.convert_checked.loc29 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc29_25.3: ref %i32 = class_element_access %a.var, element0 +// CHECK:STDOUT: %.loc29_25.4: init %i32 = initialize_from %.loc29_25.2 to %.loc29_25.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc29_25.5: init %A = class_init (%.loc29_25.4), %a.var [template = constants.%A.val] +// CHECK:STDOUT: %.loc29_26: init %A = converted %.loc29_25.1, %.loc29_25.5 [template = constants.%A.val] // CHECK:STDOUT: assign %a.var, %.loc29_26 // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var -// CHECK:STDOUT: %.loc30_24: Core.IntLiteral = int_value 2 [template = constants.%.45] -// CHECK:STDOUT: %.loc30_25.1: %.46 = struct_literal (%.loc30_24) -// CHECK:STDOUT: %.loc30_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_25.3: = bound_method %.loc30_24, %.loc30_25.2 [template = constants.%.47] -// CHECK:STDOUT: %.loc30_25.4: = specific_function %.loc30_25.3, @Convert.2(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %.loc30_25.4(%.loc30_24) [template = constants.%.49] -// CHECK:STDOUT: %.loc30_25.5: init %i32 = converted %.loc30_24, %int.convert_checked.loc30 [template = constants.%.49] -// CHECK:STDOUT: %.loc30_25.6: ref %i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc30_25.7: init %i32 = initialize_from %.loc30_25.5 to %.loc30_25.6 [template = constants.%.49] -// CHECK:STDOUT: %.loc30_25.8: init %B = class_init (%.loc30_25.7), %b.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc30_26: init %B = converted %.loc30_25.1, %.loc30_25.8 [template = constants.%struct.2] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc30_25.1: %struct_type.b.2 = struct_literal (%int_2) +// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc30: = bound_method %int_2, %impl.elem0.loc30 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc30: = specific_function %Convert.bound.loc30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %Convert.specific_fn.loc30(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_25.2: init %i32 = converted %int_2, %int.convert_checked.loc30 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_25.3: ref %i32 = class_element_access %b.var, element0 +// CHECK:STDOUT: %.loc30_25.4: init %i32 = initialize_from %.loc30_25.2 to %.loc30_25.3 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc30_25.5: init %B = class_init (%.loc30_25.4), %b.var [template = constants.%B.val] +// CHECK:STDOUT: %.loc30_26: init %B = converted %.loc30_25.1, %.loc30_25.5 [template = constants.%B.val] // CHECK:STDOUT: assign %b.var, %.loc30_26 // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc31_24: Core.IntLiteral = int_value 3 [template = constants.%.51] -// CHECK:STDOUT: %.loc31_25.1: %.52 = struct_literal (%.loc31_24) -// CHECK:STDOUT: %.loc31_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc31_25.3: = bound_method %.loc31_24, %.loc31_25.2 [template = constants.%.53] -// CHECK:STDOUT: %.loc31_25.4: = specific_function %.loc31_25.3, @Convert.2(constants.%.1) [template = constants.%.54] -// CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %.loc31_25.4(%.loc31_24) [template = constants.%.55] -// CHECK:STDOUT: %.loc31_25.5: init %i32 = converted %.loc31_24, %int.convert_checked.loc31 [template = constants.%.55] -// CHECK:STDOUT: %.loc31_25.6: ref %i32 = class_element_access %c.var, element0 -// CHECK:STDOUT: %.loc31_25.7: init %i32 = initialize_from %.loc31_25.5 to %.loc31_25.6 [template = constants.%.55] -// CHECK:STDOUT: %.loc31_25.8: init %C = class_init (%.loc31_25.7), %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc31_26: init %C = converted %.loc31_25.1, %.loc31_25.8 [template = constants.%struct.3] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc31_25.1: %struct_type.c.2 = struct_literal (%int_3) +// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc31: = bound_method %int_3, %impl.elem0.loc31 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc31: = specific_function %Convert.bound.loc31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %Convert.specific_fn.loc31(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc31_25.2: init %i32 = converted %int_3, %int.convert_checked.loc31 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc31_25.3: ref %i32 = class_element_access %c.var, element0 +// CHECK:STDOUT: %.loc31_25.4: init %i32 = initialize_from %.loc31_25.2 to %.loc31_25.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc31_25.5: init %C = class_init (%.loc31_25.4), %c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc31_26: init %C = converted %.loc31_25.1, %.loc31_25.5 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc31_26 // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var -// CHECK:STDOUT: %.loc32_24: Core.IntLiteral = int_value 4 [template = constants.%.57] -// CHECK:STDOUT: %.loc32_25.1: %.58 = struct_literal (%.loc32_24) -// CHECK:STDOUT: %.loc32_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc32_25.3: = bound_method %.loc32_24, %.loc32_25.2 [template = constants.%.59] -// CHECK:STDOUT: %.loc32_25.4: = specific_function %.loc32_25.3, @Convert.2(constants.%.1) [template = constants.%.60] -// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_25.4(%.loc32_24) [template = constants.%.61] -// CHECK:STDOUT: %.loc32_25.5: init %i32 = converted %.loc32_24, %int.convert_checked.loc32 [template = constants.%.61] -// CHECK:STDOUT: %.loc32_25.6: ref %i32 = class_element_access %d.var, element0 -// CHECK:STDOUT: %.loc32_25.7: init %i32 = initialize_from %.loc32_25.5 to %.loc32_25.6 [template = constants.%.61] -// CHECK:STDOUT: %.loc32_25.8: init %D = class_init (%.loc32_25.7), %d.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc32_26: init %D = converted %.loc32_25.1, %.loc32_25.8 [template = constants.%struct.4] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc32_25.1: %struct_type.d.2 = struct_literal (%int_4) +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_4, %impl.elem0.loc32 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc32_25.2: init %i32 = converted %int_4, %int.convert_checked.loc32 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc32_25.3: ref %i32 = class_element_access %d.var, element0 +// CHECK:STDOUT: %.loc32_25.4: init %i32 = initialize_from %.loc32_25.2 to %.loc32_25.3 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc32_25.5: init %D = class_init (%.loc32_25.4), %d.var [template = constants.%D.val] +// CHECK:STDOUT: %.loc32_26: init %D = converted %.loc32_25.1, %.loc32_25.5 [template = constants.%D.val] // CHECK:STDOUT: assign %d.var, %.loc32_26 // CHECK:STDOUT: %AF.ref: %AF.type = name_ref AF, @A.%AF.decl [template = constants.%AF] // CHECK:STDOUT: %AF.call: init %empty_tuple.type = call %AF.ref() diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index f2cc716ee138f..2bd018d57a6ae 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -31,30 +31,30 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -81,10 +81,10 @@ fn Run() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.3: type = converted %int.make_type_signed, %.loc21_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed, %.loc21_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -96,10 +96,10 @@ fn Run() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -107,32 +107,32 @@ fn Run() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = converted %int.make_type_signed, %.loc16_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.31] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.31] -// CHECK:STDOUT: return %.loc13_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.2: %i32 = converted %int_1, %.loc13_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc13_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -146,31 +146,31 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_10: Core.IntLiteral = int_value 2 [template = constants.%.32] -// CHECK:STDOUT: %.loc22_11.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_11.2: = bound_method %.loc22_10, %.loc22_11.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc22_11.3: = specific_function %.loc22_11.2, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_11.3(%.loc22_10) [template = constants.%.35] -// CHECK:STDOUT: %.loc22_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] -// CHECK:STDOUT: %.loc22_11.5: %i32 = converted %.loc22_10, %.loc22_11.4 [template = constants.%.35] -// CHECK:STDOUT: return %.loc22_11.5 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc22_11.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc22_11.2: %i32 = converted %int_2, %.loc22_11.1 [template = constants.%int_2.2] +// CHECK:STDOUT: return %.loc22_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.3: type = converted %int.make_type_signed.loc26, %.loc26_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_signed.loc26, %.loc26_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // 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: %.loc27_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.3: type = converted %int.make_type_signed.loc27, %.loc27_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_signed.loc27, %.loc27_10.1 [template = constants.%i32] // 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] diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 31f727f048f0f..3f01aa92138f2 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -45,18 +45,18 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %i32 [template] -// CHECK:STDOUT: %.4: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,30 +81,30 @@ class Class { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.3: type = converted %int.make_type_signed.loc11, %.loc11_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_signed.loc11, %.loc11_29.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc11: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc11: %Class = bind_name self, %self.param.loc11 // CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc15_27: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc15_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_35.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_35.3: type = converted %int.make_type_signed.loc15, %.loc15_35.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param.loc15: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc15: %.2 = bind_name self, %self.param.loc15 +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_35.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_35.2: type = converted %int.make_type_signed.loc15, %.loc15_35.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param.loc15: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc15: %ptr.1 = bind_name self, %self.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc15 // CHECK:STDOUT: } @@ -118,62 +118,62 @@ class Class { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc5_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25.3: type = converted %int.make_type_signed.loc5, %.loc5_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_25.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_25.2: type = converted %int.make_type_signed.loc5, %.loc5_25.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc5: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc5: %Class = bind_name self, %self.param.loc5 // CHECK:STDOUT: %return.param.loc5: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc5_22: ref %i32 = return_slot %return.param.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc6_23: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc6_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_31.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_31.3: type = converted %int.make_type_signed.loc6, %.loc6_31.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param.loc6: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc6: %.2 = bind_name self, %self.param.loc6 +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_31.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_31.2: type = converted %int.make_type_signed.loc6, %.loc6_31.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param.loc6: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc6: %ptr.1 = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc6_28: ref %i32 = return_slot %return.param.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed, %.loc8_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %.3 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .n = %.loc8_8 -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc11 -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] // CHECK:STDOUT: %.loc12_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_14.2: %i32 = bind_value %.loc12_14.1 // CHECK:STDOUT: return %.loc12_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.2]() -> %i32 { +// CHECK:STDOUT: fn @G[addr %self.param_patt: %ptr.1]() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self.loc15 +// CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self.loc15 // CHECK:STDOUT: %.loc16_11: ref %Class = deref %self.ref -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] // CHECK:STDOUT: %.loc16_17.1: ref %i32 = class_element_access %.loc16_11, element0 // CHECK:STDOUT: %.loc16_17.2: %i32 = bind_value %.loc16_17.1 // CHECK:STDOUT: return %.loc16_17.2 @@ -185,8 +185,8 @@ class Class { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.24: type = struct_type {} [template] -// CHECK:STDOUT: %.25: = complete_type_witness %.24 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -221,12 +221,12 @@ class Class { // CHECK:STDOUT: %return.param: ref = out_param runtime_param1 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = complete_type_witness %.24 [template = constants.%.25] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> ; diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 04087963526d3..df61d24a875ac 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -36,32 +36,32 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %SelfBase.type: type = fn_type @SelfBase [template] // CHECK:STDOUT: %SelfBase: %SelfBase.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Base [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %Base [template] // CHECK:STDOUT: %AddrSelfBase.type: type = fn_type @AddrSelfBase [template] // CHECK:STDOUT: %AddrSelfBase: %AddrSelfBase.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.34: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.35: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: type = ptr_type %Derived [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: } @@ -92,61 +92,61 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc22_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_38.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_38.3: type = converted %int.make_type_signed.loc22, %.loc22_38.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_38.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_38.2: type = converted %int.make_type_signed.loc22, %.loc22_38.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc22: %Base = value_param runtime_param0 // CHECK:STDOUT: %self.loc22: %Base = bind_name self, %self.param.loc22 // CHECK:STDOUT: %return.param.loc22: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc26: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc26_40: type = ptr_type %Base [template = constants.%.7] -// CHECK:STDOUT: %self.param.loc26: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc26: %.7 = bind_name self, %self.param.loc26 +// CHECK:STDOUT: %ptr.loc26: type = ptr_type %Base [template = constants.%ptr.2] +// CHECK:STDOUT: %self.param.loc26: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc26: %ptr.2 = bind_name self, %self.param.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.38 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.38 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.38] -// CHECK:STDOUT: %.loc30_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.3: type = converted %int.make_type_signed, %.loc30_25.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.38 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.38 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_signed, %.loc30_25.1 [template = constants.%i32] +// CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %.loc16: %Derived.elem = base_decl %Base.ref, element0 [template] // CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %self.patt: %Base = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Base = value_param_pattern %self.patt, runtime_param0 @@ -154,26 +154,26 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc18_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_32.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_32.3: type = converted %int.make_type_signed.loc18, %.loc18_32.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_32.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_32.2: type = converted %int.make_type_signed.loc18, %.loc18_32.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc18: %Base = value_param runtime_param0 // CHECK:STDOUT: %self.loc18: %Base = bind_name self, %self.param.loc18 // CHECK:STDOUT: %return.param.loc18: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc18_29: ref %i32 = return_slot %return.param.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc26: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc19: type = ptr_type %Base [template = constants.%.7] -// CHECK:STDOUT: %self.param.loc19: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc19: %.7 = bind_name self, %self.param.loc19 +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Base [template = constants.%ptr.2] +// CHECK:STDOUT: %self.param.loc19: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc19: %ptr.2 = bind_name self, %self.param.loc19 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -181,54 +181,54 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: .SelfBase = %SelfBase.decl // CHECK:STDOUT: .AddrSelfBase = %AddrSelfBase.decl // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @SelfBase[%self.param_patt: %Base]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Base = name_ref self, %self.loc22 -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc23_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc23_14.2: %i32 = bind_value %.loc23_14.1 // CHECK:STDOUT: return %.loc23_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AddrSelfBase[addr %self.param_patt: %.7]() { +// CHECK:STDOUT: fn @AddrSelfBase[addr %self.param_patt: %ptr.2]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.7 = name_ref self, %self.loc26 +// CHECK:STDOUT: %self.ref: %ptr.2 = name_ref self, %self.loc26 // CHECK:STDOUT: %.loc27_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = 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: Core.IntLiteral = int_value 1 [template = constants.%.10] -// CHECK:STDOUT: %.loc27_13.1: %Convert.type.2 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_13.2: = bound_method %.loc27_15, %.loc27_13.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc27_13.3: = specific_function %.loc27_13.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc27_13.3(%.loc27_15) [template = constants.%.37] -// CHECK:STDOUT: %.loc27_13.4: init %i32 = converted %.loc27_15, %int.convert_checked [template = constants.%.37] -// CHECK:STDOUT: assign %.loc27_10, %.loc27_13.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc27_13: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %.loc27_10, %.loc27_13 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.38) -> %i32 { +// CHECK:STDOUT: fn @Call(%p.param_patt: %ptr.3) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref.loc31: %.38 = name_ref p, %p +// CHECK:STDOUT: %p.ref.loc31: %ptr.3 = 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: %.38 = addr_of %.loc31_4.1 -// CHECK:STDOUT: %.loc31_4.3: ref %Derived = deref %.loc31_4.2 -// CHECK:STDOUT: %.loc31_4.4: ref %Base = class_element_access %.loc31_4.3, element0 -// CHECK:STDOUT: %.loc31_4.5: %.7 = addr_of %.loc31_4.4 -// CHECK:STDOUT: %.loc31_4.6: %.7 = converted %.loc31_4.2, %.loc31_4.5 -// CHECK:STDOUT: %AddrSelfBase.call: init %empty_tuple.type = call %.loc31_7(%.loc31_4.6) -// CHECK:STDOUT: %p.ref.loc32: %.38 = name_ref p, %p +// CHECK:STDOUT: %AddrSelfBase.bound: = bound_method %.loc31_4.1, %AddrSelfBase.ref +// CHECK:STDOUT: %addr.loc31_4.1: %ptr.3 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %.loc31_4.2: ref %Derived = deref %addr.loc31_4.1 +// CHECK:STDOUT: %.loc31_4.3: ref %Base = class_element_access %.loc31_4.2, element0 +// CHECK:STDOUT: %addr.loc31_4.2: %ptr.2 = addr_of %.loc31_4.3 +// CHECK:STDOUT: %.loc31_4.4: %ptr.2 = converted %addr.loc31_4.1, %addr.loc31_4.2 +// CHECK:STDOUT: %AddrSelfBase.call: init %empty_tuple.type = call %AddrSelfBase.bound(%.loc31_4.4) +// CHECK:STDOUT: %p.ref.loc32: %ptr.3 = name_ref p, %p // CHECK:STDOUT: %.loc32_11.1: ref %Derived = deref %p.ref.loc32 // CHECK:STDOUT: %SelfBase.ref: %SelfBase.type = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%SelfBase] -// CHECK:STDOUT: %.loc32_14: = bound_method %.loc32_11.1, %SelfBase.ref +// CHECK:STDOUT: %SelfBase.bound: = bound_method %.loc32_11.1, %SelfBase.ref // CHECK:STDOUT: %.loc32_11.2: ref %Base = class_element_access %.loc32_11.1, element0 // CHECK:STDOUT: %.loc32_11.3: ref %Base = converted %.loc32_11.1, %.loc32_11.2 // CHECK:STDOUT: %.loc32_11.4: %Base = bind_value %.loc32_11.3 -// CHECK:STDOUT: %SelfBase.call: init %i32 = call %.loc32_14(%.loc32_11.4) +// CHECK:STDOUT: %SelfBase.call: init %i32 = call %SelfBase.bound(%.loc32_11.4) // CHECK:STDOUT: %.loc32_25.1: %i32 = value_of_initializer %SelfBase.call // CHECK:STDOUT: %.loc32_25.2: %i32 = converted %SelfBase.call, %.loc32_25.1 // CHECK:STDOUT: return %.loc32_25.2 diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index ec67af7b5431b..2d6ef35dad6a5 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -26,18 +26,18 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.p: %.2} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %ptr.1 [template] +// CHECK:STDOUT: %struct_type.p: type = struct_type {.p: %ptr.1} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,10 +62,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc21_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_29.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_29.3: type = converted %int.make_type_signed.loc21, %.loc21_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_29.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_29.2: type = converted %int.make_type_signed.loc21, %.loc21_29.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc21: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc21: %Class = bind_name self, %self.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 @@ -81,10 +81,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc12_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.3: type = converted %int.make_type_signed.loc12, %.loc12_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12, %.loc12_25.1 [template = constants.%i32] // CHECK:STDOUT: %self.param.loc12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 @@ -99,29 +99,29 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc18_14: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc18_8: %.3 = field_decl p, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc18: %Class.elem = field_decl p, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: .p = %.loc18_8 -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: .p = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc21 -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, @Class.%.loc18_8 [template = @Class.%.loc18_8] -// CHECK:STDOUT: %.loc22_16.1: ref %.2 = class_element_access %self.ref, element0 -// CHECK:STDOUT: %.loc22_16.2: %.2 = bind_value %.loc22_16.1 +// CHECK:STDOUT: %p.ref: %Class.elem = name_ref p, @Class.%.loc18 [template = @Class.%.loc18] +// CHECK:STDOUT: %.loc22_16.1: ref %ptr.1 = class_element_access %self.ref, element0 +// CHECK:STDOUT: %.loc22_16.2: %ptr.1 = bind_value %.loc22_16.1 // CHECK:STDOUT: %.loc22_11.1: ref %Class = deref %.loc22_16.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc22_19: = bound_method %.loc22_11.1, %F.ref +// CHECK:STDOUT: %F.bound: = bound_method %.loc22_11.1, %F.ref // 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: %F.call: init %i32 = call %F.bound(%.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 @@ -133,10 +133,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %s: ref %Class = bind_name s, %return // CHECK:STDOUT: %s.ref.loc15_5: ref %Class = name_ref s, %s // CHECK:STDOUT: %s.ref.loc15_16: ref %Class = name_ref s, %s -// CHECK:STDOUT: %.loc15_15: %.2 = addr_of %s.ref.loc15_16 -// CHECK:STDOUT: %.loc15_17.1: %.4 = struct_literal (%.loc15_15) -// CHECK:STDOUT: %.loc15_17.2: ref %.2 = class_element_access %s.ref.loc15_5, element0 -// CHECK:STDOUT: %.loc15_17.3: init %.2 = initialize_from %.loc15_15 to %.loc15_17.2 +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %s.ref.loc15_16 +// CHECK:STDOUT: %.loc15_17.1: %struct_type.p = struct_literal (%addr) +// CHECK:STDOUT: %.loc15_17.2: ref %ptr.1 = class_element_access %s.ref.loc15_5, element0 +// CHECK:STDOUT: %.loc15_17.3: init %ptr.1 = initialize_from %addr to %.loc15_17.2 // CHECK:STDOUT: %.loc15_17.4: init %Class = class_init (%.loc15_17.3), %s.ref.loc15_5 // CHECK:STDOUT: %.loc15_7: init %Class = converted %.loc15_17.1, %.loc15_17.4 // CHECK:STDOUT: assign %s.ref.loc15_5, %.loc15_7 diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 644f5e79c763b..944fc6efd0d87 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -21,14 +21,14 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -53,17 +53,17 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.3: type = converted %int.make_type_signed, %.loc15_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed, %.loc15_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_signed, %.loc15_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_17.2: type = converted %int.make_type_signed, %.loc15_17.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -71,19 +71,19 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed, %.loc12_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32; diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 12e7a3fd7784b..8c6c62f434e12 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -31,31 +31,31 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: --- int_match.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %a: %i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%a) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1000 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%a) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.31) [template] -// CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] -// CHECK:STDOUT: %b.patt: %C.3 = symbolic_binding_pattern b, 0 [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] +// CHECK:STDOUT: %b: %C.2 = bind_symbolic_name b, 0 [symbolic] +// CHECK:STDOUT: %b.patt: %C.2 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] -// CHECK:STDOUT: %D.1: %D.type = struct_value () [template] -// CHECK:STDOUT: %D.2: type = class_type @D, @D(%b) [symbolic] +// CHECK:STDOUT: %D.generic: %D.type = struct_value () [template] +// CHECK:STDOUT: %D: type = class_type @D, @D(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,48 +74,48 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: .D = %D.decl.loc3 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %a.patt.loc2_9.1: %i32 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc2_9.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc2_9.1, runtime_param [symbolic = %a.patt.loc2_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc2_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc2_13.3: type = converted %int.make_type_signed, %.loc2_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc2_13.2: type = converted %int.make_type_signed, %.loc2_13.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param // CHECK:STDOUT: %a.loc2_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc2_9.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl.loc3: %D.type = class_decl @D [template = constants.%D.1] { -// CHECK:STDOUT: %b.patt.loc4: %C.3 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] -// CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt] +// CHECK:STDOUT: %D.decl.loc3: %D.type = class_decl @D [template = constants.%D.generic] { +// CHECK:STDOUT: %b.patt.loc4: %C.2 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] +// CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_20.2: = bound_method %.loc3_15, %.loc3_20.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc3_20.3: = specific_function %.loc3_20.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %.loc3_20.3(%.loc3_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc3_20.4: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%.31] -// CHECK:STDOUT: %.loc3_20.5: %i32 = converted %.loc3_15, %.loc3_20.4 [template = constants.%.31] -// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] -// CHECK:STDOUT: %b.param.loc3: %C.3 = value_param runtime_param -// CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param.loc3 [symbolic = %b.loc3_9.2 (constants.%b)] +// CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1000.loc3: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %impl.elem0.loc3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc3: = bound_method %int_1000.loc3, %impl.elem0.loc3 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc3: = specific_function %Convert.bound.loc3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %Convert.specific_fn.loc3(%int_1000.loc3) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc3_20.1: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc3_20.2: %i32 = converted %int_1000.loc3, %.loc3_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: %b.param.loc3: %C.2 = value_param runtime_param +// CHECK:STDOUT: %b.loc3_9.1: %C.2 = bind_symbolic_name b, 0, %b.param.loc3 [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl.loc4: %D.type = class_decl @D [template = constants.%D.1] { -// CHECK:STDOUT: %b.patt.loc4: %C.3 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] -// CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt] +// CHECK:STDOUT: %D.decl.loc4: %D.type = class_decl @D [template = constants.%D.generic] { +// CHECK:STDOUT: %b.patt.loc4: %C.2 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] +// CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc4_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.2: = bound_method %.loc4_15, %.loc4_20.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_20.3: = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_20.3(%.loc4_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc4_20.4: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_20.5: %i32 = converted %.loc4_15, %.loc4_20.4 [template = constants.%.31] -// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] -// CHECK:STDOUT: %b.param.loc4: %C.3 = value_param runtime_param -// CHECK:STDOUT: %b.loc4: %C.3 = bind_symbolic_name b, 0, %b.param.loc4 [symbolic = constants.%b] +// CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1000.loc4: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_1000.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_1000.loc4) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1000.loc4, %.loc4_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: %b.param.loc4: %C.2 = value_param runtime_param +// CHECK:STDOUT: %b.loc4: %C.2 = bind_symbolic_name b, 0, %b.param.loc4 [symbolic = constants.%b] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -126,26 +126,26 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc2_19 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @D(%b.loc3_9.1: %C.3) { -// CHECK:STDOUT: %b.loc3_9.2: %C.3 = bind_symbolic_name b, 0 [symbolic = %b.loc3_9.2 (constants.%b)] -// CHECK:STDOUT: %b.patt.loc3: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3 (constants.%b.patt)] +// CHECK:STDOUT: generic class @D(%b.loc3_9.1: %C.2) { +// CHECK:STDOUT: %b.loc3_9.2: %C.2 = bind_symbolic_name b, 0 [symbolic = %b.loc3_9.2 (constants.%b)] +// CHECK:STDOUT: %b.patt.loc3: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3 (constants.%b.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_24: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%D.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_24 +// CHECK:STDOUT: .Self = constants.%D +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -154,9 +154,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.31) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.31 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.31 +// CHECK:STDOUT: specific @C(constants.%int_1000.2) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%int_1000.2 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%int_1000.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { @@ -167,33 +167,33 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: --- fail_int_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %a: %i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%a) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1000 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%a) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.31) [template] -// CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] -// CHECK:STDOUT: %b.patt: %C.3 = symbolic_binding_pattern b, 0 [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] +// CHECK:STDOUT: %b: %C.2 = bind_symbolic_name b, 0 [symbolic] +// CHECK:STDOUT: %b.patt: %C.2 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] -// CHECK:STDOUT: %D.1: %D.type = struct_value () [template] +// CHECK:STDOUT: %D.generic: %D.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.32: %.type = struct_value () [template] -// CHECK:STDOUT: %.33: type = class_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %.generic: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -212,48 +212,48 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %a.patt.loc2_9.1: %i32 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc2_9.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc2_9.1, runtime_param [symbolic = %a.patt.loc2_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc2_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc2_13.3: type = converted %int.make_type_signed, %.loc2_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc2_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc2_13.2: type = converted %int.make_type_signed, %.loc2_13.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param // CHECK:STDOUT: %a.loc2_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc2_9.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] { -// CHECK:STDOUT: %b.patt.loc3_9.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] -// CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc3_9.1, runtime_param [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] +// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.generic] { +// CHECK:STDOUT: %b.patt.loc3_9.1: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] +// CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc3_9.1, runtime_param [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_19.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_19.2: = bound_method %.loc3_15, %.loc3_19.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc3_19.3: = specific_function %.loc3_19.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc3_19.3(%.loc3_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc3_19.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc3_19.5: %i32 = converted %.loc3_15, %.loc3_19.4 [template = constants.%.31] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] -// CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param -// CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc3_9.2 (constants.%b)] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1000) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc3_19.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc3_19.2: %i32 = converted %int_1000, %.loc3_19.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: %b.param: %C.2 = value_param runtime_param +// CHECK:STDOUT: %b.loc3_9.1: %C.2 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.32] { -// CHECK:STDOUT: %b.patt.loc10_9.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] -// CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc10_9.1, runtime_param [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { +// CHECK:STDOUT: %b.patt.loc10_9.1: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] +// CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc10_9.1, runtime_param [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_20.2: = bound_method %.loc10_15, %.loc10_20.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_20.3: = specific_function %.loc10_20.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_20.3(%.loc10_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc10_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc10_20.5: %i32 = converted %.loc10_15, %.loc10_20.4 [template = constants.%.31] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] -// CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param -// CHECK:STDOUT: %b.loc10_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_9.2 (constants.%b)] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1000) [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc10_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc10_20.2: %i32 = converted %int_1000, %.loc10_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: %b.param: %C.2 = value_param runtime_param +// CHECK:STDOUT: %b.loc10_9.1: %C.2 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_9.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -264,33 +264,33 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc2_19 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @D(%b.loc3_9.1: %C.3) { -// CHECK:STDOUT: %b.loc3_9.2: %C.3 = bind_symbolic_name b, 0 [symbolic = %b.loc3_9.2 (constants.%b)] -// CHECK:STDOUT: %b.patt.loc3_9.2: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] +// CHECK:STDOUT: generic class @D(%b.loc3_9.1: %C.2) { +// CHECK:STDOUT: %b.loc3_9.2: %C.2 = bind_symbolic_name b, 0 [symbolic = %b.loc3_9.2 (constants.%b)] +// CHECK:STDOUT: %b.patt.loc3_9.2: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc3_9.2 (constants.%b.patt)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @.1(%b.loc10_9.1: %C.3) { -// CHECK:STDOUT: %b.loc10_9.2: %C.3 = bind_symbolic_name b, 0 [symbolic = %b.loc10_9.2 (constants.%b)] -// CHECK:STDOUT: %b.patt.loc10_9.2: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] +// CHECK:STDOUT: generic class @.1(%b.loc10_9.1: %C.2) { +// CHECK:STDOUT: %b.loc10_9.2: %C.2 = bind_symbolic_name b, 0 [symbolic = %b.loc10_9.2 (constants.%b)] +// CHECK:STDOUT: %b.patt.loc10_9.2: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc10_24: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.33 -// CHECK:STDOUT: complete_type_witness = %.loc10_24 +// CHECK:STDOUT: .Self = constants.%.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -299,9 +299,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.31) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.31 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.31 +// CHECK:STDOUT: specific @C(constants.%int_1000.2) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%int_1000.2 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%int_1000.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { diff --git a/toolchain/check/testdata/class/todo_access_modifiers.carbon b/toolchain/check/testdata/class/todo_access_modifiers.carbon index 4dc5c2cae75c3..6a38d499b254c 100644 --- a/toolchain/check/testdata/class/todo_access_modifiers.carbon +++ b/toolchain/check/testdata/class/todo_access_modifiers.carbon @@ -27,13 +27,13 @@ class Access { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Access, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.k: %i32, .l: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Access.elem: type = unbound_element_type %Access, %i32 [template] +// CHECK:STDOUT: %struct_type.k.l: type = struct_type {.k: %i32, .l: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,17 +56,17 @@ class Access { // CHECK:STDOUT: class @Access { // 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: %.loc17_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.3: type = converted %int.make_type_signed.loc17, %.loc17_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16: %.2 = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc19_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_20.3: type = converted %int.make_type_signed.loc19, %.loc19_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_18: %.2 = field_decl l, element1 [template] -// CHECK:STDOUT: %.loc20: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_16: %Access.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_20.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_20.2: type = converted %int.make_type_signed.loc19, %.loc19_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_18: %Access.elem = field_decl l, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Access @@ -74,7 +74,7 @@ class Access { // CHECK:STDOUT: .G [protected] = %G.decl // CHECK:STDOUT: .k [private] = %.loc17_16 // CHECK:STDOUT: .l [protected] = %.loc19_18 -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index f54bd6b365d10..c7a4ae22f70be 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -124,9 +124,9 @@ class Derived { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %ptr: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template] // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] // CHECK:STDOUT: %J: %J.type = struct_value () [template] @@ -154,24 +154,24 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .H = %H.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { // 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: %.loc12: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: virtual fn @H(); @@ -187,12 +187,12 @@ class Derived { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.1} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.vptr [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -205,7 +205,7 @@ class Derived { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Modifiers//default, inst+3, loaded [template = constants.%Base] -// CHECK:STDOUT: %import_ref.2: = import_ref Modifiers//default, inst+11, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.2: = import_ref Modifiers//default, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.3 = import_ref Modifiers//default, inst+4, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Modifiers//default, inst+5, unloaded // CHECK:STDOUT: } @@ -225,15 +225,15 @@ class Derived { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %Modifiers.ref: = name_ref Modifiers, imports.%Modifiers [template = imports.%Modifiers] // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%import_ref.1 [template = constants.%Base] -// CHECK:STDOUT: %.loc8: %.5 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc8: %Derived.elem = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -251,10 +251,10 @@ class Derived { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.1} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -267,7 +267,7 @@ class Derived { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Modifiers//default, inst+3, loaded [template = constants.%Base] -// CHECK:STDOUT: %import_ref.2: = import_ref Modifiers//default, inst+11, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.2: = import_ref Modifiers//default, inst+11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Modifiers//default, inst+4, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Modifiers//default, inst+5, unloaded // CHECK:STDOUT: } @@ -296,7 +296,7 @@ class Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%import_ref.1 [template = constants.%Base] // CHECK:STDOUT: %v.var: ref %Base = var v // CHECK:STDOUT: %v: ref %Base = bind_name v, %v.var -// CHECK:STDOUT: %.loc7_28.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc7_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_28.2: init %Base = class_init (), %v.var [template = ] // CHECK:STDOUT: %.loc7_29: init %Base = converted %.loc7_28.1, %.loc7_28.2 [template = ] // CHECK:STDOUT: assign %v.var, %.loc7_29 @@ -309,15 +309,15 @@ class Derived { // CHECK:STDOUT: %A1: type = class_type @A1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.1} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.vptr [template] // CHECK:STDOUT: %A2: type = class_type @A2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %A2, %A1 [template] +// CHECK:STDOUT: %A2.elem: type = unbound_element_type %A2, %A1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %A1} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A1} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -340,26 +340,26 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @A1 { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A2 { // CHECK:STDOUT: %A1.ref: type = name_ref A1, file.%A1.decl [template = constants.%A1] -// CHECK:STDOUT: %.loc9: %.5 = base_decl %A1.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %A2.elem = base_decl %A1.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %A1.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: virtual fn @F.1(); @@ -372,21 +372,21 @@ class Derived { // CHECK:STDOUT: %B1: type = class_type @B1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.1} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.vptr [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B2, %B1 [template] +// CHECK:STDOUT: %B2.elem: type = unbound_element_type %B2, %B1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B1} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %B1} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %C, %B2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B2 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %B2} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %B2} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -411,40 +411,40 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @B1 { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B1 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B2 { // CHECK:STDOUT: %B1.ref: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc9: %.5 = base_decl %B1.ref, element0 [template] +// CHECK:STDOUT: %.loc9: %B2.elem = base_decl %B1.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 // CHECK:STDOUT: .base = %.loc9 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %B1.ref -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc14: %.10 = base_decl %B2.ref, element0 [template] +// CHECK:STDOUT: %.loc14: %C.elem = base_decl %B2.ref, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.11 [template = constants.%.12] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc14 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %B2.ref -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: virtual fn @F.1(); @@ -459,9 +459,9 @@ class Derived { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type [template] -// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %ptr: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -482,12 +482,12 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl fn @F(); @@ -496,36 +496,36 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type [template] -// CHECK:STDOUT: %.4: type = struct_type {.: %.3, .m1: %i32, .m2: %i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr.m1.m2: type = struct_type {.: %ptr.1, .m1: %i32, .m2: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.m1.m2 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.35: type = struct_type {.m2: %i32, .m1: %i32} [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.37: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [template] -// CHECK:STDOUT: %.38: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.42: = bound_method %.41, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 4 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct_type.m2.m1.1: type = struct_type {.m2: %i32, .m1: %i32} [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %struct_type.m2.m1.2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -549,50 +549,50 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc5_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9: %.2 = field_decl m1, element1 [template] -// CHECK:STDOUT: %.loc6_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_11.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_11.3: type = converted %int.make_type_signed.loc6, %.loc6_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_9: %.2 = field_decl m2, element2 [template] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_9: %Base.elem = field_decl m1, element1 [template] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_11.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_11.2: type = converted %int.make_type_signed.loc6, %.loc6_11.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_9: %Base.elem = field_decl m2, element2 [template] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.m1.m2 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .m1 = %.loc5_9 // CHECK:STDOUT: .m2 = %.loc6_9 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: virtual fn @F.1(); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %i.var: ref %i32 = var i // CHECK:STDOUT: %i: ref %i32 = bind_name i, %i.var -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.33] -// CHECK:STDOUT: assign %i.var, %.loc12_17.4 +// CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_3.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_3.loc12) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [template = constants.%int_3.2] +// CHECK:STDOUT: assign %i.var, %.loc12_17 // CHECK:STDOUT: %Base.ref.loc14: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %b1.var: ref %Base = var b1 // CHECK:STDOUT: %b1: ref %Base = bind_name b1, %b1.var // CHECK:STDOUT: %i.ref.loc14_25: ref %i32 = name_ref i, %i // CHECK:STDOUT: %i.ref.loc14_34: ref %i32 = name_ref i, %i -// CHECK:STDOUT: %.loc14_35.1: %.35 = struct_literal (%i.ref.loc14_25, %i.ref.loc14_34) +// CHECK:STDOUT: %.loc14_35.1: %struct_type.m2.m1.1 = struct_literal (%i.ref.loc14_25, %i.ref.loc14_34) // CHECK:STDOUT: %.loc14_34: %i32 = bind_value %i.ref.loc14_34 // CHECK:STDOUT: %.loc14_35.2: ref %i32 = class_element_access %b1.var, element2 // CHECK:STDOUT: %.loc14_35.3: init %i32 = initialize_from %.loc14_34 to %.loc14_35.2 @@ -605,36 +605,36 @@ class Derived { // CHECK:STDOUT: %Base.ref.loc15: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %b2.var: ref %Base = var b2 // CHECK:STDOUT: %b2: ref %Base = bind_name b2, %b2.var -// CHECK:STDOUT: %.loc15_25: Core.IntLiteral = int_value 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_34: Core.IntLiteral = int_value 5 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_35.1: %.37 = struct_literal (%.loc15_25, %.loc15_34) -// CHECK:STDOUT: %.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_35.3: = bound_method %.loc15_34, %.loc15_35.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_35.4: = specific_function %.loc15_35.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc15_35.1: init %i32 = call %.loc15_35.4(%.loc15_34) [template = constants.%.40] -// CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %.loc15_34, %int.convert_checked.loc15_35.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_35.6: ref %i32 = class_element_access %b2.var, element2 -// CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_35.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_35.9: = bound_method %.loc15_25, %.loc15_35.8 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_35.10: = specific_function %.loc15_35.9, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_35.2: init %i32 = call %.loc15_35.10(%.loc15_25) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_35.11: init %i32 = converted %.loc15_25, %int.convert_checked.loc15_35.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_35.12: ref %i32 = class_element_access %b2.var, element1 -// CHECK:STDOUT: %.loc15_35.13: init %i32 = initialize_from %.loc15_35.11 to %.loc15_35.12 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_35.14: init %Base = class_init (, %.loc15_35.7, %.loc15_35.13), %b2.var [template = ] -// CHECK:STDOUT: %.loc15_36: init %Base = converted %.loc15_35.1, %.loc15_35.14 [template = ] +// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc15_35.1: %struct_type.m2.m1.2 = struct_literal (%int_3.loc15, %int_5) +// CHECK:STDOUT: %impl.elem0.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_35.1: = bound_method %int_5, %impl.elem0.loc15_35.1 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_35.1: = specific_function %Convert.bound.loc15_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_35.1: init %i32 = call %Convert.specific_fn.loc15_35.1(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_35.2: init %i32 = converted %int_5, %int.convert_checked.loc15_35.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_35.3: ref %i32 = class_element_access %b2.var, element2 +// CHECK:STDOUT: %.loc15_35.4: init %i32 = initialize_from %.loc15_35.2 to %.loc15_35.3 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_35.2: = bound_method %int_3.loc15, %impl.elem0.loc15_35.2 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc15_35.2: = specific_function %Convert.bound.loc15_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc15_35.2: init %i32 = call %Convert.specific_fn.loc15_35.2(%int_3.loc15) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %int_3.loc15, %int.convert_checked.loc15_35.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_35.6: ref %i32 = class_element_access %b2.var, element1 +// CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc15_35.8: init %Base = class_init (, %.loc15_35.4, %.loc15_35.7), %b2.var [template = ] +// CHECK:STDOUT: %.loc15_36: init %Base = converted %.loc15_35.1, %.loc15_35.8 [template = ] // CHECK:STDOUT: assign %b2.var, %.loc15_36 // CHECK:STDOUT: %b1.ref: ref %Base = name_ref b1, %b1 -// CHECK:STDOUT: %m2.ref: %.2 = name_ref m2, @Base.%.loc6_9 [template = @Base.%.loc6_9] +// CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6_9 [template = @Base.%.loc6_9] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %b1.ref, element2 -// CHECK:STDOUT: %.loc18_11: Core.IntLiteral = int_value 4 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_9.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_9.2: = bound_method %.loc18_11, %.loc18_9.1 [template = constants.%.42] -// CHECK:STDOUT: %.loc18_9.3: = specific_function %.loc18_9.2, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_9.3(%.loc18_11) [template = constants.%.44] -// CHECK:STDOUT: %.loc18_9.4: init %i32 = converted %.loc18_11, %int.convert_checked.loc18 [template = constants.%.44] -// CHECK:STDOUT: assign %.loc18_5, %.loc18_9.4 +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_4, %impl.elem0.loc18 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc18_9: init %i32 = converted %int_4, %int.convert_checked.loc18 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %.loc18_5, %.loc18_9 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -642,15 +642,15 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type [template] -// CHECK:STDOUT: %.6: type = struct_type {.: %.5, .base: %Base} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type [template] +// CHECK:STDOUT: %struct_type.vptr.base: type = struct_type {.: %ptr.2, .base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.vptr.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -672,25 +672,25 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc8: %.4 = base_decl %Base.ref, element1 [template] +// CHECK:STDOUT: %.loc8: %Derived.elem = base_decl %Base.ref, element1 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.base [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: extend %Base.ref -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl fn @F(); diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 3cca20f469221..e3261af2b580d 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -19,17 +19,17 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const.1: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.6: type = const_type %.5 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] +// CHECK:STDOUT: %const.2: type = const_type %ptr.3 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -50,64 +50,64 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%.loc11_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_15, %.loc11_9.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_18: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_19: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%.loc11_31) [template = constants.%i32] +// CHECK:STDOUT: %const.loc11_9: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc11_18: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc11_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_31, %.loc11_25.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_34: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_35: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %const.loc11_25: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc11_34: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc11_35: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %const.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %const.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%.loc15_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%int_32.loc15_16) [template = constants.%i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed.loc15_16 [template = constants.%i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed.loc15_16, %.loc15_19.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_9: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%.loc15_33) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %const.loc15_9: type = const_type %ptr.3 [template = constants.%const.2] +// CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%int_32.loc15_33) [template = constants.%i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_signed.loc15_33 [template = constants.%i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_signed.loc15_33, %.loc15_36.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_26: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %const.loc15_26: type = const_type %ptr.3 [template = constants.%const.2] +// CHECK:STDOUT: %p.param: %const.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %const.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @A(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @A(%p.param_patt: %ptr.2) -> %ptr.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%p.param_patt: %.6) -> %.6 { +// CHECK:STDOUT: fn @B(%p.param_patt: %const.2) -> %const.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %const.2 = 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 fc3a3fc147277..c6666ec4adbcc 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -19,13 +19,13 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: --- collapse.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -45,36 +45,36 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%.loc15_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%int_32.loc15_15) [template = constants.%i32] // CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed.loc15_15, %.loc15_9.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_18: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_19: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%.loc15_38) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_9: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_18: type = ptr_type %const [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%int_32.loc15_38) [template = constants.%i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_signed.loc15_38 [template = constants.%i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_signed.loc15_38, %.loc15_32.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_32.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_25: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_42: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_43: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %const.loc15_25: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc15_43: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @F(%p.param_patt: %ptr.2) -> %ptr.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = 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 fc9faafc122e4..d7b1e1776a5d5 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -25,15 +25,15 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: --- fail_collapse.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %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 %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type %ptr.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -54,36 +54,36 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.4 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%.loc15_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%int_32.loc15_22) [template = constants.%i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_signed.loc15_22, %.loc15_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_16.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_9: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_26: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%.loc15_33) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %const.loc15_9: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_26: type = ptr_type %const [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc15_27: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%int_32.loc15_33) [template = constants.%i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_signed.loc15_33 [template = constants.%i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_signed.loc15_33, %.loc15_36.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_37: type = ptr_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %ptr.loc15_37: type = ptr_type %ptr.3 [template = constants.%ptr.4] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.4 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.4 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.4) -> %.6 { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.2) -> %ptr.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc22: %.6 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %.loc22: %ptr.4 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index c27c526d0b9f8..d0824b619570a 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -29,14 +29,14 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,62 +56,62 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %const: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %return.param: ref %const = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %const = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] // CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_signed.loc6, %.loc6_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_12.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %.loc7_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_22) [template = constants.%i32] +// CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %a_ref.var: ref %const = var a_ref +// CHECK:STDOUT: %a_ref: ref %const = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_signed.loc7, %.loc7_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr_ref.var: ref %.3 = var a_ptr_ref -// CHECK:STDOUT: %a_ptr_ref: ref %.3 = bind_name a_ptr_ref, %a_ptr_ref.var +// CHECK:STDOUT: %const.loc7: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr] +// CHECK:STDOUT: %a_ptr_ref.var: ref %ptr = var a_ptr_ref +// CHECK:STDOUT: %a_ptr_ref: ref %ptr = bind_name a_ptr_ref, %a_ptr_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.2; +// CHECK:STDOUT: fn @F() -> %const; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.2 = call %F.ref() +// CHECK:STDOUT: %F.call: init %const = call %F.ref() // CHECK:STDOUT: assign file.%a_ref.var, %F.call -// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, file.%a_ref -// CHECK:STDOUT: %.loc7: %.3 = addr_of %a_ref.ref -// CHECK:STDOUT: assign file.%a_ptr_ref.var, %.loc7 +// CHECK:STDOUT: %a_ref.ref: ref %const = name_ref a_ref, file.%a_ref +// CHECK:STDOUT: %addr: %ptr = addr_of %a_ref.ref +// CHECK:STDOUT: assign file.%a_ptr_ref.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+25, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref Implicit//default, inst+34, loaded -// CHECK:STDOUT: %import_ref.3: ref %.3 = import_ref Implicit//default, inst+46, loaded +// CHECK:STDOUT: %import_ref.2: ref %const = import_ref Implicit//default, inst+34, loaded +// CHECK:STDOUT: %import_ref.3: ref %ptr = import_ref Implicit//default, inst+46, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.4 // CHECK:STDOUT: import Core//prelude @@ -131,31 +131,31 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_17: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_18) [template = constants.%i32] +// CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %const [template = constants.%ptr] +// CHECK:STDOUT: %a.var: ref %ptr = var a +// CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] // CHECK:STDOUT: %.loc7_12.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] // CHECK:STDOUT: %.loc7_12.2: type = converted %int.make_type_signed.loc7, %.loc7_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_12.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_21: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr.var: ref %.3 = var a_ptr -// CHECK:STDOUT: %a_ptr: ref %.3 = bind_name a_ptr, %a_ptr.var +// CHECK:STDOUT: %const.loc7: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc7: type = ptr_type %const [template = constants.%ptr] +// CHECK:STDOUT: %a_ptr.var: ref %ptr = var a_ptr +// CHECK:STDOUT: %a_ptr: ref %ptr = bind_name a_ptr, %a_ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc6: %.3 = addr_of %a_ref.ref -// CHECK:STDOUT: assign file.%a.var, %.loc6 -// CHECK:STDOUT: %a_ptr_ref.ref: ref %.3 = name_ref a_ptr_ref, imports.%import_ref.3 -// CHECK:STDOUT: %.loc7: %.3 = bind_value %a_ptr_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %const = name_ref a_ref, imports.%import_ref.2 +// CHECK:STDOUT: %addr: %ptr = addr_of %a_ref.ref +// CHECK:STDOUT: assign file.%a.var, %addr +// CHECK:STDOUT: %a_ptr_ref.ref: ref %ptr = name_ref a_ptr_ref, imports.%import_ref.3 +// CHECK:STDOUT: %.loc7: %ptr = bind_value %a_ptr_ref.ref // CHECK:STDOUT: assign file.%a_ptr.var, %.loc7 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 1bef6daefed20..ad488873a369a 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -101,35 +101,35 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_3, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.7) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.36: type = array_type %.3, %C [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.36 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.40: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_3, %C [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %array_type.2 = tuple_value (%C.val, %C.val, %C.val) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -153,19 +153,19 @@ fn G() -> C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.4) = binding_pattern a -// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.4) = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: @F.%array_type.loc6_24.2 (%array_type.1) = binding_pattern a +// CHECK:STDOUT: %a.param_patt: @F.%array_type.loc6_24.2 (%array_type.1) = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_23: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23, %T [symbolic = %.loc6_24.2 (constants.%.4)] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_3, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.4) = bind_name a, %a.param +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_24.2 (%array_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %a: @F.%array_type.loc6_24.2 (%array_type.1) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -180,86 +180,86 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.3, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.4)] +// CHECK:STDOUT: %array_type.loc6_24.2: type = array_type constants.%int_3, @F.%T.loc6_6.2 (%T) [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%array_type.loc6_24.2 (%array_type.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a -// CHECK:STDOUT: %.loc6_43.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc6_44.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_44.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.3: type = converted %int.make_type_signed, %.loc6_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.34] -// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_44.4: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_44.5: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.4, %.loc6_43.6 -// CHECK:STDOUT: %.loc6_44.6: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.5 -// CHECK:STDOUT: return %.loc6_44.6 +// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_24.2 (%array_type.1) = name_ref a, %a +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_44.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_44.2: type = converted %int.make_type_signed, %.loc6_44.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_43.2: %i32 = converted %int_0, %.loc6_43.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_44.3: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref +// CHECK:STDOUT: %.loc6_44.4: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.3, %.loc6_43.2 +// CHECK:STDOUT: %.loc6_44.5: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.4 +// CHECK:STDOUT: return %.loc6_44.5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc9_14: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.36] -// CHECK:STDOUT: %a.var: ref %.36 = var a -// CHECK:STDOUT: %a: ref %.36 = bind_name a, %a.var -// CHECK:STDOUT: %.loc9_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal () +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type.2] +// CHECK:STDOUT: %a.var: ref %array_type.2 = var a +// CHECK:STDOUT: %a: ref %array_type.2 = bind_name a, %a.var +// CHECK:STDOUT: %.loc9_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc9_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc9_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_30.1: %tuple.type = tuple_literal (%.loc9_21.1, %.loc9_25.1, %.loc9_29.1) -// CHECK:STDOUT: %.loc9_30.2: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_30.3: ref %C = array_index %a.var, %.loc9_30.2 -// CHECK:STDOUT: %.loc9_21.2: init %C = class_init (), %.loc9_30.3 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.4: init %C = converted %.loc9_21.1, %.loc9_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.5: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_30.6: ref %C = array_index %a.var, %.loc9_30.5 -// CHECK:STDOUT: %.loc9_25.2: init %C = class_init (), %.loc9_30.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.7: init %C = converted %.loc9_25.1, %.loc9_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.8: Core.IntLiteral = int_value 2 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_30.9: ref %C = array_index %a.var, %.loc9_30.8 -// CHECK:STDOUT: %.loc9_29.2: init %C = class_init (), %.loc9_30.9 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.10: init %C = converted %.loc9_29.1, %.loc9_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.11: init %.36 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc9_31: init %.36 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc9_30.2: ref %C = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc9_21.2: init %C = class_init (), %.loc9_30.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc9_30.3: init %C = converted %.loc9_21.1, %.loc9_21.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc9_30.4: ref %C = array_index %a.var, %int_1 +// CHECK:STDOUT: %.loc9_25.2: init %C = class_init (), %.loc9_30.4 [template = constants.%C.val] +// CHECK:STDOUT: %.loc9_30.5: init %C = converted %.loc9_25.1, %.loc9_25.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc9_30.6: ref %C = array_index %a.var, %int_2 +// CHECK:STDOUT: %.loc9_29.2: init %C = class_init (), %.loc9_30.6 [template = constants.%C.val] +// CHECK:STDOUT: %.loc9_30.7: init %C = converted %.loc9_29.1, %.loc9_29.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc9_30.8: init %array_type.2 = array_init (%.loc9_30.3, %.loc9_30.5, %.loc9_30.7) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc9_31: init %array_type.2 = converted %.loc9_30.1, %.loc9_30.8 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.36 = name_ref a, %a -// CHECK:STDOUT: %.loc10_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.40] +// CHECK:STDOUT: %a.ref: ref %array_type.2 = name_ref a, %a +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc10_12: %.36 = bind_value %a.ref -// CHECK:STDOUT: %F.call: init %C = call %.loc10_10(%.loc10_12) to %.loc8_8.2 +// CHECK:STDOUT: %.loc10: %array_type.2 = bind_value %a.ref +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%.loc10) to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_24.2 => constants.%.4 +// CHECK:STDOUT: %array_type.loc6_24.2 => constants.%array_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.36 +// CHECK:STDOUT: %array_type.loc6_24.2 => constants.%array_type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -268,33 +268,33 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.30: type = array_type %.29, %C [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%C.val, %C.val, %C.val) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -323,23 +323,23 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%.loc10_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed.loc10_10, %.loc10_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%int_32.loc10_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed.loc10_10, %.loc10_10.1 [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.3(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.5: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.4 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_23: type = array_type %.loc10_22.5, %C [template = ] -// CHECK:STDOUT: %.loc10_29.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%.loc10_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.2: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.3: type = converted %int.make_type_signed.loc10_29, %.loc10_29.2 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] +// CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%int_32.loc10_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_signed.loc10_29, %.loc10_29.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 @@ -358,19 +358,19 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { // CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.7(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -384,39 +384,39 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.30] -// CHECK:STDOUT: %a.var: ref %.30 = var a -// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var -// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 -// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 -// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 -// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc13_30.2: ref %C = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.3: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc13_30.4: ref %C = array_index %a.var, %int_1 +// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.4 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.5: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %int_2 +// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.6 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.8: init %array_type = array_init (%.loc13_30.3, %.loc13_30.5, %.loc13_30.7) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %array_type = converted %.loc13_30.1, %.loc13_30.8 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_22.6 => constants.%.26 -// CHECK:STDOUT: %.loc10_22.7 => constants.%.27 +// CHECK:STDOUT: %Convert.bound.loc10_22.2 => constants.%Convert.bound +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: @@ -424,35 +424,35 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.30: type = array_type %.29, %C [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%C.val, %C.val, %C.val) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -483,19 +483,19 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: @F.%T.loc10_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc10_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_20.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.3: type = converted %int.make_type_signed, %.loc10_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_signed, %.loc10_20.1 [template = constants.%i32] // CHECK:STDOUT: %T.ref.loc10_29: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_32.2: = bound_method %N.ref, %.loc10_32.1 [symbolic = %.loc10_32.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_32.3: = specific_function %.loc10_32.2, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %.loc10_32.3(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_32.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_32.5: Core.IntLiteral = converted %N.ref, %.loc10_32.4 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_33: type = array_type %.loc10_32.5, %T [template = ] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %Convert.bound.loc10_32.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_32.1: = specific_function %Convert.bound.loc10_32.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.1(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_32.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_32.2: Core.IntLiteral = converted %N.ref, %.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_32.2, %T [template = ] // CHECK:STDOUT: %T.ref.loc10_39: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_6.2 (constants.%T)] @@ -517,11 +517,11 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc10_6.1: type, %N.loc10_16.1: %i32) { @@ -529,9 +529,9 @@ fn G() -> C { // CHECK:STDOUT: %T.patt.loc10_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] // CHECK:STDOUT: %N.loc10_16.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_16.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_32.6: = bound_method %N.loc10_16.2, constants.%Convert.13 [symbolic = %.loc10_32.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_32.7: = specific_function %.loc10_32.6, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %.loc10_32.7(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound.loc10_32.2: = bound_method %N.loc10_16.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_32.2: = specific_function %Convert.bound.loc10_32.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.2(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type, %N.param_patt: %i32](%a.param_patt: ) -> @F.%T.loc10_6.2 (%T); // CHECK:STDOUT: } @@ -539,31 +539,31 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.30] -// CHECK:STDOUT: %a.var: ref %.30 = var a -// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var -// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 -// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 -// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 -// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc13_30.2: ref %C = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.3: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc13_30.4: ref %C = array_index %a.var, %int_1 +// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.4 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.5: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %int_2 +// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.6 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc13_30.8: init %array_type = array_init (%.loc13_30.3, %.loc13_30.5, %.loc13_30.7) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %array_type = converted %.loc13_30.1, %.loc13_30.8 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -572,8 +572,8 @@ fn G() -> C { // CHECK:STDOUT: %T.patt.loc10_6.2 => constants.%T // CHECK:STDOUT: %N.loc10_16.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_32.6 => constants.%.26 -// CHECK:STDOUT: %.loc10_32.7 => constants.%.27 +// CHECK:STDOUT: %Convert.bound.loc10_32.2 => constants.%Convert.bound +// CHECK:STDOUT: %Convert.specific_fn.loc10_32.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_32.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: @@ -581,36 +581,36 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_2, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.7) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.37: type = array_type %.36, %C [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %array: %.37 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.40: type = array_type %.3, %C [template] -// CHECK:STDOUT: %.41: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_3, %C [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array: %array_type.2 = tuple_value (%C.val, %C.val, %C.val) [template] +// CHECK:STDOUT: %array_type.3: type = array_type %int_2, %C [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -634,19 +634,19 @@ fn G() -> C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.4) = binding_pattern a -// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.4) = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: @F.%array_type.loc6_24.2 (%array_type.1) = binding_pattern a +// CHECK:STDOUT: %a.param_patt: @F.%array_type.loc6_24.2 (%array_type.1) = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_23: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23, %T [symbolic = %.loc6_24.2 (constants.%.4)] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_2, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.4) = bind_name a, %a.param +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_24.2 (%array_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %a: @F.%array_type.loc6_24.2 (%array_type.1) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -661,86 +661,86 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.3, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.4)] +// CHECK:STDOUT: %array_type.loc6_24.2: type = array_type constants.%int_2, @F.%T.loc6_6.2 (%T) [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%array_type.loc6_24.2 (%array_type.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a -// CHECK:STDOUT: %.loc6_43.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc6_44.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_44.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.3: type = converted %int.make_type_signed, %.loc6_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.34] -// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_44.4: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_44.5: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.4, %.loc6_43.6 -// CHECK:STDOUT: %.loc6_44.6: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.5 -// CHECK:STDOUT: return %.loc6_44.6 +// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_24.2 (%array_type.1) = name_ref a, %a +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_44.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_44.2: type = converted %int.make_type_signed, %.loc6_44.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_43.2: %i32 = converted %int_0, %.loc6_43.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_44.3: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref +// CHECK:STDOUT: %.loc6_44.4: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.3, %.loc6_43.2 +// CHECK:STDOUT: %.loc6_44.5: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.4 +// CHECK:STDOUT: return %.loc6_44.5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 3 [template = constants.%.36] -// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.37] -// CHECK:STDOUT: %a.var: ref %.37 = var a -// CHECK:STDOUT: %a: ref %.37 = bind_name a, %a.var -// CHECK:STDOUT: %.loc10_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc10_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal () +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type.2] +// CHECK:STDOUT: %a.var: ref %array_type.2 = var a +// CHECK:STDOUT: %a: ref %array_type.2 = bind_name a, %a.var +// CHECK:STDOUT: %.loc10_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc10_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc10_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_30.1: %tuple.type = tuple_literal (%.loc10_21.1, %.loc10_25.1, %.loc10_29.1) -// CHECK:STDOUT: %.loc10_30.2: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_30.3: ref %C = array_index %a.var, %.loc10_30.2 -// CHECK:STDOUT: %.loc10_21.2: init %C = class_init (), %.loc10_30.3 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.4: init %C = converted %.loc10_21.1, %.loc10_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.5: Core.IntLiteral = int_value 1 [template = constants.%.39] -// CHECK:STDOUT: %.loc10_30.6: ref %C = array_index %a.var, %.loc10_30.5 -// CHECK:STDOUT: %.loc10_25.2: init %C = class_init (), %.loc10_30.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.7: init %C = converted %.loc10_25.1, %.loc10_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.8: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_30.9: ref %C = array_index %a.var, %.loc10_30.8 -// CHECK:STDOUT: %.loc10_29.2: init %C = class_init (), %.loc10_30.9 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.10: init %C = converted %.loc10_29.1, %.loc10_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.11: init %.37 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_31: init %.37 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc10_30.2: ref %C = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc10_21.2: init %C = class_init (), %.loc10_30.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc10_30.3: init %C = converted %.loc10_21.1, %.loc10_21.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc10_30.4: ref %C = array_index %a.var, %int_1 +// CHECK:STDOUT: %.loc10_25.2: init %C = class_init (), %.loc10_30.4 [template = constants.%C.val] +// CHECK:STDOUT: %.loc10_30.5: init %C = converted %.loc10_25.1, %.loc10_25.2 [template = constants.%C.val] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc10_30.6: ref %C = array_index %a.var, %int_2 +// CHECK:STDOUT: %.loc10_29.2: init %C = class_init (), %.loc10_30.6 [template = constants.%C.val] +// CHECK:STDOUT: %.loc10_30.7: init %C = converted %.loc10_29.1, %.loc10_29.2 [template = constants.%C.val] +// CHECK:STDOUT: %.loc10_30.8: init %array_type.2 = array_init (%.loc10_30.3, %.loc10_30.5, %.loc10_30.7) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_31: init %array_type.2 = converted %.loc10_30.1, %.loc10_30.8 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc10_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.37 = name_ref a, %a -// CHECK:STDOUT: %.loc21_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.41] +// CHECK:STDOUT: %a.ref: ref %array_type.2 = name_ref a, %a +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc21_12: %.40 = converted %a.ref, [template = ] -// CHECK:STDOUT: %F.call: init %C = call %.loc21_10() to %.loc8_8.2 +// CHECK:STDOUT: %.loc21: %array_type.3 = converted %a.ref, [template = ] +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn() to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_24.2 => constants.%.4 +// CHECK:STDOUT: %array_type.loc6_24.2 => constants.%array_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.40 +// CHECK:STDOUT: %array_type.loc6_24.2 => constants.%array_type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -749,34 +749,34 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.30: type = array_type %.29, %D [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %struct: %D = struct_value () [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %D [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %D.val: %D = struct_value () [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%D.val, %D.val, %D.val) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -807,23 +807,23 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%.loc10_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed.loc10_10, %.loc10_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%int_32.loc10_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed.loc10_10, %.loc10_10.1 [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.3(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.5: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.4 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_23: type = array_type %.loc10_22.5, %C [template = ] -// CHECK:STDOUT: %.loc10_29.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%.loc10_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.2: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.3: type = converted %int.make_type_signed.loc10_29, %.loc10_29.2 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] +// CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%int_32.loc10_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_signed.loc10_29, %.loc10_29.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 @@ -842,27 +842,27 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { // CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.26)] -// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] -// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.7(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -876,39 +876,39 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.30] -// CHECK:STDOUT: %a.var: ref %.30 = var a -// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var -// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %D [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_30.3: ref %D = array_index %a.var, %.loc13_30.2 -// CHECK:STDOUT: %.loc13_21.2: init %D = class_init (), %.loc13_30.3 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.4: init %D = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_30.6: ref %D = array_index %a.var, %.loc13_30.5 -// CHECK:STDOUT: %.loc13_25.2: init %D = class_init (), %.loc13_30.6 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.7: init %D = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_30.9: ref %D = array_index %a.var, %.loc13_30.8 -// CHECK:STDOUT: %.loc13_29.2: init %D = class_init (), %.loc13_30.9 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.10: init %D = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc13_30.2: ref %D = array_index %a.var, %int_0 +// CHECK:STDOUT: %.loc13_21.2: init %D = class_init (), %.loc13_30.2 [template = constants.%D.val] +// CHECK:STDOUT: %.loc13_30.3: init %D = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%D.val] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc13_30.4: ref %D = array_index %a.var, %int_1 +// CHECK:STDOUT: %.loc13_25.2: init %D = class_init (), %.loc13_30.4 [template = constants.%D.val] +// CHECK:STDOUT: %.loc13_30.5: init %D = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%D.val] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc13_30.6: ref %D = array_index %a.var, %int_2 +// CHECK:STDOUT: %.loc13_29.2: init %D = class_init (), %.loc13_30.6 [template = constants.%D.val] +// CHECK:STDOUT: %.loc13_30.7: init %D = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%D.val] +// CHECK:STDOUT: %.loc13_30.8: init %array_type = array_init (%.loc13_30.3, %.loc13_30.5, %.loc13_30.7) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %array_type = converted %.loc13_30.1, %.loc13_30.8 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_22.6 => constants.%.26 -// CHECK:STDOUT: %.loc10_22.7 => constants.%.27 +// CHECK:STDOUT: %Convert.bound.loc10_22.2 => constants.%Convert.bound +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index b7433279f3677..d23db1fb66061 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -71,18 +71,18 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%D) [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%D) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,7 +101,7 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -112,34 +112,34 @@ fn G() -> i32 { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%C.loc7_22.2 (%C.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%C.loc7_22.2 (%C.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%C.loc7_22.2 (%C.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%C.loc7_22.2 (%C.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc7_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc7_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %T.ref.loc7_21: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.2 (constants.%C.1)] // CHECK:STDOUT: %T.ref.loc7_28: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%C.loc7_22.2 (%C.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%C.loc7_22.2 (%C.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%C.loc7_22.2 (%C.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%C.loc7_22.2 (%C.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc7_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %C.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %C.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %C.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %C.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %D.ref.loc9_11: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [template = constants.%C.2] // CHECK:STDOUT: %D.ref.loc9_18: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %p.param: %C.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %C.3 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %C.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } @@ -152,49 +152,49 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc7_22.2: type = class_type @C, @C(%T.loc7_6.2) [symbolic = %C.loc7_22.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc7_22.2: type = class_type @C, @C(%T.loc7_6.2) [symbolic = %C.loc7_22.2 (constants.%C.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%C.loc7_22.2 (%C.2)) -> @F.%T.loc7_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%C.loc7_22.2 (%C.1)) -> @F.%T.loc7_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%C.loc7_22.2 (%C.2) = name_ref p, %p -// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] -// CHECK:STDOUT: %F.call: init @F.%T.loc7_6.2 (%T) = call %.loc7_39.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%C.loc7_22.2 (%C.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.1)] +// CHECK:STDOUT: %F.call: init @F.%T.loc7_6.2 (%T) = call %F.specific_fn.loc7_39.1(%p.ref) // CHECK:STDOUT: %.loc7_43.1: @F.%T.loc7_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_43.2: @F.%T.loc7_6.2 (%T) = converted %F.call, %.loc7_43.1 // CHECK:STDOUT: return %.loc7_43.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %C.3) -> %return: %D { +// CHECK:STDOUT: fn @G(%p.param_patt: %C.2) -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %C.3 = name_ref p, %p -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%D) [template = constants.%.5] +// CHECK:STDOUT: %p.ref: %C.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%D) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc9_15.2: ref %D = splice_block %return {} -// CHECK:STDOUT: %F.call: init %D = call %.loc10(%p.ref) to %.loc9_15.2 +// CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%p.ref) to %.loc9_15.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,16 +213,16 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.4 +// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc7_6.2) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%D) { @@ -235,10 +235,10 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%D) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%D // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%D -// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.3 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 +// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface.carbon @@ -247,18 +247,18 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type: type = generic_class_type @I [template] -// CHECK:STDOUT: %I.1: %I.type = struct_value () [template] -// CHECK:STDOUT: %I.2: type = class_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %I.generic: %I.type = struct_value () [template] +// CHECK:STDOUT: %I.1: type = class_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %I.3: type = class_type @I, @I(%C) [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %I.2: type = class_type @I, @I(%C) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -277,7 +277,7 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: %I.type = class_decl @I [template = constants.%I.1] { +// CHECK:STDOUT: %I.decl: %I.type = class_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -288,34 +288,34 @@ fn G() -> i32 { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%I.loc7_22.2 (%I.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%I.loc7_22.2 (%I.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%I.loc7_22.2 (%I.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%I.loc7_22.2 (%I.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.1] +// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.2 (constants.%I.2)] +// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.2 (constants.%I.1)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%I.loc7_22.2 (%I.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%I.loc7_22.2 (%I.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%I.loc7_22.2 (%I.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%I.loc7_22.2 (%I.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %I.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %I.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %I.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %I.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.1] +// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %C.ref.loc9_11: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I: type = class_type @I, @I(constants.%C) [template = constants.%I.3] +// CHECK:STDOUT: %I: type = class_type @I, @I(constants.%C) [template = constants.%I.2] // CHECK:STDOUT: %C.ref.loc9_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %p.param: %I.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %I.3 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %I.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %I.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -328,48 +328,48 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%I.2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: .Self = constants.%I.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %I.loc7_22.2: type = class_type @I, @I(%T.loc7_6.2) [symbolic = %I.loc7_22.2 (constants.%I.2)] +// CHECK:STDOUT: %I.loc7_22.2: type = class_type @I, @I(%T.loc7_6.2) [symbolic = %I.loc7_22.2 (constants.%I.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%I.loc7_22.2 (%I.2)) -> %return: %C { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%I.loc7_22.2 (%I.1)) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%I.loc7_22.2 (%I.2) = name_ref p, %p -// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] +// CHECK:STDOUT: %p.ref: @F.%I.loc7_22.2 (%I.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: %.loc7_25.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc7_39.1(%p.ref) to %.loc7_25.2 +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn.loc7_39.1(%p.ref) to %.loc7_25.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %I.3) -> %return: %C { +// CHECK:STDOUT: fn @G(%p.param_patt: %I.2) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %I.3 = name_ref p, %p -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.5] +// CHECK:STDOUT: %p.ref: %I.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc9_15.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc10(%p.ref) to %.loc9_15.2 +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc9_15.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -388,16 +388,16 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.2 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.4 +// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc7_6.2) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.2 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { @@ -410,10 +410,10 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%C -// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.3 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 +// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nested.carbon @@ -422,30 +422,30 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [template] -// CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] -// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] +// CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [template] +// CHECK:STDOUT: %Outer.1: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %Inner.type.1: type = generic_class_type @Inner, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.1: %Inner.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %Inner.generic.1: %Inner.type.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.1: type = class_type @Inner, @Inner(%T, %U) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %U) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T, %U) [symbolic] -// CHECK:STDOUT: %Outer.3: type = class_type @Outer, @Outer(%C) [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T, %U) [symbolic] +// CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%C) [template] // CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%C) [template] -// CHECK:STDOUT: %Inner.3: %Inner.type.2 = struct_value () [template] -// CHECK:STDOUT: %Inner.4: type = class_type @Inner, @Inner(%C, %D) [template] +// CHECK:STDOUT: %Inner.generic.2: %Inner.type.2 = struct_value () [template] +// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%C, %D) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%C, %D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %F, @F(%C, %D) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%C, %D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -465,7 +465,7 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.1] { +// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -479,18 +479,18 @@ fn G() -> i32 { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_6.1, runtime_param [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc13_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_16.1, runtime_param [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %p.patt: @F.%Inner.loc13_45.2 (%Inner.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%Inner.loc13_45.2 (%Inner.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%Inner.loc13_45.2 (%Inner.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%Inner.loc13_45.2 (%Inner.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%tuple.type (%tuple.type.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] // CHECK:STDOUT: %T.ref.loc13_35: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.2 (constants.%Outer.2)] -// CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc13_37 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13_37 [symbolic = %Inner.loc13_37 (constants.%Inner.1)] +// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.2 (constants.%Outer.1)] +// CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13_37 [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: %U.ref.loc13_44: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.2 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.2 (constants.%Inner.1)] // CHECK:STDOUT: %T.ref.loc13_52: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc13_55: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %.loc13_56.1: %tuple.type.1 = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) @@ -499,30 +499,30 @@ fn G() -> i32 { // CHECK:STDOUT: %T.loc13_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.2 (%Inner.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%Inner.loc13_45.2 (%Inner.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.2 (%Inner.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%Inner.loc13_45.2 (%Inner.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.2) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %Inner.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %Inner.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %Inner.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %Inner.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] // CHECK:STDOUT: %C.ref.loc15_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(constants.%C) [template = constants.%Outer.3] -// CHECK:STDOUT: %.loc15_17: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%C) [template = constants.%Inner.3] -// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc15_17 [template = constants.%Inner.3] +// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(constants.%C) [template = constants.%Outer.2] +// CHECK:STDOUT: %.loc15_17: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%C) [template = constants.%Inner.generic.2] +// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc15_17 [template = constants.%Inner.generic.2] // CHECK:STDOUT: %D.ref.loc15_24: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%C, constants.%D) [template = constants.%Inner.4] +// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%C, constants.%D) [template = constants.%Inner.2] // CHECK:STDOUT: %C.ref.loc15_32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref.loc15_35: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %.loc15_36.1: %tuple.type.1 = tuple_literal (%C.ref.loc15_32, %D.ref.loc15_35) // CHECK:STDOUT: %.loc15_36.2: type = converted %.loc15_36.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %p.param: %Inner.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %Inner.4 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %Inner.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %Inner.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } @@ -534,22 +534,22 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc4_13.2) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.generic: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner (constants.%Inner.1)] { +// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.1)] { // CHECK:STDOUT: %U.patt.loc5_15.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_15.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc5_15.1, runtime_param [symbolic = %U.patt.loc5_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc5_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Outer.2 +// CHECK:STDOUT: .Self = constants.%Outer.1 // CHECK:STDOUT: .Inner = %Inner.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -560,28 +560,28 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Inner.2 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: .Self = constants.%Inner.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc13_6.1: type, %U.loc13_16.1: type) { @@ -589,44 +589,44 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc13_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %Outer.loc13_36.2: type = class_type @Outer, @Outer(%T.loc13_6.2) [symbolic = %Outer.loc13_36.2 (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc13_36.2: type = class_type @Outer, @Outer(%T.loc13_6.2) [symbolic = %Outer.loc13_36.2 (constants.%Outer.1)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc13_6.2) [symbolic = %Inner.type (constants.%Inner.type.1)] -// CHECK:STDOUT: %Inner.loc13_37: @F.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc13_37 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.loc13_45.2: type = class_type @Inner, @Inner(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %Inner.loc13_45.2 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.generic: @F.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.loc13_45.2: type = class_type @Inner, @Inner(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %Inner.loc13_45.2 (constants.%Inner.1)] // CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc13_6.2 (%T), @F.%U.loc13_16.2 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %.loc13_67.2 (constants.%.5)] +// CHECK:STDOUT: %F.specific_fn.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_45.2 (%Inner.2)) -> %return: @F.%tuple.type (%tuple.type.2) { +// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_45.2 (%Inner.1)) -> %return: @F.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_45.2 (%Inner.2) = name_ref p, %p -// CHECK:STDOUT: %.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc13_67.2 (constants.%.5)] +// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_45.2 (%Inner.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: %.loc13_70.1: ref @F.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.2) = call %.loc13_67.1(%p.ref) to %.loc13_70.1 +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.2) = call %F.specific_fn.loc13_67.1(%p.ref) to %.loc13_70.1 // CHECK:STDOUT: %.loc13_70.2: ref @F.%tuple.type (%tuple.type.2) = temporary %.loc13_70.1, %F.call -// CHECK:STDOUT: %.loc13_70.3: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_70.2, element0 -// CHECK:STDOUT: %.loc13_70.4: @F.%T.loc13_6.2 (%T) = bind_value %.loc13_70.3 -// CHECK:STDOUT: %.loc13_70.5: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_70.6: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_70.4 to %.loc13_70.5 -// CHECK:STDOUT: %.loc13_70.7: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_70.2, element1 -// CHECK:STDOUT: %.loc13_70.8: @F.%U.loc13_16.2 (%U) = bind_value %.loc13_70.7 -// CHECK:STDOUT: %.loc13_70.9: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_70.10: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_70.8 to %.loc13_70.9 -// CHECK:STDOUT: %.loc13_70.11: init @F.%tuple.type (%tuple.type.2) = tuple_init (%.loc13_70.6, %.loc13_70.10) to %return -// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.2) = converted %F.call, %.loc13_70.11 +// CHECK:STDOUT: %tuple.elem0.loc13_70.1: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_70.2, element0 +// CHECK:STDOUT: %.loc13_70.3: @F.%T.loc13_6.2 (%T) = bind_value %tuple.elem0.loc13_70.1 +// CHECK:STDOUT: %tuple.elem0.loc13_70.2: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc13_70.4: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_70.3 to %tuple.elem0.loc13_70.2 +// CHECK:STDOUT: %tuple.elem1.loc13_70.1: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_70.2, element1 +// CHECK:STDOUT: %.loc13_70.5: @F.%U.loc13_16.2 (%U) = bind_value %tuple.elem1.loc13_70.1 +// CHECK:STDOUT: %tuple.elem1.loc13_70.2: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc13_70.6: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_70.5 to %tuple.elem1.loc13_70.2 +// CHECK:STDOUT: %.loc13_70.7: init @F.%tuple.type (%tuple.type.2) = tuple_init (%.loc13_70.4, %.loc13_70.6) to %return +// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.2) = converted %F.call, %.loc13_70.7 // CHECK:STDOUT: return %.loc13_71 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %Inner.4) -> %return: %tuple.type.3 { +// CHECK:STDOUT: fn @G(%p.param_patt: %Inner.2) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %Inner.4 = name_ref p, %p -// CHECK:STDOUT: %.loc16: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.7] +// CHECK:STDOUT: %p.ref: %Inner.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc15_28.2: ref %tuple.type.3 = splice_block %return {} -// CHECK:STDOUT: %F.call: init %tuple.type.3 = call %.loc16(%p.ref) to %.loc15_28.2 +// CHECK:STDOUT: %F.call: init %tuple.type.3 = call %F.specific_fn(%p.ref) to %.loc15_28.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -636,7 +636,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner => constants.%Inner.1 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) { @@ -666,14 +666,14 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.1 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.1 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2 => constants.%.5 +// CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc13_6.2, %U.loc13_16.2) { @@ -681,10 +681,10 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.1 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 -// CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.1 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.1 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -694,7 +694,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 -// CHECK:STDOUT: %Inner => constants.%Inner.3 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%C, constants.%D) { @@ -709,45 +709,45 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%C // CHECK:STDOUT: %U.loc13_16.2 => constants.%D // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%D -// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.3 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.2 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 -// CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.3 -// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.4 +// CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.2 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.2 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2 => constants.%.7 +// CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nontype.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %WithNontype.type: type = generic_class_type @WithNontype [template] -// CHECK:STDOUT: %WithNontype.1: %WithNontype.type = struct_value () [template] -// CHECK:STDOUT: %WithNontype.2: type = class_type @WithNontype, @WithNontype(%N.1) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %WithNontype.generic: %WithNontype.type = struct_value () [template] +// CHECK:STDOUT: %WithNontype.1: type = class_type @WithNontype, @WithNontype(%N.1) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %WithNontype.3: type = class_type @WithNontype, @WithNontype(%.32) [template] -// CHECK:STDOUT: %struct: %WithNontype.3 = struct_value () [template] -// CHECK:STDOUT: %.33: = specific_function %F, @F(%.32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %WithNontype.2: type = class_type @WithNontype, @WithNontype(%int_0.2) [template] +// CHECK:STDOUT: %WithNontype.val: %WithNontype.2 = struct_value () [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_0.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -767,40 +767,40 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %WithNontype.decl: %WithNontype.type = class_decl @WithNontype [template = constants.%WithNontype.1] { +// CHECK:STDOUT: %WithNontype.decl: %WithNontype.type = class_decl @WithNontype [template = constants.%WithNontype.generic] { // CHECK:STDOUT: %N.patt.loc4_19.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_23.3: type = converted %int.make_type_signed, %.loc4_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_23.2: type = converted %int.make_type_signed, %.loc4_23.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_19.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_6.1, runtime_param [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %x.patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6_10, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6_10, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] // CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.1) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.2)] -// CHECK:STDOUT: %.loc6_37.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_37: init type = call constants.%Int(%.loc6_37.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.2: type = value_of_initializer %int.make_type_signed.loc6_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.3: type = converted %int.make_type_signed.loc6_37, %.loc6_37.2 [template = constants.%i32] +// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.1) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] +// CHECK:STDOUT: %int_32.loc6_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_37: init type = call constants.%Int(%int_32.loc6_37) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_37.1: type = value_of_initializer %int.make_type_signed.loc6_37 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_37.2: type = converted %int.make_type_signed.loc6_37, %.loc6_37.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc6_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -808,10 +808,10 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_11.3: type = converted %int.make_type_signed, %.loc8_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_11.2: type = converted %int.make_type_signed, %.loc8_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -824,22 +824,22 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_29: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%WithNontype.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_29 +// CHECK:STDOUT: .Self = constants.%WithNontype.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc6_6.1: %i32) { // CHECK:STDOUT: %N.loc6_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc6_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %WithNontype.loc6_31.2: type = class_type @WithNontype, @WithNontype(%N.loc6_6.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.2)] +// CHECK:STDOUT: %WithNontype.loc6_31.2: type = class_type @WithNontype, @WithNontype(%N.loc6_6.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: %i32](%x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2)) -> %i32 { +// CHECK:STDOUT: fn[%N.param_patt: %i32](%x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_50: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] // CHECK:STDOUT: return %N.ref.loc6_50 @@ -849,23 +849,23 @@ fn G() -> i32 { // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc9_13.1: %.2 = struct_literal () -// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] -// CHECK:STDOUT: %.loc9_30: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_31.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_31.2: = bound_method %.loc9_30, %.loc9_31.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_31.3: = specific_function %.loc9_31.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_31.3(%.loc9_30) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_31.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc9_31.5: %i32 = converted %.loc9_30, %.loc9_31.4 [template = constants.%.32] -// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.32) [template = constants.%WithNontype.3] -// CHECK:STDOUT: %.loc9_13.2: ref %WithNontype.3 = temporary_storage -// CHECK:STDOUT: %.loc9_13.3: init %WithNontype.3 = class_init (), %.loc9_13.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_13.4: ref %WithNontype.3 = temporary %.loc9_13.2, %.loc9_13.3 -// CHECK:STDOUT: %.loc9_15.1: ref %WithNontype.3 = converted %.loc9_13.1, %.loc9_13.4 -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.32) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_15.2: %WithNontype.3 = bind_value %.loc9_15.1 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc9_10(%.loc9_15.2) +// CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_31.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_31.2: %i32 = converted %int_0, %.loc9_31.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%int_0.2) [template = constants.%WithNontype.2] +// CHECK:STDOUT: %.loc9_13.2: ref %WithNontype.2 = temporary_storage +// CHECK:STDOUT: %.loc9_13.3: init %WithNontype.2 = class_init (), %.loc9_13.2 [template = constants.%WithNontype.val] +// CHECK:STDOUT: %.loc9_13.4: ref %WithNontype.2 = temporary %.loc9_13.2, %.loc9_13.3 +// CHECK:STDOUT: %.loc9_15.1: ref %WithNontype.2 = converted %.loc9_13.1, %.loc9_13.4 +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_0.2) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %.loc9_15.2: %WithNontype.2 = bind_value %.loc9_15.1 +// CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc9_15.2) // CHECK:STDOUT: %.loc9_33.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_33.2: %i32 = converted %F.call, %.loc9_33.1 // CHECK:STDOUT: return %.loc9_33.2 @@ -886,20 +886,20 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc6_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%N.1 -// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.2 +// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithNontype(constants.%.32) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%.32 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.32 +// CHECK:STDOUT: specific @WithNontype(constants.%int_0.2) { +// CHECK:STDOUT: %N.loc4_19.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%int_0.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.32) { -// CHECK:STDOUT: %N.loc6_6.2 => constants.%.32 -// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.32 -// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.3 +// CHECK:STDOUT: specific @F(constants.%int_0.2) { +// CHECK:STDOUT: %N.loc6_6.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%int_0.2 +// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index bd5d69faf06b7..c70195a55fde5 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -48,11 +48,11 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %F, @F(%.1) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_64) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -110,10 +110,10 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_9.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%i64] -// CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i64] -// CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%i64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_64) [template = constants.%i64] +// CHECK:STDOUT: %.loc8_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i64] +// CHECK:STDOUT: %.loc8_9.2: type = converted %int.make_type_signed, %.loc8_9.1 [template = constants.%i64] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] @@ -144,8 +144,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %a.ref: %i64 = name_ref a, %a -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.1) [template = constants.%.2] -// CHECK:STDOUT: %F.call: init Core.IntLiteral = call %.loc9_10(%a.ref) +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_64) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init Core.IntLiteral = call %F.specific_fn(%a.ref) // CHECK:STDOUT: %.loc9_14.1: Core.IntLiteral = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_14.2: Core.IntLiteral = converted %F.call, %.loc9_14.1 // CHECK:STDOUT: return %.loc9_14.2 @@ -157,9 +157,9 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %iN => constants.%iN // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.1) { -// CHECK:STDOUT: %N.loc4_6.2 => constants.%.1 -// CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.1 +// CHECK:STDOUT: specific @F(constants.%int_64) { +// CHECK:STDOUT: %N.loc4_6.2 => constants.%int_64 +// CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%int_64 // CHECK:STDOUT: %iN => constants.%i64 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -176,7 +176,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -236,10 +236,10 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] -// CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc12_9.2: type = converted %float.make_type, %.loc12_9.1 [template = f64] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index b8423b076e9c3..c03b598350aff 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -56,8 +56,8 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] @@ -67,11 +67,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %U) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T, %U) [symbolic] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T, %U) [symbolic] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%C, %D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %F, @F(%C, %D) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%C, %D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -135,19 +135,19 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type, %U.loc7_16.1: type) { @@ -158,14 +158,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc7_6.2 (%T), @F.%U.loc7_16.2 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2: = specific_function constants.%F, @F(%T.loc7_6.2, %U.loc7_16.2) [symbolic = %.loc7_54.2 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn.loc7_54.2: = specific_function constants.%F, @F(%T.loc7_6.2, %U.loc7_16.2) [symbolic = %F.specific_fn.loc7_54.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%pair.param_patt: @F.%tuple.type (%tuple.type.2)) -> @F.%U.loc7_16.2 (%U) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %pair.ref: @F.%tuple.type (%tuple.type.2) = name_ref pair, %pair -// CHECK:STDOUT: %.loc7_54.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc7_54.2 (constants.%.4)] -// CHECK:STDOUT: %F.call: init @F.%U.loc7_16.2 (%U) = call %.loc7_54.1(%pair.ref) +// CHECK:STDOUT: %F.specific_fn.loc7_54.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc7_54.2 (constants.%F.specific_fn.1)] +// CHECK:STDOUT: %F.call: init @F.%U.loc7_16.2 (%U) = call %F.specific_fn.loc7_54.1(%pair.ref) // CHECK:STDOUT: %.loc7_61.1: @F.%U.loc7_16.2 (%U) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_61.2: @F.%U.loc7_16.2 (%U) = converted %F.call, %.loc7_61.1 // CHECK:STDOUT: return %.loc7_61.2 @@ -176,9 +176,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %pair.ref: %tuple.type.3 = name_ref pair, %pair -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.7] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc9_20.2: ref %D = splice_block %return {} -// CHECK:STDOUT: %F.call: init %D = call %.loc10(%pair.ref) to %.loc9_20.2 +// CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%pair.ref) to %.loc9_20.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -190,7 +190,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2 => constants.%.4 +// CHECK:STDOUT: %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc7_6.2, %U.loc7_16.2) { @@ -209,51 +209,51 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2 => constants.%.7 +// CHECK:STDOUT: %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %Pair: %tuple.type.2 = bind_symbolic_name Pair, 0 [symbolic] // CHECK:STDOUT: %Pair.patt: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic] // CHECK:STDOUT: %HasPair.type: type = generic_class_type @HasPair [template] -// CHECK:STDOUT: %HasPair.1: %HasPair.type = struct_value () [template] -// CHECK:STDOUT: %HasPair.2: type = class_type @HasPair, @HasPair(%Pair) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %HasPair.generic: %HasPair.type = struct_value () [template] +// CHECK:STDOUT: %HasPair.1: type = class_type @HasPair, @HasPair(%Pair) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %A: %i32 = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: %i32 = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %B: %i32 = bind_symbolic_name B, 1 [symbolic] // CHECK:STDOUT: %B.patt: %i32 = symbolic_binding_pattern B, 1 [symbolic] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%A, %B) [symbolic] -// CHECK:STDOUT: %HasPair.3: type = class_type @HasPair, @HasPair(%tuple.1) [symbolic] +// CHECK:STDOUT: %HasPair.2: type = class_type @HasPair, @HasPair(%tuple.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%.34, %.37) [template] -// CHECK:STDOUT: %HasPair.4: type = class_type @HasPair, @HasPair(%tuple.2) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %HasPair.3: type = class_type @HasPair, @HasPair(%tuple.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.38: = specific_function %F, @F(%.34, %.37) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -273,14 +273,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasPair.decl: %HasPair.type = class_decl @HasPair [template = constants.%HasPair.1] { +// CHECK:STDOUT: %HasPair.decl: %HasPair.type = class_decl @HasPair [template = constants.%HasPair.generic] { // CHECK:STDOUT: %Pair.patt.loc4_15.1: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: %Pair.param_patt: %tuple.type.2 = value_param_pattern %Pair.patt.loc4_15.1, runtime_param [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_23: init type = call constants.%Int(%.loc4_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_28: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_28: init type = call constants.%Int(%.loc4_28) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_23: init type = call constants.%Int(%int_32.loc4_23) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_28: init type = call constants.%Int(%int_32.loc4_28) [template = constants.%i32] // CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4_23, %int.make_type_signed.loc4_28) // CHECK:STDOUT: %.loc4_31.2: type = value_of_initializer %int.make_type_signed.loc4_23 [template = constants.%i32] // CHECK:STDOUT: %.loc4_31.3: type = converted %int.make_type_signed.loc4_23, %.loc4_31.2 [template = constants.%i32] @@ -295,70 +295,70 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %A.param_patt: %i32 = value_param_pattern %A.patt.loc6_6.1, runtime_param [symbolic = %A.patt.loc6_6.2 (constants.%A.patt)] // CHECK:STDOUT: %B.patt.loc6_15.1: %i32 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: %i32 = value_param_pattern %B.patt.loc6_15.1, runtime_param [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] -// CHECK:STDOUT: %h.patt: @F.%HasPair.loc6_41.2 (%HasPair.3) = binding_pattern h -// CHECK:STDOUT: %h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.3) = value_param_pattern %h.patt, runtime_param0 +// CHECK:STDOUT: %h.patt: @F.%HasPair.loc6_41.2 (%HasPair.2) = binding_pattern h +// CHECK:STDOUT: %h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.2) = value_param_pattern %h.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%.loc6_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6_10, %.loc6_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_19: init type = call constants.%Int(%.loc6_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_19.2: type = value_of_initializer %int.make_type_signed.loc6_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_19.3: type = converted %int.make_type_signed.loc6_19, %.loc6_19.2 [template = constants.%i32] -// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.1] +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6_10, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_19: init type = call constants.%Int(%int_32.loc6_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_19.1: type = value_of_initializer %int.make_type_signed.loc6_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_19.2: type = converted %int.make_type_signed.loc6_19, %.loc6_19.1 [template = constants.%i32] +// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] // CHECK:STDOUT: %A.ref: %i32 = name_ref A, %A.loc6_6.1 [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.ref.loc6_39: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: %.loc6_40: %tuple.type.2 = tuple_literal (%A.ref, %B.ref.loc6_39) // CHECK:STDOUT: %tuple.loc6_40.1: %tuple.type.2 = tuple_value (%A.ref, %B.ref.loc6_39) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] // CHECK:STDOUT: %.loc6_41: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %HasPair.loc6_41.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.3)] -// CHECK:STDOUT: %.loc6_47.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_47: init type = call constants.%Int(%.loc6_47.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_47.2: type = value_of_initializer %int.make_type_signed.loc6_47 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_47.3: type = converted %int.make_type_signed.loc6_47, %.loc6_47.2 [template = constants.%i32] +// CHECK:STDOUT: %HasPair.loc6_41.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] +// CHECK:STDOUT: %int_32.loc6_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_47: init type = call constants.%Int(%int_32.loc6_47) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_47.1: type = value_of_initializer %int.make_type_signed.loc6_47 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_47.2: type = converted %int.make_type_signed.loc6_47, %.loc6_47.1 [template = constants.%i32] // CHECK:STDOUT: %A.param: %i32 = value_param runtime_param // CHECK:STDOUT: %A.loc6_6.1: %i32 = bind_symbolic_name A, 0, %A.param [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.param: %i32 = value_param runtime_param // CHECK:STDOUT: %B.loc6_15.1: %i32 = bind_symbolic_name B, 1, %B.param [symbolic = %B.loc6_15.2 (constants.%B)] -// CHECK:STDOUT: %h.param: @F.%HasPair.loc6_41.2 (%HasPair.3) = value_param runtime_param0 -// CHECK:STDOUT: %h: @F.%HasPair.loc6_41.2 (%HasPair.3) = bind_name h, %h.param +// CHECK:STDOUT: %h.param: @F.%HasPair.loc6_41.2 (%HasPair.2) = value_param runtime_param0 +// CHECK:STDOUT: %h: @F.%HasPair.loc6_41.2 (%HasPair.2) = bind_name h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %h.patt: %HasPair.4 = binding_pattern h -// CHECK:STDOUT: %h.param_patt: %HasPair.4 = value_param_pattern %h.patt, runtime_param0 +// CHECK:STDOUT: %h.patt: %HasPair.3 = binding_pattern h +// CHECK:STDOUT: %h.param_patt: %HasPair.3 = value_param_pattern %h.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.1] -// CHECK:STDOUT: %.loc8_18: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_21: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc8_22.1: %tuple.type.3 = tuple_literal (%.loc8_18, %.loc8_21) -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_18, %.loc8_22.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %.loc8_22.4(%.loc8_18) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_18, %.loc8_22.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_22.7: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.8: = bound_method %.loc8_21, %.loc8_22.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc8_22.9: = specific_function %.loc8_22.8, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %.loc8_22.9(%.loc8_21) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_22.10: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_22.11: %i32 = converted %.loc8_21, %.loc8_22.10 [template = constants.%.37] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.6, %.loc8_22.11) [template = constants.%tuple.2] +// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc8_22.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc8_22.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc8_22.1: = specific_function %Convert.bound.loc8_22.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %Convert.specific_fn.loc8_22.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8_22.2: = bound_method %int_2, %impl.elem0.loc8_22.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc8_22.2: = specific_function %Convert.bound.loc8_22.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %Convert.specific_fn.loc8_22.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_22.4: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_22.5: %i32 = converted %int_2, %.loc8_22.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.3, %.loc8_22.5) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc8_23: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] -// CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.4] -// CHECK:STDOUT: %.loc8_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_29.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_29.3: type = converted %int.make_type_signed, %.loc8_29.2 [template = constants.%i32] -// CHECK:STDOUT: %h.param: %HasPair.4 = value_param runtime_param0 -// CHECK:STDOUT: %h: %HasPair.4 = bind_name h, %h.param +// CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_29.2: type = converted %int.make_type_signed, %.loc8_29.1 [template = constants.%i32] +// CHECK:STDOUT: %h.param: %HasPair.3 = value_param runtime_param0 +// CHECK:STDOUT: %h: %HasPair.3 = bind_name h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -371,11 +371,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_35: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%HasPair.2 -// CHECK:STDOUT: complete_type_witness = %.loc4_35 +// CHECK:STDOUT: .Self = constants.%HasPair.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -385,23 +385,23 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %B.loc6_15.2: %i32 = bind_symbolic_name B, 1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: %B.patt.loc6_15.2: %i32 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] // CHECK:STDOUT: %tuple.loc6_40.2: %tuple.type.2 = tuple_value (%A.loc6_6.2, %B.loc6_15.2) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %HasPair.loc6_41.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.3)] +// CHECK:STDOUT: %HasPair.loc6_41.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%A.param_patt: %i32, %B.param_patt: %i32](%h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.3)) -> %i32 { +// CHECK:STDOUT: fn[%A.param_patt: %i32, %B.param_patt: %i32](%h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %B.ref.loc6_60: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: return %B.ref.loc6_60 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%h.param_patt: %HasPair.4) -> %i32 { +// CHECK:STDOUT: fn @G(%h.param_patt: %HasPair.3) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %h.ref: %HasPair.4 = name_ref h, %h -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.34, constants.%.37) [template = constants.%.38] -// CHECK:STDOUT: %F.call: init %i32 = call %.loc9_10(%h.ref) +// CHECK:STDOUT: %h.ref: %HasPair.3 = name_ref h, %h +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_1.2, constants.%int_2.2) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%h.ref) // CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_14.2: %i32 = converted %F.call, %.loc9_14.1 // CHECK:STDOUT: return %.loc9_14.2 @@ -430,7 +430,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %B.loc6_15.2 => constants.%B // CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%B // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.1 -// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.3 +// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasPair(constants.%tuple.2) { @@ -440,13 +440,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.34, constants.%.37) { -// CHECK:STDOUT: %A.loc6_6.2 => constants.%.34 -// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%.34 -// CHECK:STDOUT: %B.loc6_15.2 => constants.%.37 -// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.37 +// CHECK:STDOUT: specific @F(constants.%int_1.2, constants.%int_2.2) { +// CHECK:STDOUT: %A.loc6_6.2 => constants.%int_1.2 +// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%int_1.2 +// CHECK:STDOUT: %B.loc6_15.2 => constants.%int_2.2 +// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%int_2.2 // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.2 -// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.4 +// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -455,8 +455,8 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] @@ -526,19 +526,19 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index f21ffd8435b41..04ecfc8957592 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -66,18 +66,18 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,117 +99,117 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_20.2 (%.3) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_20.2 (%.3) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%ptr.loc6_20.2 (%ptr.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%ptr.loc6_20.2 (%ptr.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_20.1: type = ptr_type %T [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_20.2 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_20.2 (%.3) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%ptr.loc6_20.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_20.2 (%.3)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%ptr.loc6_20.2 (%ptr.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_20.2 (%.3) = name_ref p, %p -// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.4)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_37.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.2 (%ptr.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.1)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %F.specific_fn.loc6_37.1(%p.ref) // CHECK:STDOUT: %.loc6_41.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_41.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_41.1 // CHECK:STDOUT: return %.loc6_41.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.5) -> %return: %C { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.2) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc8_13.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_13.2 +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_13.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.4 +// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc6_6.2) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_20.2 => constants.%.5 +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.7 +// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = const_type %T [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %const.1: type = const_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.6: type = const_type %C [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %const.2: type = const_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %const.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.9: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -231,122 +231,122 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_26.2 (%.4) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_26.2 (%.4) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%ptr.loc6_26.2 (%ptr.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%ptr.loc6_26.2 (%ptr.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_19.1: type = const_type %T [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.1: type = ptr_type %.3 [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_26.2 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_26.2 (%.4) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%ptr.loc6_26.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.6] -// CHECK:STDOUT: %.loc8_16: type = ptr_type %.6 [template = constants.%.7] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const.2] +// CHECK:STDOUT: %ptr: type = ptr_type %const.2 [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.2: type = ptr_type @F.%.loc6_19.2 (%.3) [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: %const.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.2: type = ptr_type @F.%const.loc6_19.2 (%const.1) [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.5)] +// CHECK:STDOUT: %F.specific_fn.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_26.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%ptr.loc6_26.2 (%ptr.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_26.2 (%.4) = name_ref p, %p -// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.5)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_43.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_26.2 (%ptr.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn.1)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %F.specific_fn.loc6_43.1(%p.ref) // CHECK:STDOUT: %.loc6_47.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_47.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_47.1 // CHECK:STDOUT: return %.loc6_47.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.7) -> %return: %C { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.2) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.9] +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] // CHECK:STDOUT: %.loc8_19.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_19.2 +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_19.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: %const.loc6_19.2 => constants.%const.1 +// CHECK:STDOUT: %ptr.loc6_26.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.5 +// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc6_6.2) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: %const.loc6_19.2 => constants.%const.1 +// CHECK:STDOUT: %ptr.loc6_26.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_19.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.7 +// CHECK:STDOUT: %const.loc6_19.2 => constants.%const.2 +// CHECK:STDOUT: %ptr.loc6_26.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.9 +// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nonconst_from_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.5: type = const_type %C [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %const: type = const_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %const [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: = specific_function %F, @F(%.5) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%const) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -368,116 +368,116 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_20.2 (%.3) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_20.2 (%.3) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%ptr.loc6_20.2 (%ptr.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%ptr.loc6_20.2 (%ptr.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_20.1: type = ptr_type %T [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_20.2 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_20.2 (%.3) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%ptr.loc6_20.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.5] -// CHECK:STDOUT: %.loc8_16: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %const.loc8_9: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_22: type = const_type %C [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %const.loc8_22: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %const = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %const = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_20.2 (%.3)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%ptr.loc6_20.2 (%ptr.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_20.2 (%.3) = name_ref p, %p -// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.4)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_37.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.2 (%ptr.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.1)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %F.specific_fn.loc6_37.1(%p.ref) // CHECK:STDOUT: %.loc6_41.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_41.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_41.1 // CHECK:STDOUT: return %.loc6_41.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.6) -> %return: %.5 { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.2) -> %return: %const { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%.5) [template = constants.%.8] -// CHECK:STDOUT: %.loc8_19.2: ref %.5 = splice_block %return {} -// CHECK:STDOUT: %F.call: init %.5 = call %.loc9(%p.ref) to %.loc8_19.2 +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%const) [template = constants.%F.specific_fn.2] +// CHECK:STDOUT: %.loc8_19.2: ref %const = splice_block %return {} +// CHECK:STDOUT: %F.call: init %const = call %F.specific_fn(%p.ref) to %.loc8_19.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.4 +// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc6_6.2) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.5) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%.5 -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%.5 -// CHECK:STDOUT: %.loc6_20.2 => constants.%.6 +// CHECK:STDOUT: specific @F(constants.%const) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%const +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%const +// CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.8 +// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_const_from_nonconst.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = const_type %T [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %const.1: type = const_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] -// CHECK:STDOUT: %.7: type = const_type %C [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] +// CHECK:STDOUT: %const.2: type = const_type %C [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -501,89 +501,89 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_26.2 (%.4) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_26.2 (%.4) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%ptr.loc6_26.2 (%ptr.1) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%ptr.loc6_26.2 (%ptr.1) = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_19.1: type = const_type %T [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.1: type = ptr_type %.3 [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_26.2 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_26.2 (%.4) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%ptr.loc6_26.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.7 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.7 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_16: type = const_type %C [template = constants.%.7] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.7 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.7 = return_slot %return.param +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const.2] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.2: type = ptr_type @F.%.loc6_19.2 (%.3) [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: %const.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.2: type = ptr_type @F.%const.loc6_19.2 (%const.1) [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.5)] +// CHECK:STDOUT: %F.specific_fn.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_26.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%ptr.loc6_26.2 (%ptr.1)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_26.2 (%.4) = name_ref p, %p -// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.5)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_43.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_26.2 (%ptr.1) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %F.specific_fn.loc6_43.1(%p.ref) // CHECK:STDOUT: %.loc6_47.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_47.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_47.1 // CHECK:STDOUT: return %.loc6_47.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.6) -> %return: %.7 { +// CHECK:STDOUT: fn @G(%p.param_patt: %ptr.2) -> %return: %const.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: %const.loc6_19.2 => constants.%const.1 +// CHECK:STDOUT: %ptr.loc6_26.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.5 +// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc6_6.2) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: %const.loc6_19.2 => constants.%const.1 +// CHECK:STDOUT: %ptr.loc6_26.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index 150e75011af6b..a2839c49ff9e8 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -19,49 +19,49 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: --- aggregate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.38: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.39: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.41: = bound_method %.37, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.1: %.39 = struct_value (%.34, %.31, %.43) [template] -// CHECK:STDOUT: %struct.2: %.35 = struct_value (%.31, %.34, %.43) [template] -// CHECK:STDOUT: %.44: type = array_type %.3, %i32 [template] -// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct.1: %struct_type.b.a.c = struct_value (%int_2.2, %int_1.2, %int_3.2) [template] +// CHECK:STDOUT: %struct.2: %struct_type.a.b.c = struct_value (%int_1.2, %int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.1, %i32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.5 = tuple_value (%.47, %.48, %.3, %.49) [template] -// CHECK:STDOUT: %.51: = bound_method %.46, %Convert.14 [template] -// CHECK:STDOUT: %.52: = specific_function %.51, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.53: %i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.44 = tuple_value (%.53) [template] -// CHECK:STDOUT: %.54: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct.3: %.54 = struct_value (%.37, %.3) [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.5 = tuple_value (%int_5, %int_7, %int_1.1, %int_9) [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct.3: %struct_type.a.b = struct_value (%int_3.1, %int_1.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,10 +82,10 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: .struct_access = %struct_access // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%.loc11_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%.loc11_23) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%int_32.loc11_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] // CHECK:STDOUT: %.loc11_26.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_18, %int.make_type_signed.loc11_23) // CHECK:STDOUT: %.loc11_26.2: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i32] // CHECK:STDOUT: %.loc11_26.3: type = converted %int.make_type_signed.loc11_18, %.loc11_26.2 [template = constants.%i32] @@ -94,178 +94,178 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc11_26.6: type = converted %.loc11_26.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.2 = var tuple_copy // CHECK:STDOUT: %tuple_copy: ref %tuple.type.2 = bind_name tuple_copy, %tuple_copy.var -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_32: init type = call constants.%Int(%.loc13_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.2: type = value_of_initializer %int.make_type_signed.loc13_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.3: type = converted %int.make_type_signed.loc13_32, %.loc13_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_41.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_41: init type = call constants.%Int(%.loc13_41.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_41.2: type = value_of_initializer %int.make_type_signed.loc13_41 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_41.3: type = converted %int.make_type_signed.loc13_41, %.loc13_41.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_44: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%.35] -// CHECK:STDOUT: %struct_copy.var: ref %.35 = var struct_copy -// CHECK:STDOUT: %struct_copy: ref %.35 = bind_name struct_copy, %struct_copy.var -// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed.loc15, %.loc15_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, %i32 [template = constants.%.44] -// CHECK:STDOUT: %tuple_index.var: ref %.44 = var tuple_index -// CHECK:STDOUT: %tuple_index: ref %.44 = bind_name tuple_index, %tuple_index.var -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_26: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_21.3: type = converted %int.make_type_signed.loc17, %.loc17_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, %i32 [template = constants.%.44] -// CHECK:STDOUT: %struct_access.var: ref %.44 = var struct_access -// CHECK:STDOUT: %struct_access: ref %.44 = bind_name struct_access, %struct_access.var +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_32: init type = call constants.%Int(%int_32.loc13_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_signed.loc13_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_signed.loc13_32, %.loc13_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_41: init type = call constants.%Int(%int_32.loc13_41) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_41.1: type = value_of_initializer %int.make_type_signed.loc13_41 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_41.2: type = converted %int.make_type_signed.loc13_41, %.loc13_41.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%struct_type.a.b.c] +// CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var struct_copy +// CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed.loc15, %.loc15_19.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc15: type = array_type %int_1.loc15, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %tuple_index.var: ref %array_type = var tuple_index +// CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_21.2: type = converted %int.make_type_signed.loc17, %.loc17_21.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc17: type = array_type %int_1.loc17, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %struct_access.var: ref %array_type = var struct_access +// CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_31: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_34: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_35.1: %tuple.type.3 = tuple_literal (%.loc11_31, %.loc11_34) -// CHECK:STDOUT: %.loc11_41: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_41: init type = call constants.%Int(%.loc11_41) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_46: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_46: init type = call constants.%Int(%.loc11_46) [template = constants.%i32] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_35.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11) +// CHECK:STDOUT: %int_32.loc11_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_41: init type = call constants.%Int(%int_32.loc11_41) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_46: init type = call constants.%Int(%int_32.loc11_46) [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_41, %int.make_type_signed.loc11_46) // CHECK:STDOUT: %.loc11_49.2: type = value_of_initializer %int.make_type_signed.loc11_41 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.3: type = converted %int.make_type_signed.loc11_41, %.loc11_49.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.4: type = value_of_initializer %int.make_type_signed.loc11_46 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.5: type = converted %int.make_type_signed.loc11_46, %.loc11_49.4 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.6: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_35.3: = bound_method %.loc11_31, %.loc11_35.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_35.4: = specific_function %.loc11_35.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %.loc11_35.4(%.loc11_31) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_35.5: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_35.6: %i32 = converted %.loc11_31, %.loc11_35.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_35.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_35.8: = bound_method %.loc11_34, %.loc11_35.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_35.9: = specific_function %.loc11_35.8, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %.loc11_35.9(%.loc11_34) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_35.10: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_35.11: %i32 = converted %.loc11_34, %.loc11_35.10 [template = constants.%.34] -// CHECK:STDOUT: %tuple.loc11: %tuple.type.2 = tuple_value (%.loc11_35.6, %.loc11_35.11) [template = constants.%tuple.1] +// CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_35.1: = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_35.1: = specific_function %Convert.bound.loc11_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %Convert.specific_fn.loc11_35.1(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_35.2: = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_35.2: = specific_function %Convert.bound.loc11_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %Convert.specific_fn.loc11_35.2(%int_2.loc11) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_35.4: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_35.5: %i32 = converted %int_2.loc11, %.loc11_35.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.loc11: %tuple.type.2 = tuple_value (%.loc11_35.3, %.loc11_35.5) [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_37.1: %tuple.type.2 = converted %.loc11_35.1, %tuple.loc11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_37.2: %i32 = tuple_access %.loc11_37.1, element0 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_37.3: ref %i32 = tuple_access file.%tuple_copy.var, element0 -// CHECK:STDOUT: %.loc11_37.4: init %i32 = initialize_from %.loc11_37.2 to %.loc11_37.3 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_37.5: %i32 = tuple_access %.loc11_37.1, element1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_37.6: ref %i32 = tuple_access file.%tuple_copy.var, element1 -// CHECK:STDOUT: %.loc11_37.7: init %i32 = initialize_from %.loc11_37.5 to %.loc11_37.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_37.8: init %tuple.type.2 = tuple_init (%.loc11_37.4, %.loc11_37.7) to file.%tuple_copy.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_50: init %tuple.type.2 = converted %.loc11_37.1, %.loc11_37.8 [template = constants.%tuple.1] +// CHECK:STDOUT: %tuple.elem0.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element0 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0 +// CHECK:STDOUT: %.loc11_37.2: init %i32 = initialize_from %tuple.elem0.loc11_37.1 to %tuple.elem0.loc11_37.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem1.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element1 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element1 +// CHECK:STDOUT: %.loc11_37.3: init %i32 = initialize_from %tuple.elem1.loc11_37.1 to %tuple.elem1.loc11_37.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_37.4: init %tuple.type.2 = tuple_init (%.loc11_37.2, %.loc11_37.3) to file.%tuple_copy.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_50: init %tuple.type.2 = converted %.loc11_37.1, %.loc11_37.4 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%tuple_copy.var, %.loc11_50 -// CHECK:STDOUT: %.loc13_54: Core.IntLiteral = int_value 3 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_62: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_70: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_71.1: %.38 = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) -// CHECK:STDOUT: %.loc13_81.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_81: init type = call constants.%Int(%.loc13_81.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_81.2: type = value_of_initializer %int.make_type_signed.loc13_81 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_81.3: type = converted %int.make_type_signed.loc13_81, %.loc13_81.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_90.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_90: init type = call constants.%Int(%.loc13_90.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_90.2: type = value_of_initializer %int.make_type_signed.loc13_90 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_90.3: type = converted %int.make_type_signed.loc13_90, %.loc13_90.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_99.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_99: init type = call constants.%Int(%.loc13_99.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_99.2: type = value_of_initializer %int.make_type_signed.loc13_99 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_99.3: type = converted %int.make_type_signed.loc13_99, %.loc13_99.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_102: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%.39] -// CHECK:STDOUT: %.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.3: = bound_method %.loc13_62, %.loc13_71.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_71.4: = specific_function %.loc13_71.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %.loc13_71.4(%.loc13_62) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_71.5: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_71.6: %i32 = converted %.loc13_62, %.loc13_71.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_71.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.8: = bound_method %.loc13_70, %.loc13_71.7 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_71.9: = specific_function %.loc13_71.8, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %.loc13_71.9(%.loc13_70) [template = constants.%.31] -// CHECK:STDOUT: %.loc13_71.10: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_71.11: %i32 = converted %.loc13_70, %.loc13_71.10 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_71.12: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.13: = bound_method %.loc13_54, %.loc13_71.12 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_71.14: = specific_function %.loc13_71.13, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %.loc13_71.14(%.loc13_54) [template = constants.%.43] -// CHECK:STDOUT: %.loc13_71.15: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_71.16: %i32 = converted %.loc13_54, %.loc13_71.15 [template = constants.%.43] -// CHECK:STDOUT: %struct.loc13: %.39 = struct_value (%.loc13_71.6, %.loc13_71.11, %.loc13_71.16) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.1: %.39 = converted %.loc13_71.1, %struct.loc13 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [template = constants.%.31] +// CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc13_71.1: %struct_type.c.b.a = struct_literal (%int_3.loc13, %int_2.loc13, %int_1.loc13) +// CHECK:STDOUT: %int_32.loc13_81: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_81: init type = call constants.%Int(%int_32.loc13_81) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_81.1: type = value_of_initializer %int.make_type_signed.loc13_81 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_81.2: type = converted %int.make_type_signed.loc13_81, %.loc13_81.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_90: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_90: init type = call constants.%Int(%int_32.loc13_90) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_90.1: type = value_of_initializer %int.make_type_signed.loc13_90 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_90.2: type = converted %int.make_type_signed.loc13_90, %.loc13_90.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_99: init type = call constants.%Int(%int_32.loc13_99) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_99.1: type = value_of_initializer %int.make_type_signed.loc13_99 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_99.2: type = converted %int.make_type_signed.loc13_99, %.loc13_99.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%struct_type.b.a.c] +// CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_71.1: = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_71.1: = specific_function %Convert.bound.loc13_71.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %Convert.specific_fn.loc13_71.1(%int_2.loc13) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_71.2: = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_71.2: = specific_function %Convert.bound.loc13_71.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %Convert.specific_fn.loc13_71.2(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_71.3: = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_71.3: = specific_function %Convert.bound.loc13_71.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %Convert.specific_fn.loc13_71.3(%int_3.loc13) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_71.6: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_71.7: %i32 = converted %int_3.loc13, %.loc13_71.6 [template = constants.%int_3.2] +// CHECK:STDOUT: %struct.loc13: %struct_type.b.a.c = struct_value (%.loc13_71.3, %.loc13_71.5, %.loc13_71.7) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.1: %struct_type.b.a.c = converted %.loc13_71.1, %struct.loc13 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 -// CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 -// CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [template = constants.%int_3.2] // 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.%.43] -// CHECK:STDOUT: %.loc13_73.11: init %.35 = 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 %.35 = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_73.10: init %i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_73.11: init %struct_type.a.b.c = 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 %struct_type.a.b.c = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_103 -// CHECK:STDOUT: %.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%.46] -// CHECK:STDOUT: %.loc15_32.1: %tuple.type.4 = tuple_literal (%.loc15_30) -// CHECK:STDOUT: %.loc15_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_44: Core.IntLiteral = int_value 5 [template = constants.%.47] -// CHECK:STDOUT: %.loc15_47: Core.IntLiteral = int_value 7 [template = constants.%.48] -// CHECK:STDOUT: %.loc15_50: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_53: Core.IntLiteral = int_value 9 [template = constants.%.49] -// CHECK:STDOUT: %.loc15_54.1: %tuple.type.5 = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) -// CHECK:STDOUT: %.loc15_56: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %tuple.loc15: %tuple.type.5 = tuple_value (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) [template = constants.%tuple.2] +// CHECK:STDOUT: %int_0.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc15_32.1: %tuple.type.4 = tuple_literal (%int_0.loc15_30) +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9] +// CHECK:STDOUT: %.loc15_54.1: %tuple.type.5 = tuple_literal (%int_5, %int_7, %int_1.loc15, %int_9) +// CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %tuple.loc15: %tuple.type.5 = tuple_value (%int_5, %int_7, %int_1.loc15, %int_9) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc15_54.2: %tuple.type.5 = converted %.loc15_54.1, %tuple.loc15 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc15_55: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_38.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_38.3: type = converted %int.make_type_signed.loc15, %.loc15_38.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_57: type = array_type %.loc15_55, %i32 [template = constants.%.44] -// CHECK:STDOUT: %.loc15_32.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_32.3: = bound_method %.loc15_30, %.loc15_32.2 [template = constants.%.51] -// CHECK:STDOUT: %.loc15_32.4: = specific_function %.loc15_32.3, @Convert.2(constants.%.1) [template = constants.%.52] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.4(%.loc15_30) [template = constants.%.53] -// CHECK:STDOUT: %.loc15_32.5: init %i32 = converted %.loc15_30, %int.convert_checked.loc15 [template = constants.%.53] -// CHECK:STDOUT: %.loc15_5: ref %.44 = splice_block file.%tuple_index.var {} -// CHECK:STDOUT: %.loc15_32.6: Core.IntLiteral = int_value 0 [template = constants.%.46] -// CHECK:STDOUT: %.loc15_32.7: ref %i32 = array_index %.loc15_5, %.loc15_32.6 -// CHECK:STDOUT: %.loc15_32.8: init %i32 = initialize_from %.loc15_32.5 to %.loc15_32.7 [template = constants.%.53] -// CHECK:STDOUT: %.loc15_32.9: init %.44 = array_init (%.loc15_32.8) to %.loc15_5 [template = constants.%array] -// CHECK:STDOUT: %.loc15_34: init %.44 = converted %.loc15_32.1, %.loc15_32.9 [template = constants.%array] +// CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc15_38.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_38.2: type = converted %int.make_type_signed.loc15, %.loc15_38.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_0.loc15_30, %impl.elem0.loc15 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_0.loc15_30) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_32.2: init %i32 = converted %int_0.loc15_30, %int.convert_checked.loc15 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_5: ref %array_type = splice_block file.%tuple_index.var {} +// CHECK:STDOUT: %int_0.loc15_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc15_32.3: ref %i32 = array_index %.loc15_5, %int_0.loc15_32 +// CHECK:STDOUT: %.loc15_32.4: init %i32 = initialize_from %.loc15_32.2 to %.loc15_32.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_32.5: init %array_type = array_init (%.loc15_32.4) to %.loc15_5 [template = constants.%array] +// CHECK:STDOUT: %.loc15_34: init %array_type = converted %.loc15_32.1, %.loc15_32.5 [template = constants.%array] // CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_34 -// CHECK:STDOUT: %.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%.46] -// CHECK:STDOUT: %.loc17_34.1: %tuple.type.4 = tuple_literal (%.loc17_32) -// CHECK:STDOUT: %.loc17_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_51: Core.IntLiteral = int_value 3 [template = constants.%.37] -// CHECK:STDOUT: %.loc17_59: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_60.1: %.54 = struct_literal (%.loc17_51, %.loc17_59) -// CHECK:STDOUT: %struct.loc17: %.54 = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_60.2: %.54 = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_40.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_40.3: type = converted %int.make_type_signed.loc17, %.loc17_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_63: type = array_type %.loc17_61, %i32 [template = constants.%.44] -// CHECK:STDOUT: %.loc17_34.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_34.3: = bound_method %.loc17_32, %.loc17_34.2 [template = constants.%.51] -// CHECK:STDOUT: %.loc17_34.4: = specific_function %.loc17_34.3, @Convert.2(constants.%.1) [template = constants.%.52] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_34.4(%.loc17_32) [template = constants.%.53] -// CHECK:STDOUT: %.loc17_34.5: init %i32 = converted %.loc17_32, %int.convert_checked.loc17 [template = constants.%.53] -// CHECK:STDOUT: %.loc17_5: ref %.44 = splice_block file.%struct_access.var {} -// CHECK:STDOUT: %.loc17_34.6: Core.IntLiteral = int_value 0 [template = constants.%.46] -// CHECK:STDOUT: %.loc17_34.7: ref %i32 = array_index %.loc17_5, %.loc17_34.6 -// CHECK:STDOUT: %.loc17_34.8: init %i32 = initialize_from %.loc17_34.5 to %.loc17_34.7 [template = constants.%.53] -// CHECK:STDOUT: %.loc17_34.9: init %.44 = array_init (%.loc17_34.8) to %.loc17_5 [template = constants.%array] -// CHECK:STDOUT: %.loc17_36: init %.44 = converted %.loc17_34.1, %.loc17_34.9 [template = constants.%array] +// CHECK:STDOUT: %int_0.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc17_34.1: %tuple.type.4 = tuple_literal (%int_0.loc17_32) +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc17: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc17_60.1: %struct_type.a.b = struct_literal (%int_3.loc17, %int_1.loc17) +// CHECK:STDOUT: %struct.loc17: %struct_type.a.b = struct_value (%int_3.loc17, %int_1.loc17) [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_60.2: %struct_type.a.b = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc17_40.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_40.2: type = converted %int.make_type_signed.loc17, %.loc17_40.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_61, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17_32, %impl.elem0.loc17 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17_32) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_34.2: init %i32 = converted %int_0.loc17_32, %int.convert_checked.loc17 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_5: ref %array_type = splice_block file.%struct_access.var {} +// CHECK:STDOUT: %int_0.loc17_34: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc17_34.3: ref %i32 = array_index %.loc17_5, %int_0.loc17_34 +// CHECK:STDOUT: %.loc17_34.4: init %i32 = initialize_from %.loc17_34.2 to %.loc17_34.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_34.5: init %array_type = array_init (%.loc17_34.4) to %.loc17_5 [template = constants.%array] +// CHECK:STDOUT: %.loc17_36: init %array_type = 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 32e307aef643b..572220207c2bc 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -18,42 +18,42 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: --- fail_aggregate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, %i32 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_4, %i32 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.39: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 7 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.43: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.47: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.49: %i32 = int_value 9 [template] -// CHECK:STDOUT: %array: %.10 = tuple_value (%.38, %.41, %.45, %.49) [template] -// CHECK:STDOUT: %.50: = bound_method %.42, %Convert.14 [template] -// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.52: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] +// CHECK:STDOUT: %array: %array_type.2 = tuple_value (%int_5.2, %int_7.2, %int_1.2, %int_9.2) [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,84 +71,84 @@ 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.import = import Core -// CHECK:STDOUT: %.loc16_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.3: type = converted %int.make_type_signed, %.loc16_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_25: type = array_type %.loc16_24, %i32 [template = constants.%.3] -// CHECK:STDOUT: %array_index.var: ref %.3 = var array_index -// CHECK:STDOUT: %array_index: ref %.3 = bind_name array_index, %array_index.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type.1] +// CHECK:STDOUT: %array_index.var: ref %array_type.1 = var array_index +// CHECK:STDOUT: %array_index: ref %array_type.1 = bind_name array_index, %array_index.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_30: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_32: %tuple.type.1 = tuple_literal (%.loc16_30) -// CHECK:STDOUT: %.loc16_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_38: init type = call constants.%Int(%.loc16_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_45: Core.IntLiteral = int_value 5 [template = constants.%.6] -// CHECK:STDOUT: %.loc16_48: Core.IntLiteral = int_value 7 [template = constants.%.7] -// CHECK:STDOUT: %.loc16_51: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_54: Core.IntLiteral = int_value 9 [template = constants.%.8] -// CHECK:STDOUT: %.loc16_55.1: %tuple.type.2 = tuple_literal (%.loc16_45, %.loc16_48, %.loc16_51, %.loc16_54) -// CHECK:STDOUT: %.loc16_61.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_61: init type = call constants.%Int(%.loc16_61.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_66: Core.IntLiteral = int_value 4 [template = constants.%.9] -// CHECK:STDOUT: %.loc16_61.2: type = value_of_initializer %int.make_type_signed.loc16_61 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_61.3: type = converted %int.make_type_signed.loc16_61, %.loc16_61.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_67: type = array_type %.loc16_66, %i32 [template = constants.%.10] -// CHECK:STDOUT: %.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.3: = bound_method %.loc16_45, %.loc16_55.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc16_55.4: = specific_function %.loc16_55.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %.loc16_55.4(%.loc16_45) [template = constants.%.38] -// CHECK:STDOUT: %.loc16_55.5: init %i32 = converted %.loc16_45, %int.convert_checked.loc16_55.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_55.6: ref %.10 = temporary_storage -// CHECK:STDOUT: %.loc16_55.7: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_55.8: ref %i32 = array_index %.loc16_55.6, %.loc16_55.7 -// CHECK:STDOUT: %.loc16_55.9: init %i32 = initialize_from %.loc16_55.5 to %.loc16_55.8 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_55.10: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.11: = bound_method %.loc16_48, %.loc16_55.10 [template = constants.%.39] -// CHECK:STDOUT: %.loc16_55.12: = specific_function %.loc16_55.11, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %.loc16_55.12(%.loc16_48) [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.13: init %i32 = converted %.loc16_48, %int.convert_checked.loc16_55.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_55.15: ref %i32 = array_index %.loc16_55.6, %.loc16_55.14 -// CHECK:STDOUT: %.loc16_55.16: init %i32 = initialize_from %.loc16_55.13 to %.loc16_55.15 [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.17: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.18: = bound_method %.loc16_51, %.loc16_55.17 [template = constants.%.43] -// CHECK:STDOUT: %.loc16_55.19: = specific_function %.loc16_55.18, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %.loc16_55.19(%.loc16_51) [template = constants.%.45] -// CHECK:STDOUT: %.loc16_55.20: init %i32 = converted %.loc16_51, %int.convert_checked.loc16_55.3 [template = constants.%.45] -// CHECK:STDOUT: %.loc16_55.21: Core.IntLiteral = int_value 2 [template = constants.%.42] -// CHECK:STDOUT: %.loc16_55.22: ref %i32 = array_index %.loc16_55.6, %.loc16_55.21 -// CHECK:STDOUT: %.loc16_55.23: init %i32 = initialize_from %.loc16_55.20 to %.loc16_55.22 [template = constants.%.45] -// CHECK:STDOUT: %.loc16_55.24: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.25: = bound_method %.loc16_54, %.loc16_55.24 [template = constants.%.47] -// CHECK:STDOUT: %.loc16_55.26: = specific_function %.loc16_55.25, @Convert.2(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %.loc16_55.26(%.loc16_54) [template = constants.%.49] -// CHECK:STDOUT: %.loc16_55.27: init %i32 = converted %.loc16_54, %int.convert_checked.loc16_55.4 [template = constants.%.49] -// CHECK:STDOUT: %.loc16_55.28: Core.IntLiteral = int_value 3 [template = constants.%.46] -// CHECK:STDOUT: %.loc16_55.29: ref %i32 = array_index %.loc16_55.6, %.loc16_55.28 -// CHECK:STDOUT: %.loc16_55.30: init %i32 = initialize_from %.loc16_55.27 to %.loc16_55.29 [template = constants.%.49] -// CHECK:STDOUT: %.loc16_55.31: init %.10 = array_init (%.loc16_55.9, %.loc16_55.16, %.loc16_55.23, %.loc16_55.30) to %.loc16_55.6 [template = constants.%array] -// CHECK:STDOUT: %.loc16_57.1: init %.10 = converted %.loc16_55.1, %.loc16_55.31 [template = constants.%array] -// CHECK:STDOUT: %.loc16_70.1: Core.IntLiteral = int_value 2 [template = constants.%.42] -// CHECK:STDOUT: %.loc16_57.2: ref %.10 = temporary %.loc16_55.6, %.loc16_57.1 -// CHECK:STDOUT: %.loc16_71.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_71: init type = call constants.%Int(%.loc16_71.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_71.2: type = value_of_initializer %int.make_type_signed.loc16_71 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_71.3: type = converted %int.make_type_signed.loc16_71, %.loc16_71.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_70.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_70.3: = bound_method %.loc16_70.1, %.loc16_70.2 [template = constants.%.50] -// CHECK:STDOUT: %.loc16_70.4: = specific_function %.loc16_70.3, @Convert.2(constants.%.1) [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %.loc16_70.4(%.loc16_70.1) [template = constants.%.52] -// CHECK:STDOUT: %.loc16_70.5: %i32 = value_of_initializer %int.convert_checked.loc16_70 [template = constants.%.52] -// CHECK:STDOUT: %.loc16_70.6: %i32 = converted %.loc16_70.1, %.loc16_70.5 [template = constants.%.52] -// CHECK:STDOUT: %.loc16_71.4: ref %i32 = array_index %.loc16_57.2, %.loc16_70.6 -// CHECK:STDOUT: %.loc16_71.5: %i32 = bind_value %.loc16_71.4 -// CHECK:STDOUT: %.loc16_38.2: type = value_of_initializer %int.make_type_signed.loc16_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_38.3: type = converted %int.make_type_signed.loc16_38, %.loc16_38.2 [template = constants.%i32] +// CHECK:STDOUT: %int_0.loc16_30: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc16_32: %tuple.type.1 = tuple_literal (%int_0.loc16_30) +// CHECK:STDOUT: %int_32.loc16_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_38: init type = call constants.%Int(%int_32.loc16_38) [template = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] +// CHECK:STDOUT: %int_1.loc16_51: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] +// CHECK:STDOUT: %.loc16_55.1: %tuple.type.2 = tuple_literal (%int_5, %int_7, %int_1.loc16_51, %int_9) +// CHECK:STDOUT: %int_32.loc16_61: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_61: init type = call constants.%Int(%int_32.loc16_61) [template = constants.%i32] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc16_61.1: type = value_of_initializer %int.make_type_signed.loc16_61 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_61.2: type = converted %int.make_type_signed.loc16_61, %.loc16_61.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_4, %i32 [template = constants.%array_type.2] +// CHECK:STDOUT: %impl.elem0.loc16_55.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_55.1: = bound_method %int_5, %impl.elem0.loc16_55.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc16_55.1: = specific_function %Convert.bound.loc16_55.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %Convert.specific_fn.loc16_55.1(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc16_55.2: init %i32 = converted %int_5, %int.convert_checked.loc16_55.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc16_55.3: ref %array_type.2 = temporary_storage +// CHECK:STDOUT: %int_0.loc16_55: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc16_55.4: ref %i32 = array_index %.loc16_55.3, %int_0.loc16_55 +// CHECK:STDOUT: %.loc16_55.5: init %i32 = initialize_from %.loc16_55.2 to %.loc16_55.4 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_55.2: = bound_method %int_7, %impl.elem0.loc16_55.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16_55.2: = specific_function %Convert.bound.loc16_55.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %Convert.specific_fn.loc16_55.2(%int_7) [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc16_55.6: init %i32 = converted %int_7, %int.convert_checked.loc16_55.2 [template = constants.%int_7.2] +// CHECK:STDOUT: %int_1.loc16_55: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc16_55.7: ref %i32 = array_index %.loc16_55.3, %int_1.loc16_55 +// CHECK:STDOUT: %.loc16_55.8: init %i32 = initialize_from %.loc16_55.6 to %.loc16_55.7 [template = constants.%int_7.2] +// CHECK:STDOUT: %impl.elem0.loc16_55.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_55.3: = bound_method %int_1.loc16_51, %impl.elem0.loc16_55.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc16_55.3: = specific_function %Convert.bound.loc16_55.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %Convert.specific_fn.loc16_55.3(%int_1.loc16_51) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_55.9: init %i32 = converted %int_1.loc16_51, %int.convert_checked.loc16_55.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_2.loc16_55: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc16_55.10: ref %i32 = array_index %.loc16_55.3, %int_2.loc16_55 +// CHECK:STDOUT: %.loc16_55.11: init %i32 = initialize_from %.loc16_55.9 to %.loc16_55.10 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc16_55.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_55.4: = bound_method %int_9, %impl.elem0.loc16_55.4 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc16_55.4: = specific_function %Convert.bound.loc16_55.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %Convert.specific_fn.loc16_55.4(%int_9) [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc16_55.12: init %i32 = converted %int_9, %int.convert_checked.loc16_55.4 [template = constants.%int_9.2] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc16_55.13: ref %i32 = array_index %.loc16_55.3, %int_3 +// CHECK:STDOUT: %.loc16_55.14: init %i32 = initialize_from %.loc16_55.12 to %.loc16_55.13 [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc16_55.15: init %array_type.2 = array_init (%.loc16_55.5, %.loc16_55.8, %.loc16_55.11, %.loc16_55.14) to %.loc16_55.3 [template = constants.%array] +// CHECK:STDOUT: %.loc16_57.1: init %array_type.2 = converted %.loc16_55.1, %.loc16_55.15 [template = constants.%array] +// CHECK:STDOUT: %int_2.loc16_70: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc16_57.2: ref %array_type.2 = temporary %.loc16_55.3, %.loc16_57.1 +// CHECK:STDOUT: %int_32.loc16_71: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_71: init type = call constants.%Int(%int_32.loc16_71) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_71.1: type = value_of_initializer %int.make_type_signed.loc16_71 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_71.2: type = converted %int.make_type_signed.loc16_71, %.loc16_71.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_70: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16_70: = bound_method %int_2.loc16_70, %impl.elem0.loc16_70 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc16_70: = specific_function %Convert.bound.loc16_70, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %Convert.specific_fn.loc16_70(%int_2.loc16_70) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_70.1: %i32 = value_of_initializer %int.convert_checked.loc16_70 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_70.2: %i32 = converted %int_2.loc16_70, %.loc16_70.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc16_71.3: ref %i32 = array_index %.loc16_57.2, %.loc16_70.2 +// CHECK:STDOUT: %.loc16_71.4: %i32 = bind_value %.loc16_71.3 +// CHECK:STDOUT: %.loc16_38.1: type = value_of_initializer %int.make_type_signed.loc16_38 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_38.2: type = converted %int.make_type_signed.loc16_38, %.loc16_38.1 [template = constants.%i32] // CHECK:STDOUT: assign file.%array_index.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 0f8be69cfe8eb..0a287e61aff75 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -19,21 +19,21 @@ fn G(N:! i32) { // CHECK:STDOUT: --- fail_symbolic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.24: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.4(%.1) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.25(%N.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,10 +55,10 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.patt.loc12_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc12_6.1, runtime_param [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc12_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc12_6.2 (constants.%N.1)] // CHECK:STDOUT: } @@ -69,24 +69,24 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.patt.loc12_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc16_16.6: = bound_method %N.loc12_6.2, constants.%Convert.13 [symbolic = %.loc16_16.6 (constants.%.24)] -// CHECK:STDOUT: %.loc16_16.7: = specific_function %.loc16_16.6, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.25)] -// CHECK:STDOUT: %int.convert_checked.loc16_16.2: init Core.IntLiteral = call %.loc16_16.7(%N.loc12_6.2) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound.loc16_16.2: = bound_method %N.loc12_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc16_16.2: = specific_function %Convert.bound.loc16_16.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc16_16.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.2(%N.loc12_6.2) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc16_11.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.3: type = converted %int.make_type_signed.loc16, %.loc16_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_16.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc16_16.2: = bound_method %N.ref, %.loc16_16.1 [symbolic = %.loc16_16.6 (constants.%.24)] -// CHECK:STDOUT: %.loc16_16.3: = specific_function %.loc16_16.2, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.25)] -// CHECK:STDOUT: %int.convert_checked.loc16_16.1: init Core.IntLiteral = call %.loc16_16.3(%N.ref) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc16_16.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc16_16.5: Core.IntLiteral = converted %N.ref, %.loc16_16.4 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc16_17: type = array_type %.loc16_16.5, %i32 [template = ] +// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed.loc16, %.loc16_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %Convert.bound.loc16_16.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc16_16.1: = specific_function %Convert.bound.loc16_16.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc16_16.1: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.1(%N.ref) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc16_16.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc16_16.2: Core.IntLiteral = converted %N.ref, %.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc16_16.2, %i32 [template = ] // CHECK:STDOUT: %k.var: ref = var k // CHECK:STDOUT: %k: ref = bind_name k, %k.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index eb050302ac1f4..516d5b6f0bc6d 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -22,13 +22,13 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.2: type = const_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %const: type = const_type %T [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.1, %.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, %T [symbolic] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%ptr.1, %const) [symbolic] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_5, %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,31 +58,31 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt.loc12_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_12.2: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_12.2 (constants.%.1)] -// CHECK:STDOUT: %.loc13_15.2: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_15.2 (constants.%.2)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%.loc13_12.2 (%.1), @F.%.loc13_15.2 (%.2)) [symbolic = %tuple.type (constants.%tuple.type.2)] -// CHECK:STDOUT: %.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %.loc14_16.2 (constants.%.4)] -// CHECK:STDOUT: %.loc15_15.2: type = array_type constants.%.5, @F.%T.loc12_6.2 (%T) [symbolic = %.loc15_15.2 (constants.%.6)] +// CHECK:STDOUT: %ptr.loc13_12.2: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %ptr.loc13_12.2 (constants.%ptr.1)] +// CHECK:STDOUT: %const.loc13_15.2: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %const.loc13_15.2 (constants.%const)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%ptr.loc13_12.2 (%ptr.1), @F.%const.loc13_15.2 (%const)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %struct_type.a.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %array_type.loc15_15.2: type = array_type constants.%int_5, @F.%T.loc12_6.2 (%T) [symbolic = %array_type.loc15_15.2 (constants.%array_type)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc13_11: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_12.1: type = ptr_type %T [symbolic = %.loc13_12.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc13_12.1: type = ptr_type %T [symbolic = %ptr.loc13_12.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc13_21: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_15.1: type = const_type %T [symbolic = %.loc13_15.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_22.1: %tuple.type.1 = tuple_literal (%.loc13_12.1, %.loc13_15.1) +// CHECK:STDOUT: %const.loc13_15.1: type = const_type %T [symbolic = %const.loc13_15.2 (constants.%const)] +// CHECK:STDOUT: %.loc13_22.1: %tuple.type.1 = tuple_literal (%ptr.loc13_12.1, %const.loc13_15.1) // CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_22.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.2) = var u // CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.2) = bind_name u, %u.var // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc14_16.1: type = struct_type {.a: %T} [symbolic = %.loc14_16.2 (constants.%.4)] -// CHECK:STDOUT: %v.var: ref @F.%.loc14_16.2 (%.4) = var v -// CHECK:STDOUT: %v: ref @F.%.loc14_16.2 (%.4) = bind_name v, %v.var +// CHECK:STDOUT: %struct_type.a.loc14_16.1: type = struct_type {.a: %T} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = var v +// CHECK:STDOUT: %v: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = bind_name v, %v.var // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 5 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_15.1: type = array_type %.loc15_14, %T [symbolic = %.loc15_15.2 (constants.%.6)] -// CHECK:STDOUT: %w.var: ref @F.%.loc15_15.2 (%.6) = var w -// CHECK:STDOUT: %w: ref @F.%.loc15_15.2 (%.6) = bind_name w, %w.var +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %array_type.loc15_15.1: type = array_type %int_5, %T [symbolic = %array_type.loc15_15.2 (constants.%array_type)] +// CHECK:STDOUT: %w.var: ref @F.%array_type.loc15_15.2 (%array_type) = var w +// CHECK:STDOUT: %w: ref @F.%array_type.loc15_15.2 (%array_type) = 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 2a60c442dd636..ef32179a26540 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -23,10 +23,10 @@ fn H() -> i32 { // CHECK:STDOUT: --- in_place_tuple_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -35,7 +35,7 @@ fn H() -> i32 { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,10 +58,10 @@ fn H() -> i32 { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] // CHECK:STDOUT: %.loc11_20.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17) // CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] // CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_signed.loc11_12, %.loc11_20.2 [template = constants.%i32] @@ -75,10 +75,10 @@ fn H() -> i32 { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%.loc13_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_17: init type = call constants.%Int(%.loc13_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%int_32.loc13_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_17: init type = call constants.%Int(%int_32.loc13_17) [template = constants.%i32] // CHECK:STDOUT: %.loc13_20.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc13_12, %int.make_type_signed.loc13_17) // CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_signed.loc13_12 [template = constants.%i32] // CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_signed.loc13_12, %.loc13_20.2 [template = constants.%i32] @@ -92,10 +92,10 @@ fn H() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed, %.loc19_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed, %.loc19_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -105,10 +105,10 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%.loc14_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] // CHECK:STDOUT: %.loc14_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16) // CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] // CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_signed.loc14_11, %.loc14_19.2 [template = constants.%i32] @@ -137,10 +137,10 @@ fn H() -> i32 { // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc20_12.1: ref %tuple.type.2 = temporary_storage // CHECK:STDOUT: %G.call: init %tuple.type.2 = call %G.ref() to %.loc20_12.1 -// CHECK:STDOUT: %.loc20_14: Core.IntLiteral = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc20_12.2: ref %tuple.type.2 = temporary %.loc20_12.1, %G.call -// CHECK:STDOUT: %.loc20_13.1: ref %i32 = tuple_access %.loc20_12.2, element0 -// CHECK:STDOUT: %.loc20_13.2: %i32 = bind_value %.loc20_13.1 -// CHECK:STDOUT: return %.loc20_13.2 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc20_12.2, element0 +// CHECK:STDOUT: %.loc20_13: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: return %.loc20_13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index a18d7d69fdf8b..e84eddbb68eac 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -15,33 +15,33 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: --- call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,18 +68,18 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%.loc11_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_signed.loc11_27, %.loc11_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -87,37 +87,37 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc13_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_20.3: = bound_method %.loc13_20.1, %.loc13_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_20.4: = specific_function %.loc13_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %.loc13_20.4(%.loc13_20.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_20.5: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_20.6: %i32 = converted %.loc13_20.1, %.loc13_20.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_23.3: = bound_method %.loc13_23.1, %.loc13_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_23.4: = specific_function %.loc13_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %.loc13_23.4(%.loc13_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_23.5: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_23.6: %i32 = converted %.loc13_23.1, %.loc13_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.6, %.loc13_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc13_24.2: = bound_method %int.sadd, %.loc13_24.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_24.3: = specific_function %.loc13_24.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_24.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc13_24.5: %i32 = converted %int.sadd, %.loc13_24.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %.loc13_24.3(%.loc13_24.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_24.7: Core.IntLiteral = converted %int.sadd, %.loc13_24.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_25: type = array_type %.loc13_24.7, %i32 [template = constants.%.39] -// CHECK:STDOUT: %arr.var: ref %.39 = var arr -// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc13_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_20: = bound_method %int_1, %impl.elem0.loc13_20 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_20: = specific_function %Convert.bound.loc13_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %Convert.specific_fn.loc13_20(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_1, %.loc13_20.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc13_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_23: = bound_method %int_2, %impl.elem0.loc13_23 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_23: = specific_function %Convert.bound.loc13_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %Convert.specific_fn.loc13_23(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_23.1: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_23.2: %i32 = converted %int_2, %.loc13_23.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.2, %.loc13_23.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int.sadd, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int.sadd, %.loc13_24.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %Convert.specific_fn.loc13_24(%.loc13_24.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_24.4: Core.IntLiteral = converted %int.sadd, %.loc13_24.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type: type = array_type %.loc13_24.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 00b4aa78bc102..d37f0479c322a 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -13,10 +13,10 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: --- definition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: } @@ -43,18 +43,18 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%.loc11_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_signed.loc11_27, %.loc11_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 7ed34f24f2b72..dae3cbba2873d 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -40,10 +40,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: --- fail_redefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -76,18 +76,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11_9, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_17, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%.loc11_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_25, %.loc11_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%int_32.loc11_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_25, %.loc11_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc11: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc11: %i32 = bind_name n, %n.param.loc11 // CHECK:STDOUT: %m.param.loc11: %i32 = value_param runtime_param1 @@ -103,18 +103,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_9: init type = call constants.%Int(%.loc19_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.2: type = value_of_initializer %int.make_type_signed.loc19_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.3: type = converted %int.make_type_signed.loc19_9, %.loc19_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%.loc19_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.3: type = converted %int.make_type_signed.loc19_17, %.loc19_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%.loc19_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.3: type = converted %int.make_type_signed.loc19_25, %.loc19_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_9: init type = call constants.%Int(%int_32.loc19_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_signed.loc19_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_signed.loc19_9, %.loc19_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc19: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc19: %i32 = bind_name n, %n.param.loc19 // CHECK:STDOUT: %m.param.loc19: %i32 = value_param runtime_param1 @@ -130,18 +130,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_9: init type = call constants.%Int(%.loc21_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_9.2: type = value_of_initializer %int.make_type_signed.loc21_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_9.3: type = converted %int.make_type_signed.loc21_9, %.loc21_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_17: init type = call constants.%Int(%.loc21_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.2: type = value_of_initializer %int.make_type_signed.loc21_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.3: type = converted %int.make_type_signed.loc21_17, %.loc21_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21_25: init type = call constants.%Int(%.loc21_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_25.2: type = value_of_initializer %int.make_type_signed.loc21_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_25.3: type = converted %int.make_type_signed.loc21_25, %.loc21_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_9: init type = call constants.%Int(%int_32.loc21_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_signed.loc21_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_signed.loc21_9, %.loc21_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_17: init type = call constants.%Int(%int_32.loc21_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_signed.loc21_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_signed.loc21_17, %.loc21_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_25: init type = call constants.%Int(%int_32.loc21_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %int.make_type_signed.loc21_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_25.2: type = converted %int.make_type_signed.loc21_25, %.loc21_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %m.param.loc21: %i32 = value_param runtime_param1 @@ -157,18 +157,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29_9: init type = call constants.%Int(%.loc29_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_9.2: type = value_of_initializer %int.make_type_signed.loc29_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_9.3: type = converted %int.make_type_signed.loc29_9, %.loc29_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29_17: init type = call constants.%Int(%.loc29_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_17.2: type = value_of_initializer %int.make_type_signed.loc29_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_17.3: type = converted %int.make_type_signed.loc29_17, %.loc29_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29_25: init type = call constants.%Int(%.loc29_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_25.2: type = value_of_initializer %int.make_type_signed.loc29_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_25.3: type = converted %int.make_type_signed.loc29_25, %.loc29_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29_9: init type = call constants.%Int(%int_32.loc29_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_signed.loc29_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_signed.loc29_9, %.loc29_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29_17: init type = call constants.%Int(%int_32.loc29_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_17.1: type = value_of_initializer %int.make_type_signed.loc29_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_17.2: type = converted %int.make_type_signed.loc29_17, %.loc29_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29_25: init type = call constants.%Int(%int_32.loc29_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_25.1: type = value_of_initializer %int.make_type_signed.loc29_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_25.2: type = converted %int.make_type_signed.loc29_25, %.loc29_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc29: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc29: %i32 = bind_name n, %n.param.loc29 // CHECK:STDOUT: %m.param.loc29: %i32 = value_param runtime_param1 @@ -184,18 +184,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc31_9: init type = call constants.%Int(%.loc31_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_9.2: type = value_of_initializer %int.make_type_signed.loc31_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_9.3: type = converted %int.make_type_signed.loc31_9, %.loc31_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc31_17: init type = call constants.%Int(%.loc31_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_17.2: type = value_of_initializer %int.make_type_signed.loc31_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_17.3: type = converted %int.make_type_signed.loc31_17, %.loc31_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc31_25: init type = call constants.%Int(%.loc31_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_25.2: type = value_of_initializer %int.make_type_signed.loc31_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_25.3: type = converted %int.make_type_signed.loc31_25, %.loc31_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_9: init type = call constants.%Int(%int_32.loc31_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_signed.loc31_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_signed.loc31_9, %.loc31_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_17: init type = call constants.%Int(%int_32.loc31_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_17.1: type = value_of_initializer %int.make_type_signed.loc31_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_17.2: type = converted %int.make_type_signed.loc31_17, %.loc31_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_25: init type = call constants.%Int(%int_32.loc31_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_25.1: type = value_of_initializer %int.make_type_signed.loc31_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_25.2: type = converted %int.make_type_signed.loc31_25, %.loc31_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc31: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc31: %i32 = bind_name n, %n.param.loc31 // CHECK:STDOUT: %m.param.loc31: %i32 = value_param runtime_param1 @@ -211,18 +211,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc38_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc38_9: init type = call constants.%Int(%.loc38_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_9.2: type = value_of_initializer %int.make_type_signed.loc38_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_9.3: type = converted %int.make_type_signed.loc38_9, %.loc38_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc38_17: init type = call constants.%Int(%.loc38_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_17.2: type = value_of_initializer %int.make_type_signed.loc38_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_17.3: type = converted %int.make_type_signed.loc38_17, %.loc38_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc38_25: init type = call constants.%Int(%.loc38_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_25.2: type = value_of_initializer %int.make_type_signed.loc38_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_25.3: type = converted %int.make_type_signed.loc38_25, %.loc38_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc38_9: init type = call constants.%Int(%int_32.loc38_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_signed.loc38_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_signed.loc38_9, %.loc38_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc38_17: init type = call constants.%Int(%int_32.loc38_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc38_17.1: type = value_of_initializer %int.make_type_signed.loc38_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc38_17.2: type = converted %int.make_type_signed.loc38_17, %.loc38_17.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc38_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc38_25: init type = call constants.%Int(%int_32.loc38_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc38_25.1: type = value_of_initializer %int.make_type_signed.loc38_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc38_25.2: type = converted %int.make_type_signed.loc38_25, %.loc38_25.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc38: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc38: %i32 = bind_name n, %n.param.loc38 // CHECK:STDOUT: %m.param.loc38: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index dec1a833344d5..429893efdee86 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -23,45 +23,45 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %I.type = facet_value %i32, %i32 [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.6(%.4) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.6(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.7(%.4) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %F.2 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %F.bound: = bound_method %int_1.2, %F.2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.3, @impl.2(%.4) [template] +// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.3, @impl.2(%int_32) [template] // CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %.40: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %.41: = bound_method %.36, %Convert.16 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.3(%.4) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.44: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.5, @impl.4(%.4) [template] +// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.16) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.16 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.5, @impl.4(%int_32) [template] // CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %.45: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %.46: = bound_method %.44, %Convert.17 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.5(%.4) [template] -// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.49: type = array_type %.48, %i32 [template] +// CHECK:STDOUT: %interface.12: = interface_witness (%Convert.17) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.17 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.5(%int_32) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,87 +83,87 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%.loc19_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc19_22.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%.loc19_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.2: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.3: type = converted %int.make_type_signed.loc19_22, %.loc19_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.7(constants.%.4) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.34] -// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%int_32.loc19_11) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%int_32.loc19_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed.loc19_22, %.loc19_22.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc19_19: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_19: = bound_method %int_1, %impl.elem0.loc19_19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc19_19: = specific_function %Convert.bound.loc19_19, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %Convert.specific_fn.loc19_19(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int_1, %.loc19_19.1 [template = constants.%int_1.2] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_26.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc19_26.2: = bound_method %.loc19_19.5, %.loc19_26.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_33.1: Core.IntLiteral = int_value 2 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_33.2: %Convert.type.15 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %.loc19_33.3: = bound_method %.loc19_33.1, %.loc19_33.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc19_33.4: = specific_function %.loc19_33.3, @Convert.3(constants.%.4) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %.loc19_33.4(%.loc19_33.1) [template = constants.%.43] -// CHECK:STDOUT: %.loc19_33.5: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%.43] -// CHECK:STDOUT: %.loc19_33.6: %i32 = converted %.loc19_33.1, %.loc19_33.5 [template = constants.%.43] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc19_26.2(%.loc19_19.5, %.loc19_33.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed.loc19_11, %.loc19_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_34.1: %Convert.type.7 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.17] -// CHECK:STDOUT: %.loc19_34.2: = bound_method %int.sadd, %.loc19_34.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc19_34.3: = specific_function %.loc19_34.2, @Convert.5(constants.%.4) [template = constants.%.47] -// CHECK:STDOUT: %.loc19_34.4: %i32 = value_of_initializer %int.sadd [template = constants.%.44] -// CHECK:STDOUT: %.loc19_34.5: %i32 = converted %int.sadd, %.loc19_34.4 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %.loc19_34.3(%.loc19_34.5) [template = constants.%.48] -// CHECK:STDOUT: %.loc19_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_34 [template = constants.%.48] -// CHECK:STDOUT: %.loc19_34.7: Core.IntLiteral = converted %int.sadd, %.loc19_34.6 [template = constants.%.48] -// CHECK:STDOUT: %.loc19_35: type = array_type %.loc19_34.7, %i32 [template = constants.%.49] -// CHECK:STDOUT: %arr.var: ref %.49 = var arr -// CHECK:STDOUT: %arr: ref %.49 = bind_name arr, %arr.var +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %impl.elem0.loc19_26: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.bound: = bound_method %.loc19_19.2, %impl.elem0.loc19_26 [template = constants.%F.bound] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc19_33: %Convert.type.15 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %Convert.bound.loc19_33: = bound_method %int_2, %impl.elem0.loc19_33 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19_33: = specific_function %Convert.bound.loc19_33, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %Convert.specific_fn.loc19_33(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_33.1: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_33.2: %i32 = converted %int_2, %.loc19_33.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %F.bound(%.loc19_19.2, %.loc19_33.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed.loc19_11, %.loc19_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc19_34: %Convert.type.7 = interface_witness_access constants.%interface.12, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %Convert.bound.loc19_34: = bound_method %int.sadd, %impl.elem0.loc19_34 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc19_34: = specific_function %Convert.bound.loc19_34, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %.loc19_34.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc19_34.2: %i32 = converted %int.sadd, %.loc19_34.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %Convert.specific_fn.loc19_34(%.loc19_34.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc19_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_34 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc19_34.4: Core.IntLiteral = converted %int.sadd, %.loc19_34.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type: type = array_type %.loc19_34.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @F.1.%.loc12_14.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_27.1: type = facet_access_type %Self.ref.loc12_27 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_27: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_36.1: type = facet_access_type %Self.ref.loc12_36 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc12_14.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param1 -// CHECK:STDOUT: %other: @F.1.%.loc12_14.1 (%.1) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @F.1.%.loc12_14.1 (%.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @F.1.%.loc12_14.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc12_36: type = facet_access_type %Self.ref.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_36: type = converted %Self.ref.loc12_36, %Self.as_type.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %other: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.3 as %I.ref { +// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 @@ -172,18 +172,18 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc16_14: init type = call constants.%Int(%.loc16_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_14.2: type = value_of_initializer %int.make_type_signed.loc16_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_14.3: type = converted %int.make_type_signed.loc16_14, %.loc16_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc16_26: init type = call constants.%Int(%.loc16_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.2: type = value_of_initializer %int.make_type_signed.loc16_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.3: type = converted %int.make_type_signed.loc16_26, %.loc16_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc16_34: init type = call constants.%Int(%.loc16_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.2: type = value_of_initializer %int.make_type_signed.loc16_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.3: type = converted %int.make_type_signed.loc16_34, %.loc16_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_14: init type = call constants.%Int(%int_32.loc16_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_signed.loc16_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_signed.loc16_14, %.loc16_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_26: init type = call constants.%Int(%int_32.loc16_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_26.1: type = value_of_initializer %int.make_type_signed.loc16_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_26.2: type = converted %int.make_type_signed.loc16_26, %.loc16_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_34: init type = call constants.%Int(%int_32.loc16_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_34.1: type = value_of_initializer %int.make_type_signed.loc16_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_34.2: type = converted %int.make_type_signed.loc16_34, %.loc16_34.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1 @@ -191,29 +191,29 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc15_15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc12_14.1 (%.1)](%other.param_patt: @F.1.%.loc12_14.1 (%.1)) -> @F.1.%.loc12_14.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1)](%other.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1)) -> @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) { -// CHECK:STDOUT: %Self => constants.%.5 -// CHECK:STDOUT: %.loc12_14.1 => constants.%i32 +// CHECK:STDOUT: specific @F.1(constants.%I.facet) { +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%i32 // CHECK:STDOUT: } // 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 78288993e0e2c..6748974274f53 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 @@ -58,64 +58,64 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %Op.assoc_type = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] -// CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] +// CHECK:STDOUT: %As.generic: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%T)> [symbolic] // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.4: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @As.%Convert.decl [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.1 = assoc_entity element0, @As.%Convert.decl [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.7: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.10 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.2 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: %Add.type = facet_value %i32, %i32 [template] -// CHECK:STDOUT: %.12: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.3, %Convert.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, @As.%Convert.decl [template] -// CHECK:STDOUT: %.15: %As.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.3, %Convert.type.4 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, @As.%Convert.decl [template] +// CHECK:STDOUT: %As.facet: %As.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.17: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.6 [template] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.19: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.6 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %ImplicitAs.facet.1: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.5) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.21: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.8 [template] -// CHECK:STDOUT: %.22: %.21 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.23: %ImplicitAs.type.2 = facet_value %i32, %i32 [symbolic] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.8 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.5 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %ImplicitAs.facet.2: %ImplicitAs.type.2 = facet_value %i32, %i32 [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -149,14 +149,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%Add.type] {} {} -// CHECK:STDOUT: %As.decl: %As.type.1 = interface_decl @As [template = constants.%As] { +// CHECK:STDOUT: %As.decl: %As.type.1 = interface_decl @As [template = constants.%As.generic] { // CHECK:STDOUT: %T.patt.loc11_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_14.1, runtime_param [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.1 = interface_decl @ImplicitAs [template = constants.%ImplicitAs] { +// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.1 = interface_decl @ImplicitAs [template = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %T.patt.loc15_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_22.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc15_22.1, runtime_param [symbolic = %T.patt.loc15_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -164,10 +164,10 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_22.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc19_6.1: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.3: type = converted %int.make_type_signed, %.loc19_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [template = constants.%i32] // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { @@ -175,9 +175,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_17.2: type = converted %int_literal.make_type, %.loc23_17.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, file.%As.decl [template = constants.%As] -// CHECK:STDOUT: %.loc23_25: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_25) [template = constants.%i32] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, file.%As.decl [template = constants.%As.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.3] @@ -187,19 +187,19 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc27_17.2: type = converted %int_literal.make_type, %.loc27_17.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] -// CHECK:STDOUT: %.loc27_33: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc27_33) [template = constants.%i32] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { -// CHECK:STDOUT: %.loc31_6.1: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc31_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc31_6.3: type = converted %int.make_type_signed, %.loc31_6.2 [template = constants.%i32] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc31_6.2: type = converted %int.make_type_signed, %.loc31_6.1 [template = constants.%i32] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc31_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -211,34 +211,34 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: @Op.1.%.loc8_15.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Op.1.%.loc8_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @Op.1.%.loc8_15.1 (%.1) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @Op.1.%.loc8_15.1 (%.1) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @Op.1.%.loc8_15.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Op.1.%.loc8_15.1 (%.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %.loc8_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %.loc8_15.2 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc8_15: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_28.1: type = facet_access_type %Self.ref.loc8_28 [symbolic = %.loc8_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc8_28.2: type = converted %Self.ref.loc8_28, %.loc8_28.1 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc8_28: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc8_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_37.1: type = facet_access_type %Self.ref.loc8_37 [symbolic = %.loc8_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %.loc8_37.1 [symbolic = %.loc8_15.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @Op.1.%.loc8_15.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Op.1.%.loc8_15.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @Op.1.%.loc8_15.1 (%.1) = value_param runtime_param1 -// CHECK:STDOUT: %other: @Op.1.%.loc8_15.1 (%.1) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @Op.1.%.loc8_15.1 (%.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @Op.1.%.loc8_15.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc8_37: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %Op.assoc_type = assoc_entity element0, %Op.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Op = %.loc8 +// CHECK:STDOUT: .Op = %assoc0 // CHECK:STDOUT: witness = (%Op.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -251,32 +251,32 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T.loc11_14.2) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.loc12_32.2: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.loc12_32.2 (constants.%.5)] -// CHECK:STDOUT: %.loc12_32.3: @As.%.loc12_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.6)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc12_32.2: @As.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.1)] { -// CHECK:STDOUT: %self.patt: @Convert.1.%.loc12_20.1 (%.4) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.1.%.loc12_20.1 (%.4) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_20.2: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc12_20.3: type = facet_access_type %Self.ref [symbolic = %.loc12_20.1 (constants.%.4)] -// CHECK:STDOUT: %.loc12_20.4: type = converted %Self.ref, %.loc12_20.3 [symbolic = %.loc12_20.1 (constants.%.4)] +// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc12_20.2: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.1.%.loc12_20.1 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.1.%.loc12_20.1 (%.4) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_32.1: @As.%.loc12_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.6)] +// CHECK:STDOUT: %assoc0.loc12_32.1: @As.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Convert = %.loc12_32.1 +// CHECK:STDOUT: .Convert = %assoc0.loc12_32.1 // CHECK:STDOUT: witness = (%Convert.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -290,37 +290,37 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T.loc15_22.2) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.loc16_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.2) [symbolic = %.loc16_32.2 (constants.%.8)] -// CHECK:STDOUT: %.loc16_32.3: @ImplicitAs.%.loc16_32.2 (%.8) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.9)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.2) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.2)] +// CHECK:STDOUT: %assoc0.loc16_32.2: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.2) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.2) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.2)] { -// CHECK:STDOUT: %self.patt: @Convert.2.%.loc16_20.1 (%.7) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.2.%.loc16_20.1 (%.7) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.2.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.2.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc16_20.3: type = facet_access_type %Self.ref [symbolic = %.loc16_20.1 (constants.%.7)] -// CHECK:STDOUT: %.loc16_20.4: type = converted %Self.ref, %.loc16_20.3 [symbolic = %.loc16_20.1 (constants.%.7)] +// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] +// CHECK:STDOUT: %.loc16_20.2: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.2.%.loc16_20.1 (%.7) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.2.%.loc16_20.1 (%.7) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.2.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_32.1: @ImplicitAs.%.loc16_32.2 (%.8) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.9)] +// CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.2) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Convert = %.loc16_32.1 +// CHECK:STDOUT: .Convert = %assoc0.loc16_32.1 // CHECK:STDOUT: witness = (%Convert.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc19_6.3 as %Add.ref { +// CHECK:STDOUT: impl @impl.1: %.loc19_6.2 as %Add.ref { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 @@ -329,9 +329,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.3 [template = constants.%i32] -// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.3 [template = constants.%i32] -// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.3 [template = constants.%i32] +// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] +// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] +// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1 @@ -339,11 +339,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_17: = interface_witness (%Op.decl) [template = constants.%.12] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc19_17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %.loc23_17.2 as %As.type { @@ -354,20 +354,20 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc24_31.1: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_31.3: type = converted %int.make_type_signed, %.loc24_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23_30: = interface_witness (%Convert.decl) [template = constants.%.16] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc23_30 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %.loc27_17.2 as %ImplicitAs.type { @@ -378,30 +378,30 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc28_31.1: Core.IntLiteral = int_value 32 [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc28_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc28_31.3: type = converted %int.make_type_signed, %.loc28_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc27_38: = interface_witness (%Convert.decl) [template = constants.%.20] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc27_38 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4: %.loc31_6.3 as %ImplicitAs.type { +// CHECK:STDOUT: impl @impl.4: %.loc31_6.2 as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.7 = fn_decl @Convert.5 [template = constants.%Convert.7] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.3 [template = constants.%i32] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -411,11 +411,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31_38: = interface_witness (%Convert.decl) [template = constants.%.24] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc31_38 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type"; @@ -424,27 +424,27 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(@Add.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_15.1: type = facet_access_type %Self [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc8_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%.loc8_15.1 (%.1)](%other.param_patt: @Op.1.%.loc8_15.1 (%.1)) -> @Op.1.%.loc8_15.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1)](%other.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1)) -> @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.1(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc12_20.1: type = facet_access_type %Self [symbolic = %.loc12_20.1 (constants.%.4)] +// CHECK:STDOUT: %Self.as_type.loc12_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.loc12_20.1 (%.4)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%T.loc15_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc16_20.1: type = facet_access_type %Self [symbolic = %.loc16_20.1 (constants.%.7)] +// CHECK:STDOUT: %Self.as_type.loc16_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%.loc16_20.1 (%.7)]() -> @Convert.2.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; @@ -457,7 +457,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.loc8_15.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { @@ -474,7 +474,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.loc12_20.1 => constants.%.4 +// CHECK:STDOUT: %Self.as_type.loc12_20.1 => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(%T.loc11_14.2) { @@ -496,7 +496,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.loc16_20.1 => constants.%.7 +// CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%Self.as_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T.loc15_22.2) { @@ -504,9 +504,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.patt.loc15_22.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%.11) { -// CHECK:STDOUT: %Self => constants.%.11 -// CHECK:STDOUT: %.loc8_15.1 => constants.%i32 +// CHECK:STDOUT: specific @Op.1(constants.%Add.facet) { +// CHECK:STDOUT: %Self => constants.%Add.facet +// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32) { @@ -518,15 +518,15 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.loc12_32.2 => constants.%.13 -// CHECK:STDOUT: %.loc12_32.3 => constants.%.14 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.3 +// CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%.15) { +// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%As.facet) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %As.type => constants.%As.type.3 -// CHECK:STDOUT: %Self => constants.%.15 -// CHECK:STDOUT: %.loc12_20.1 => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%As.facet +// CHECK:STDOUT: %Self.as_type.loc12_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -538,15 +538,15 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.6 // CHECK:STDOUT: %Convert => constants.%Convert.6 -// CHECK:STDOUT: %.loc16_32.2 => constants.%.17 -// CHECK:STDOUT: %.loc16_32.3 => constants.%.18 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%i32, constants.%.19) { +// CHECK:STDOUT: specific @Convert.2(constants.%i32, constants.%ImplicitAs.facet.1) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 -// CHECK:STDOUT: %Self => constants.%.19 -// CHECK:STDOUT: %.loc16_20.1 => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.1 +// CHECK:STDOUT: %Self.as_type.loc16_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { @@ -558,25 +558,25 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.8 // CHECK:STDOUT: %Convert => constants.%Convert.8 -// CHECK:STDOUT: %.loc16_32.2 => constants.%.21 -// CHECK:STDOUT: %.loc16_32.3 => constants.%.22 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%.23) { +// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%ImplicitAs.facet.2) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.23 -// CHECK:STDOUT: %.loc16_20.1 => constants.%i32 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.2 +// CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -584,16 +584,16 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self.3: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] @@ -602,57 +602,57 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.5: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = facet_access_type %Self.5 [symbolic] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.3 [symbolic] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.23 [symbolic] -// CHECK:STDOUT: %.13: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.5 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.3 [symbolic] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.23 [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.4 [symbolic] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.4 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.24 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.4 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.24 [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.28 [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.28 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.18: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.19: = bound_method %.2, %Convert.6 [template] -// CHECK:STDOUT: %.20: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.22: = bound_method %.21, %Convert.6 [template] -// CHECK:STDOUT: %.23: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.6 [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.6 [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.24: type = facet_access_type %Self.3 [symbolic] -// CHECK:STDOUT: %.25: type = assoc_entity_type %Add.type, %Op.type.1 [template] -// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.30 [template] +// CHECK:STDOUT: %Self.as_type.5: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.1 [template] +// CHECK:STDOUT: %assoc0.7: %Op.assoc_type = assoc_entity element0, imports.%import_ref.30 [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Op.2) [template] -// CHECK:STDOUT: %.28: = bound_method %.20, %Op.2 [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.30: %.11 = assoc_entity element0, imports.%import_ref.32 [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %Op.bound.1: = bound_method %int_1.2, %Op.2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %assoc0.8: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.32 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.7 [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.34: type = array_type %.33, %i32 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.37: = bound_method %.33, %Convert.6 [template] -// CHECK:STDOUT: %.38: = bound_method %.36, %Convert.6 [template] -// CHECK:STDOUT: %.39: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.40: = bound_method %.29, %Op.2 [template] -// CHECK:STDOUT: %.41: %i32 = int_value 7 [template] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.7 [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.6 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.6 [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %Op.bound.2: = bound_method %int_3.1, %Op.2 [template] +// CHECK:STDOUT: %int_7: %i32 = int_value 7 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32) [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.43: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.44: = bound_method %.33, %Convert.8 [template] -// CHECK:STDOUT: %.45: = bound_method %.36, %Convert.8 [template] -// CHECK:STDOUT: %array: %.34 = tuple_value (%.29, %.39, %.41) [template] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_3.2, %Convert.8 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_4.1, %Convert.8 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_3.1, %int_4.2, %int_7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -664,28 +664,28 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+70, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.4) = import_ref Core//default, inst+94, loaded [symbolic = @As.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @As.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, inst+94, loaded [symbolic = @As.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//default, inst+86, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+86, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst+26, unloaded -// CHECK:STDOUT: %import_ref.9: %.25 = import_ref Core//default, inst+56, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.9: %Op.assoc_type = import_ref Core//default, inst+56, loaded [template = constants.%assoc0.7] // CHECK:STDOUT: %import_ref.10 = import_ref Core//default, inst+50, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, inst+149, loaded [template = constants.%i32] // CHECK:STDOUT: %import_ref.12: type = import_ref Core//default, inst+150, loaded [template = constants.%Add.type] -// CHECK:STDOUT: %import_ref.13: = import_ref Core//default, inst+171, loaded [template = constants.%.27] +// CHECK:STDOUT: %import_ref.13: = import_ref Core//default, inst+171, loaded [template = constants.%interface.2] // CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, inst+176, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, inst+182, loaded [template = constants.%As.type.3] -// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+206, loaded [template = constants.%.18] +// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+206, loaded [template = constants.%interface.1] // CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst+112, unloaded -// CHECK:STDOUT: %import_ref.18: @ImplicitAs.%.1 (%.11) = import_ref Core//default, inst+136, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)] +// CHECK:STDOUT: %import_ref.18: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.3) = import_ref Core//default, inst+136, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.8)] // CHECK:STDOUT: %import_ref.19 = import_ref Core//default, inst+128, unloaded // CHECK:STDOUT: %import_ref.20: type = import_ref Core//default, inst+211, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.21: type = import_ref Core//default, inst+217, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.22: = import_ref Core//default, inst+241, loaded [template = constants.%.43] +// CHECK:STDOUT: %import_ref.22: = import_ref Core//default, inst+241, loaded [template = constants.%interface.4] // CHECK:STDOUT: %import_ref.23 = import_ref Core//default, inst+128, unloaded // CHECK:STDOUT: %import_ref.25: type = import_ref Core//default, inst+246, loaded [template = constants.%i32] // CHECK:STDOUT: %import_ref.26: type = import_ref Core//default, inst+252, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.27: = import_ref Core//default, inst+276, loaded [template = constants.%.31] +// CHECK:STDOUT: %import_ref.27: = import_ref Core//default, inst+276, loaded [template = constants.%interface.3] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -694,43 +694,43 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%.loc4_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.3: type = converted %int.make_type_signed.loc4_22, %.loc4_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %.loc4_17, %.loc4_19.1 [template = constants.%.19] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.2(%.loc4_17) [template = constants.%.20] -// CHECK:STDOUT: %.loc4_19.3: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.20] -// CHECK:STDOUT: %.loc4_19.4: %i32 = converted %.loc4_17, %.loc4_19.3 [template = constants.%.20] -// CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 2 [template = constants.%.21] -// CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%.loc4_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_signed.loc4_35, %.loc4_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_32.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_32.2: = bound_method %.loc4_30, %.loc4_32.1 [template = constants.%.22] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32 = call %.loc4_32.2(%.loc4_30) [template = constants.%.23] -// CHECK:STDOUT: %.loc4_32.3: %i32 = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_32.4: %i32 = converted %.loc4_30, %.loc4_32.3 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_27.1: %Op.type.1 = interface_witness_access constants.%.27, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %.loc4_27.2: = bound_method %.loc4_19.4, %.loc4_27.1 [template = constants.%.28] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_27.2(%.loc4_19.4, %.loc4_32.4) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: %Convert.type.5 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.7] -// CHECK:STDOUT: %.loc4_27.4: = bound_method %int.sadd, %.loc4_27.3 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.sadd [template = constants.%.29] -// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %int.sadd, %.loc4_27.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %.loc4_27.4(%.loc4_27.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_27.7: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_27.8: Core.IntLiteral = converted %int.sadd, %.loc4_27.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_39: type = array_type %.loc4_27.8, %i32 [template = constants.%.34] -// CHECK:STDOUT: %arr.var: ref %.34 = var arr -// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_1, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %Convert.bound.loc4_19(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_19.1: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_19.2: %i32 = converted %int_1, %.loc4_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_35.2: type = converted %int.make_type_signed.loc4_35, %.loc4_35.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int_2, %impl.elem0.loc4_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32 = call %Convert.bound.loc4_32(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_32.1: %i32 = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_32.2: %i32 = converted %int_2, %.loc4_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc4_27.1: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc4_19.2, %impl.elem0.loc4_27.1 [template = constants.%Op.bound.1] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Op.bound(%.loc4_19.2, %.loc4_32.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_27.2: %Convert.type.5 = interface_witness_access constants.%interface.3, element0 [template = constants.%Convert.7] +// CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int.sadd, %impl.elem0.loc4_27.2 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %.loc4_27.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_27.2: %i32 = converted %int.sadd, %.loc4_27.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %Convert.bound.loc4_27(%.loc4_27.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_27.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_27.4: Core.IntLiteral = converted %int.sadd, %.loc4_27.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type: type = array_type %.loc4_27.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(constants.%T: type) { @@ -742,8 +742,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @As.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.6 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -769,8 +769,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.5)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.3) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.23 [symbolic = %.2 (constants.%.12)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.3) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.23 [symbolic = %assoc0 (constants.%assoc0.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -806,27 +806,27 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.3)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%T: type, constants.%Self.4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.5)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%.1 (%.10)]() -> @Convert.2.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type (%Self.as_type.3)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(constants.%Self.3: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.24)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%.1 (%.24)](%other.param_patt: @Op.1.%.1 (%.24)) -> @Op.1.%.1 (%.24); +// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%Self.as_type (%Self.as_type.5)](%other.param_patt: @Op.1.%Self.as_type (%Self.as_type.5)) -> @Op.1.%Self.as_type (%Self.as_type.5); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; @@ -837,51 +837,51 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_44: Core.IntLiteral = int_value 3 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_47: Core.IntLiteral = int_value 4 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_51: Core.IntLiteral = int_value 3 [template = constants.%.33] -// CHECK:STDOUT: %.loc4_56.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_56: init type = call constants.%Int(%.loc4_56.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_56.2: type = value_of_initializer %int.make_type_signed.loc4_56 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_56.3: type = converted %int.make_type_signed.loc4_56, %.loc4_56.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_53.2: = bound_method %.loc4_51, %.loc4_53.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32 = call %.loc4_53.2(%.loc4_51) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_53.3: %i32 = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_53.4: %i32 = converted %.loc4_51, %.loc4_53.3 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_64: Core.IntLiteral = int_value 4 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_69.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_69: init type = call constants.%Int(%.loc4_69.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_69.2: type = value_of_initializer %int.make_type_signed.loc4_69 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_69.3: type = converted %int.make_type_signed.loc4_69, %.loc4_69.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_66.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_66.2: = bound_method %.loc4_64, %.loc4_66.1 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32 = call %.loc4_66.2(%.loc4_64) [template = constants.%.39] -// CHECK:STDOUT: %.loc4_66.3: %i32 = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%.39] -// CHECK:STDOUT: %.loc4_66.4: %i32 = converted %.loc4_64, %.loc4_66.3 [template = constants.%.39] -// CHECK:STDOUT: %.loc4_61.1: %Op.type.1 = interface_witness_access constants.%.27, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %.loc4_61.2: = bound_method %.loc4_53.4, %.loc4_61.1 [template = constants.%.40] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_61.2(%.loc4_53.4, %.loc4_66.4) [template = constants.%.41] -// CHECK:STDOUT: %.loc4_73.1: %tuple.type = tuple_literal (%.loc4_44, %.loc4_47, %int.sadd) -// CHECK:STDOUT: %.loc4_73.2: %Convert.type.4 = interface_witness_access constants.%.43, element0 [template = constants.%Convert.8] -// CHECK:STDOUT: %.loc4_73.3: = bound_method %.loc4_44, %.loc4_73.2 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32 = call %.loc4_73.3(%.loc4_44) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_73.4: init %i32 = converted %.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_73.5: Core.IntLiteral = int_value 0 [template = constants.%.42] -// CHECK:STDOUT: %.loc4_73.6: ref %i32 = array_index file.%arr.var, %.loc4_73.5 -// CHECK:STDOUT: %.loc4_73.7: init %i32 = initialize_from %.loc4_73.4 to %.loc4_73.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_73.8: %Convert.type.4 = interface_witness_access constants.%.43, element0 [template = constants.%Convert.8] -// CHECK:STDOUT: %.loc4_73.9: = bound_method %.loc4_47, %.loc4_73.8 [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32 = call %.loc4_73.9(%.loc4_47) [template = constants.%.39] -// CHECK:STDOUT: %.loc4_73.10: init %i32 = converted %.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc4_73.11: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_73.12: ref %i32 = array_index file.%arr.var, %.loc4_73.11 -// CHECK:STDOUT: %.loc4_73.13: init %i32 = initialize_from %.loc4_73.10 to %.loc4_73.12 [template = constants.%.39] -// CHECK:STDOUT: %.loc4_73.14: Core.IntLiteral = int_value 2 [template = constants.%.21] -// CHECK:STDOUT: %.loc4_73.15: ref %i32 = array_index file.%arr.var, %.loc4_73.14 -// CHECK:STDOUT: %.loc4_73.16: init %i32 = initialize_from %int.sadd to %.loc4_73.15 [template = constants.%.41] -// CHECK:STDOUT: %.loc4_73.17: init %.34 = array_init (%.loc4_73.7, %.loc4_73.13, %.loc4_73.16) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc4_74: init %.34 = converted %.loc4_73.1, %.loc4_73.17 [template = constants.%array] +// CHECK:STDOUT: %int_3.loc4_44: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_4.loc4_47: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_3.loc4_51: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_32.loc4_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_56: init type = call constants.%Int(%int_32.loc4_56) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_56.1: type = value_of_initializer %int.make_type_signed.loc4_56 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_56.2: type = converted %int.make_type_signed.loc4_56, %.loc4_56.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_53: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %Convert.bound.loc4_53: = bound_method %int_3.loc4_51, %impl.elem0.loc4_53 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32 = call %Convert.bound.loc4_53(%int_3.loc4_51) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_53.1: %i32 = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_53.2: %i32 = converted %int_3.loc4_51, %.loc4_53.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4.loc4_64: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_32.loc4_69: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_69: init type = call constants.%Int(%int_32.loc4_69) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_69.1: type = value_of_initializer %int.make_type_signed.loc4_69 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_69.2: type = converted %int.make_type_signed.loc4_69, %.loc4_69.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc4_66: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %Convert.bound.loc4_66: = bound_method %int_4.loc4_64, %impl.elem0.loc4_66 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32 = call %Convert.bound.loc4_66(%int_4.loc4_64) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_66.1: %i32 = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_66.2: %i32 = converted %int_4.loc4_64, %.loc4_66.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %impl.elem0.loc4_61: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc4_53.2, %impl.elem0.loc4_61 [template = constants.%Op.bound.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Op.bound(%.loc4_53.2, %.loc4_66.2) [template = constants.%int_7] +// CHECK:STDOUT: %.loc4_73.1: %tuple.type = tuple_literal (%int_3.loc4_44, %int_4.loc4_47, %int.sadd) +// CHECK:STDOUT: %impl.elem0.loc4_73.1: %Convert.type.4 = interface_witness_access constants.%interface.4, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %Convert.bound.loc4_73.1: = bound_method %int_3.loc4_44, %impl.elem0.loc4_73.1 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32 = call %Convert.bound.loc4_73.1(%int_3.loc4_44) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_73.2: init %i32 = converted %int_3.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc4_73.3: ref %i32 = array_index file.%arr.var, %int_0 +// CHECK:STDOUT: %.loc4_73.4: init %i32 = initialize_from %.loc4_73.2 to %.loc4_73.3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc4_73.2: %Convert.type.4 = interface_witness_access constants.%interface.4, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %Convert.bound.loc4_73.2: = bound_method %int_4.loc4_47, %impl.elem0.loc4_73.2 [template = constants.%Convert.bound.7] +// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32 = call %Convert.bound.loc4_73.2(%int_4.loc4_47) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_73.5: init %i32 = converted %int_4.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%int_4.2] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_73.6: ref %i32 = array_index file.%arr.var, %int_1 +// CHECK:STDOUT: %.loc4_73.7: init %i32 = initialize_from %.loc4_73.5 to %.loc4_73.6 [template = constants.%int_4.2] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_73.8: ref %i32 = array_index file.%arr.var, %int_2 +// CHECK:STDOUT: %.loc4_73.9: init %i32 = initialize_from %int.sadd to %.loc4_73.8 [template = constants.%int_7] +// CHECK:STDOUT: %.loc4_73.10: init %array_type = array_init (%.loc4_73.4, %.loc4_73.7, %.loc4_73.9) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc4_74: init %array_type = converted %.loc4_73.1, %.loc4_73.10 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_74 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -905,7 +905,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32) { @@ -917,8 +917,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { @@ -935,8 +935,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.5 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T) { @@ -953,7 +953,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.4 -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { @@ -965,12 +965,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.5 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.16 -// CHECK:STDOUT: %.2 => constants.%.17 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.24 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.5 // CHECK:STDOUT: } // 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 513fc1c387428..8f21830754d23 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -34,8 +34,8 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template] // CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template] // CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template] @@ -84,10 +84,10 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_30.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_30.3: type = converted %int.make_type_signed, %.loc8_30.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_signed, %.loc8_30.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -99,10 +99,10 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_20.3: type = converted %int.make_type_signed, %.loc9_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc9_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -120,18 +120,18 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%.loc11_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.2: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.3: type = converted %int.make_type_signed.loc11_15, %.loc11_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%.loc11_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.2: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.3: type = converted %int.make_type_signed.loc11_23, %.loc11_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_31.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%.loc11_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_31.2: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_31.3: type = converted %int.make_type_signed.loc11_31, %.loc11_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_31.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_31.2: type = converted %int.make_type_signed.loc11_31, %.loc11_31.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -154,26 +154,26 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: --- use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template] // CHECK:STDOUT: %AsIntLiteral: %AsIntLiteral.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] // CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] // CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template] // CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.5: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.6: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.8: type = array_type %.7, %i32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%i32, %i32, %i32) [template] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %array: %.8 = tuple_value (%.3, %.5, %.6) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -195,35 +195,35 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %Core.ref.loc4_16: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsIntLiteral.ref: %AsIntLiteral.type = name_ref AsIntLiteral, imports.%import_ref.2 [template = constants.%AsIntLiteral] // CHECK:STDOUT: %Core.ref.loc4_34: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.3 [template = constants.%TestAdd] // CHECK:STDOUT: %Core.ref.loc4_47: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_51: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %.loc4_58: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32 = call %AsI32.ref.loc4_51(%.loc4_58) [template = constants.%.3] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32 = call %AsI32.ref.loc4_51(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %Core.ref.loc4_62: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_66: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %.loc4_73: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32 = call %AsI32.ref.loc4_66(%.loc4_73) [template = constants.%.5] -// CHECK:STDOUT: %.loc4_59.1: %i32 = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_59.2: %i32 = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_74.1: %i32 = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%.5] -// CHECK:STDOUT: %.loc4_74.2: %i32 = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%.5] -// CHECK:STDOUT: %int.sadd: init %i32 = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc4_75.1: %i32 = value_of_initializer %int.sadd [template = constants.%.6] -// CHECK:STDOUT: %.loc4_75.2: %i32 = converted %int.sadd, %.loc4_75.1 [template = constants.%.6] -// CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%.7] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%.7] -// CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%.7] -// CHECK:STDOUT: %.loc4_77: type = array_type %.loc4_76.2, %i32 [template = constants.%.8] -// CHECK:STDOUT: %arr.var: ref %.8 = var arr -// CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32 = call %AsI32.ref.loc4_66(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_59.1: %i32 = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_59.2: %i32 = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_74.1: %i32 = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_74.2: %i32 = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32 = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_75.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_75.2: %i32 = converted %int.sadd, %.loc4_75.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %array_type: type = array_type %.loc4_76.2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %arr.var: ref %array_type = var arr +// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; @@ -238,28 +238,28 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Core.ref.loc4_82: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_86: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %.loc4_93: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.convert_checked.loc4_94: init %i32 = call %AsI32.ref.loc4_86(%.loc4_93) [template = constants.%.3] +// CHECK:STDOUT: %int_1.loc4_93: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc4_94: init %i32 = call %AsI32.ref.loc4_86(%int_1.loc4_93) [template = constants.%int_1.2] // CHECK:STDOUT: %Core.ref.loc4_97: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_101: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %.loc4_108: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %int.convert_checked.loc4_109: init %i32 = call %AsI32.ref.loc4_101(%.loc4_108) [template = constants.%.5] +// CHECK:STDOUT: %int_2.loc4_108: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int.convert_checked.loc4_109: init %i32 = call %AsI32.ref.loc4_101(%int_2.loc4_108) [template = constants.%int_2.2] // CHECK:STDOUT: %Core.ref.loc4_112: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_116: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %.loc4_123: Core.IntLiteral = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %int.convert_checked.loc4_124: init %i32 = call %AsI32.ref.loc4_116(%.loc4_123) [template = constants.%.6] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int.convert_checked.loc4_124: init %i32 = call %AsI32.ref.loc4_116(%int_3) [template = constants.%int_3.1] // CHECK:STDOUT: %.loc4_125.1: %tuple.type = tuple_literal (%int.convert_checked.loc4_94, %int.convert_checked.loc4_109, %int.convert_checked.loc4_124) -// CHECK:STDOUT: %.loc4_125.2: Core.IntLiteral = int_value 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc4_125.3: ref %i32 = array_index file.%arr.var, %.loc4_125.2 -// CHECK:STDOUT: %.loc4_125.4: init %i32 = initialize_from %int.convert_checked.loc4_94 to %.loc4_125.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_125.5: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_125.6: ref %i32 = array_index file.%arr.var, %.loc4_125.5 -// CHECK:STDOUT: %.loc4_125.7: init %i32 = initialize_from %int.convert_checked.loc4_109 to %.loc4_125.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc4_125.8: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_125.9: ref %i32 = array_index file.%arr.var, %.loc4_125.8 -// CHECK:STDOUT: %.loc4_125.10: init %i32 = initialize_from %int.convert_checked.loc4_124 to %.loc4_125.9 [template = constants.%.6] -// CHECK:STDOUT: %.loc4_125.11: init %.8 = array_init (%.loc4_125.4, %.loc4_125.7, %.loc4_125.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc4_126: init %.8 = converted %.loc4_125.1, %.loc4_125.11 [template = constants.%array] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc4_125.2: ref %i32 = array_index file.%arr.var, %int_0 +// CHECK:STDOUT: %.loc4_125.3: init %i32 = initialize_from %int.convert_checked.loc4_94 to %.loc4_125.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_1.loc4_125: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc4_125.4: ref %i32 = array_index file.%arr.var, %int_1.loc4_125 +// CHECK:STDOUT: %.loc4_125.5: init %i32 = initialize_from %int.convert_checked.loc4_109 to %.loc4_125.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_2.loc4_125: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc4_125.6: ref %i32 = array_index file.%arr.var, %int_2.loc4_125 +// CHECK:STDOUT: %.loc4_125.7: init %i32 = initialize_from %int.convert_checked.loc4_124 to %.loc4_125.6 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_125.8: init %array_type = array_init (%.loc4_125.3, %.loc4_125.5, %.loc4_125.7) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc4_126: init %array_type = converted %.loc4_125.1, %.loc4_125.8 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_126 // 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 10b2d0bb059dc..1734c132b8ab6 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -20,11 +20,11 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.3: String = string_literal "hello" [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %str: String = string_literal "hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,13 +46,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.3: type = converted %int.make_type_signed, %.loc15_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_16: String = string_literal "hello" [template = constants.%.3] +// CHECK:STDOUT: %str: String = string_literal "hello" [template = constants.%str] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 0fbdf3d3928c0..205cd54e9085a 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -69,18 +69,18 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template] // CHECK:STDOUT: %Run0: %Run0.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Run1.type: type = fn_type @Run1 [template] // CHECK:STDOUT: %Run1: %Run1.type = struct_value () [template] // CHECK:STDOUT: %Run2.type: type = fn_type @Run2 [template] // CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -105,10 +105,10 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12.3: type = converted %int.make_type_signed, %.loc12_12.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_signed, %.loc12_12.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -118,14 +118,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%.loc13_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = value_of_initializer %int.make_type_signed.loc13_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.3: type = converted %int.make_type_signed.loc13_12, %.loc13_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_20: init type = call constants.%Int(%.loc13_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_signed.loc13_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_signed.loc13_20, %.loc13_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%int_32.loc13_12) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_signed.loc13_12 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed.loc13_12, %.loc13_12.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_20: init type = call constants.%Int(%int_32.loc13_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_signed.loc13_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_signed.loc13_20, %.loc13_20.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -152,17 +152,17 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] -// CHECK:STDOUT: %.loc23: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] -// CHECK:STDOUT: %.loc31_8: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc31_11: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_0.loc31: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1.loc31: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] -// CHECK:STDOUT: %.loc48_8: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc48_11: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_0.loc48: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1.loc48: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] -// CHECK:STDOUT: %.loc64: Core.IntLiteral = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %int_0.loc64: Core.IntLiteral = int_value 0 [template = constants.%int_0] // 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 ad483128ee2a6..8ff54f984fd4f 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -26,16 +26,16 @@ fn F() { // CHECK:STDOUT: --- fail_param_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,10 +58,10 @@ fn F() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed, %.loc11_9.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -76,8 +76,8 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc23_5.1: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_5.2: %i32 = converted %.loc23_5.1, [template = ] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float] +// CHECK:STDOUT: %.loc23: %i32 = converted %float, [template = ] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // 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 7be16a2f30fcc..a1ec025bcbdf3 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -23,18 +23,18 @@ fn Run() { // CHECK:STDOUT: --- fail_return_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,10 +58,10 @@ fn Run() { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 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: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param0 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } @@ -70,16 +70,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: return %.loc11_26 +// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float] +// CHECK:STDOUT: return %float // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc20_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.3: type = converted %int.make_type_signed, %.loc20_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed, %.loc20_10.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 9ca773180fc66..066fe3a7a3670 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -19,22 +19,22 @@ fn Main() { // CHECK:STDOUT: --- i32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,14 +59,14 @@ fn Main() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.3: type = converted %int.make_type_signed.loc11_12, %.loc11_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%.loc11_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_signed.loc11_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_signed.loc11_20, %.loc11_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed.loc11_12, %.loc11_12.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%int_32.loc11_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_signed.loc11_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_signed.loc11_20, %.loc11_20.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -83,21 +83,21 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.3: type = converted %int.make_type_signed, %.loc16_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_21.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.29] -// CHECK:STDOUT: %Echo.call: init %i32 = call %Echo.ref(%.loc16_21.6) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_1, %.loc16_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %Echo.call: init %i32 = call %Echo.ref(%.loc16_21.2) // CHECK:STDOUT: assign %b.var, %Echo.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 0c896114f0284..6b972cdcea410 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -19,32 +19,32 @@ fn Main() { // CHECK:STDOUT: --- more_param_ir.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,14 +69,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -92,37 +92,37 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc14_15.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) // CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_signed, %.loc14_15.2 [template = constants.%i32] // CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc14_20: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_22.1: %tuple.type.3 = tuple_literal (%.loc14_20) -// CHECK:STDOUT: %.loc14_22.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_22.3: = bound_method %.loc14_20, %.loc14_22.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_22.4: = specific_function %.loc14_22.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_22.4(%.loc14_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_22.5: init %i32 = converted %.loc14_20, %int.convert_checked.loc14 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_22.6: init %tuple.type.2 = tuple_init (%.loc14_22.5) to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_23: init %tuple.type.2 = converted %.loc14_22.1, %.loc14_22.6 [template = constants.%tuple] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc14_22.1: %tuple.type.3 = tuple_literal (%int_1) +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1, %impl.elem0.loc14 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_22.2: init %i32 = converted %int_1, %int.convert_checked.loc14 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_22.3: init %tuple.type.2 = tuple_init (%.loc14_22.2) to %x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_23: init %tuple.type.2 = converted %.loc14_22.1, %.loc14_22.3 [template = constants.%tuple] // CHECK:STDOUT: assign %x.var, %.loc14_23 // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, %x -// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 0 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_8.1: ref %i32 = tuple_access %x.ref, element0 -// CHECK:STDOUT: %.loc16_12.1: Core.IntLiteral = int_value 6 [template = constants.%.31] -// CHECK:STDOUT: %.loc16_8.2: %i32 = bind_value %.loc16_8.1 -// CHECK:STDOUT: %.loc16_12.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_12.3: = bound_method %.loc16_12.1, %.loc16_12.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_12.4: = specific_function %.loc16_12.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_12.4(%.loc16_12.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_12.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_12.6: %i32 = converted %.loc16_12.1, %.loc16_12.5 [template = constants.%.34] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc16_8.2, %.loc16_12.6) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc16_8: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_6, %impl.elem0.loc16 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_12.1: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_12.2: %i32 = converted %int_6, %.loc16_12.1 [template = constants.%int_6.2] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc16_8, %.loc16_12.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 034a00df6a1e9..7a9315d27fb57 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -19,12 +19,12 @@ fn Main() { // CHECK:STDOUT: --- empty_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,36 +33,36 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { -// CHECK:STDOUT: %a.patt: %.1 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %a.patt: %empty_struct_type = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %empty_struct_type = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %.loc11_20.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.1 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc11_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc11_20.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %a.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %a: %empty_struct_type = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Echo(%a.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @Echo(%a.param_patt: %empty_struct_type) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %empty_struct_type = name_ref a, %a // CHECK:STDOUT: return %a.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_9.1: %.1 = struct_literal () -// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc16_9.2: %.1 = converted %.loc16_9.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_9.2) +// CHECK:STDOUT: %.loc16_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc16_9.2: %empty_struct_type = converted %.loc16_9.1, %empty_struct [template = constants.%empty_struct] +// CHECK:STDOUT: %Echo.call: init %empty_struct_type = call %Echo.ref(%.loc16_9.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index ab15ff51210c5..7892a6019ba6a 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -17,23 +17,23 @@ fn Main() { // CHECK:STDOUT: --- params_one.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,10 +56,10 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -74,14 +74,14 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.29] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.6) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1, %.loc14_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.2) // 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 2c68d02df7416..c376f1bc65b3a 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -18,23 +18,23 @@ fn Main() { // CHECK:STDOUT: --- params_one_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,10 +57,10 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -75,23 +75,23 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.29] -// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.6) +// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1.loc14, %.loc14_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.2) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc15_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.29] -// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.6) +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_7.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_7.2: %i32 = converted %int_1.loc15, %.loc15_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.2) // 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 122433f2495b5..75ba6109eb9c7 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -17,27 +17,27 @@ fn Main() { // CHECK:STDOUT: --- params_two.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,14 +62,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -86,21 +86,21 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.33] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.6, %.loc14_10.6) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1, %.loc14_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_10.1: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_10.2: %i32 = converted %int_2, %.loc14_10.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.2, %.loc14_10.2) // 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 deee6bd4d21ae..127ceea12377e 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -18,27 +18,27 @@ fn Main() { // CHECK:STDOUT: --- params_two_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,14 +63,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -87,37 +87,37 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.33] -// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.6, %.loc14_10.6) +// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1.loc14, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1.loc14) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1.loc14, %.loc14_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2.loc14, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2.loc14) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_10.1: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_10.2: %i32 = converted %int_2.loc14, %.loc14_10.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.2, %.loc14_10.2) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc15_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_10.3: = bound_method %.loc15_10.1, %.loc15_10.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_10.4: = specific_function %.loc15_10.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %.loc15_10.4(%.loc15_10.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_10.5: %i32 = value_of_initializer %int.convert_checked.loc15_10 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_10.6: %i32 = converted %.loc15_10.1, %.loc15_10.5 [template = constants.%.33] -// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.6, %.loc15_10.6) +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc15_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_7: = bound_method %int_1.loc15, %impl.elem0.loc15_7 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc15_7: = specific_function %Convert.bound.loc15_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %Convert.specific_fn.loc15_7(%int_1.loc15) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_7.1: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_7.2: %i32 = converted %int_1.loc15, %.loc15_7.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc15_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_10: = bound_method %int_2.loc15, %impl.elem0.loc15_10 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15_10: = specific_function %Convert.bound.loc15_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %Convert.specific_fn.loc15_10(%int_2.loc15) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_10.1: %i32 = value_of_initializer %int.convert_checked.loc15_10 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_10.2: %i32 = converted %int_2.loc15, %.loc15_10.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.2, %.loc15_10.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 1333a3b9a1037..042aef3ad94d7 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -29,29 +29,29 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %F.1: type = bind_symbolic_name F, 0 [symbolic] // CHECK:STDOUT: %F.patt: type = symbolic_binding_pattern F, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%F.1) [symbolic] +// CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%F.1) [symbolic] // CHECK:STDOUT: %Inner.1: type = class_type @Inner [template] // CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%F.1) [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F, @Inner(%F.1) [symbolic] // CHECK:STDOUT: %F.2: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Inner(%F.1) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.32: = specific_function %F.2, @F(%F.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.2, @F(%F.1) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,7 +69,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %F.patt.loc5_13.1: type = symbolic_binding_pattern F, 0 [symbolic = %F.patt.loc5_13.2 (constants.%F.patt)] // CHECK:STDOUT: %F.param_patt: type = value_param_pattern %F.patt.loc5_13.1, runtime_param [symbolic = %F.patt.loc5_13.2 (constants.%F.patt)] // CHECK:STDOUT: } { @@ -82,10 +82,10 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: } { // CHECK:STDOUT: %F.param: type = value_param runtime_param // CHECK:STDOUT: %F.loc13_10: type = bind_symbolic_name F, 0, %F.param [symbolic = constants.%F.1] -// CHECK:STDOUT: %.loc13_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.3: type = converted %int.make_type_signed.loc13, %.loc13_33.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.2: type = converted %int.make_type_signed.loc13, %.loc13_33.1 [template = constants.%i32] // CHECK:STDOUT: %return.param.loc13: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param.loc13 // CHECK:STDOUT: } @@ -99,12 +99,12 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner.1] {} {} -// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Class.2 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .Inner = %Inner.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -121,10 +121,10 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_15.3: type = converted %int.make_type_signed, %.loc8_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_15.2: type = converted %int.make_type_signed, %.loc8_15.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -132,20 +132,20 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.3: type = converted %int.make_type_signed.loc9, %.loc9_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] // CHECK:STDOUT: %return.param.loc9: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %.loc9_12: ref %i32 = return_slot %return.param.loc9 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner.2 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -154,14 +154,14 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_28: Core.IntLiteral = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc8_29.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_29.2: = bound_method %.loc8_28, %.loc8_29.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_29.3: = specific_function %.loc8_29.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_29.3(%.loc8_28) [template = constants.%.31] -// CHECK:STDOUT: %.loc8_29.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc8_29.5: %i32 = converted %.loc8_28, %.loc8_29.4 [template = constants.%.31] -// CHECK:STDOUT: return %.loc8_29.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_29.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_29.2: %i32 = converted %int_0, %.loc8_29.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc8_29.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -170,14 +170,14 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %F.loc13_46.1: type = bind_symbolic_name F, 0 [symbolic = %F.loc13_46.1 (constants.%F.1)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Inner(%F.loc13_46.1) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F.loc13_46.2: @G.%F.type (%F.type) = struct_value () [symbolic = %F.loc13_46.2 (constants.%F.2)] -// CHECK:STDOUT: %.loc13_46.3: = specific_function %F.loc13_46.2, @F(%F.loc13_46.1) [symbolic = %.loc13_46.3 (constants.%.32)] +// CHECK:STDOUT: %F.specific_fn.loc13_46.2: = specific_function %F.loc13_46.2, @F(%F.loc13_46.1) [symbolic = %F.specific_fn.loc13_46.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_46.1: @G.%F.type (%F.type) = specific_constant @Inner.%F.decl, @Inner(constants.%F.1) [symbolic = %F.loc13_46.2 (constants.%F.2)] -// CHECK:STDOUT: %F.ref: @G.%F.type (%F.type) = name_ref F, %.loc13_46.1 [symbolic = %F.loc13_46.2 (constants.%F.2)] -// CHECK:STDOUT: %.loc13_46.2: = specific_function %F.ref, @F(constants.%F.1) [symbolic = %.loc13_46.3 (constants.%.32)] -// CHECK:STDOUT: %F.call: init %i32 = call %.loc13_46.2() +// CHECK:STDOUT: %.loc13_46: @G.%F.type (%F.type) = specific_constant @Inner.%F.decl, @Inner(constants.%F.1) [symbolic = %F.loc13_46.2 (constants.%F.2)] +// CHECK:STDOUT: %F.ref: @G.%F.type (%F.type) = name_ref F, %.loc13_46 [symbolic = %F.loc13_46.2 (constants.%F.2)] +// CHECK:STDOUT: %F.specific_fn.loc13_46.1: = specific_function %F.ref, @F(constants.%F.1) [symbolic = %F.specific_fn.loc13_46.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn.loc13_46.1() // CHECK:STDOUT: %.loc13_49.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc13_49.2: %i32 = converted %F.call, %.loc13_49.1 // CHECK:STDOUT: return %.loc13_49.2 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 55230047aa8db..5232e66673b29 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -16,10 +16,10 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: --- fail_param_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -44,16 +44,16 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%.loc14_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed.loc14_9, %.loc14_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_18: init type = call constants.%Int(%.loc14_18.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed.loc14_9, %.loc14_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_18: init type = call constants.%Int(%int_32.loc14_18) [template = constants.%i32] // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc14_18.2: type = value_of_initializer %int.make_type_signed.loc14_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.3: type = converted %int.make_type_signed.loc14_18, %.loc14_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25: type = ptr_type [template = ] +// CHECK:STDOUT: %.loc14_18.1: type = value_of_initializer %int.make_type_signed.loc14_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_18.2: type = converted %int.make_type_signed.loc14_18, %.loc14_18.1 [template = constants.%i32] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %a.param: = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 4d5eaef753d45..87078bbe8cb1f 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -19,10 +19,10 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: --- fail_param_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -47,14 +47,14 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: %n.patt.loc17_14: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt.loc17_15: %i32 = value_param_pattern %n.patt.loc17_14, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%.loc17_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_9.2: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_9.3: type = converted %int.make_type_signed.loc17_9, %.loc17_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_17: init type = call constants.%Int(%.loc17_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17_17, %.loc17_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_signed.loc17_9, %.loc17_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_17: init type = call constants.%Int(%int_32.loc17_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_signed.loc17_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_signed.loc17_17, %.loc17_17.1 [template = constants.%i32] // CHECK:STDOUT: %n.param.loc17_7: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc17_6: %i32 = bind_name n, %n.param.loc17_7 // CHECK:STDOUT: %n.param.loc17_15: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 0b5550c549353..b49ae93e0c760 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -260,15 +260,15 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -302,14 +302,14 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%.loc5_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.2: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.3: type = converted %int.make_type_signed.loc5_9, %.loc5_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%.loc5_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.3: type = converted %int.make_type_signed.loc5_17, %.loc5_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%int_32.loc5_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_signed.loc5_9, %.loc5_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_signed.loc5_17, %.loc5_17.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -318,24 +318,24 @@ import library "extern_api"; // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%.loc6_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_10, %.loc6_14.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc6_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%.loc6_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.2: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.3: type = converted %int.make_type_signed.loc6_25, %.loc6_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%int_32.loc6_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_signed.loc6_25, %.loc6_25.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %NS: = namespace [template] { @@ -348,7 +348,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.2; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -359,15 +359,15 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -401,14 +401,14 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_44.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%.loc5_44.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.2: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.3: type = converted %int.make_type_signed.loc5_44, %.loc5_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_52.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_52: init type = call constants.%Int(%.loc5_52.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_52.2: type = value_of_initializer %int.make_type_signed.loc5_52 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_52.3: type = converted %int.make_type_signed.loc5_52, %.loc5_52.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%int_32.loc5_44) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_signed.loc5_44, %.loc5_44.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_52: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_52: init type = call constants.%Int(%int_32.loc5_52) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_52.1: type = value_of_initializer %int.make_type_signed.loc5_52 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_52.2: type = converted %int.make_type_signed.loc5_52, %.loc5_52.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -417,24 +417,24 @@ import library "extern_api"; // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_45: init type = call constants.%Int(%.loc6_45) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_45: init type = call constants.%Int(%int_32.loc6_45) [template = constants.%i32] // CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_45) // CHECK:STDOUT: %.loc6_49.2: type = value_of_initializer %int.make_type_signed.loc6_45 [template = constants.%i32] // CHECK:STDOUT: %.loc6_49.3: type = converted %int.make_type_signed.loc6_45, %.loc6_49.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc6_60.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_60: init type = call constants.%Int(%.loc6_60.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_60.2: type = value_of_initializer %int.make_type_signed.loc6_60 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_60.3: type = converted %int.make_type_signed.loc6_60, %.loc6_60.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_63: type = struct_type {.c: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc6_60: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_60: init type = call constants.%Int(%int_32.loc6_60) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_60.1: type = value_of_initializer %int.make_type_signed.loc6_60 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_60.2: type = converted %int.make_type_signed.loc6_60, %.loc6_60.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %NS: = namespace [template] { @@ -447,7 +447,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %.2; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -459,26 +459,26 @@ import library "extern_api"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -523,19 +523,19 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.30] -// CHECK:STDOUT: %c.var: ref %.30 = var c -// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -550,7 +550,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -562,27 +562,27 @@ import library "extern_api"; // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc7_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.29] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.6) +// CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_16.1: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_16.2: %i32 = converted %int_1.loc7, %.loc7_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_25.7: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc8_25.7) +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_25.2: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_25.3: %i32 = converted %int_1.loc8, %.loc8_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_25.4: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc8_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -600,31 +600,31 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] // CHECK:STDOUT: %E: %E.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.30) [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -658,35 +658,35 @@ import library "extern_api"; // CHECK:STDOUT: %default.import = import // 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: %.loc23_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_16: init type = call constants.%Int(%.loc23_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.2: type = value_of_initializer %int.make_type_signed.loc23_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.3: type = converted %int.make_type_signed.loc23_16, %.loc23_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_24: init type = call constants.%Int(%.loc23_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.2: type = value_of_initializer %int.make_type_signed.loc23_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.3: type = converted %int.make_type_signed.loc23_24, %.loc23_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_16: init type = call constants.%Int(%int_32.loc23_16) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_signed.loc23_16 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_signed.loc23_16, %.loc23_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_24: init type = call constants.%Int(%int_32.loc23_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_24.1: type = value_of_initializer %int.make_type_signed.loc23_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_24.2: type = converted %int.make_type_signed.loc23_24, %.loc23_24.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc23_21: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { -// CHECK:STDOUT: %.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc32_17: init type = call constants.%Int(%.loc32_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc32_17: init type = call constants.%Int(%int_32.loc32_17) [template = constants.%i32] // CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc32_17) // CHECK:STDOUT: %.loc32_21.2: type = value_of_initializer %int.make_type_signed.loc32_17 [template = constants.%i32] // CHECK:STDOUT: %.loc32_21.3: type = converted %int.make_type_signed.loc32_17, %.loc32_21.2 [template = constants.%i32] // CHECK:STDOUT: %.loc32_21.4: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc32_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc32_32: init type = call constants.%Int(%.loc32_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_32.2: type = value_of_initializer %int.make_type_signed.loc32_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_32.3: type = converted %int.make_type_signed.loc32_32, %.loc32_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_35: type = struct_type {.c: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc32_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc32_32: init type = call constants.%Int(%int_32.loc32_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc32_32.1: type = value_of_initializer %int.make_type_signed.loc32_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc32_32.2: type = converted %int.make_type_signed.loc32_32, %.loc32_32.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %.loc32_24: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 +// CHECK:STDOUT: %.loc32_24: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} @@ -694,19 +694,19 @@ import library "extern_api"; // CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc53_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%.loc53_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.2: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.3: type = converted %int.make_type_signed.loc53, %.loc53_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_signed.loc53, %.loc53_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc54_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%.loc54_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.2: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.3: type = converted %int.make_type_signed.loc54, %.loc54_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: %i32} [template = constants.%.2] -// CHECK:STDOUT: %c.var: ref %.2 = var c -// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%int_32.loc54) [template = constants.%i32] +// CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] +// CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_signed.loc54, %.loc54_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -721,7 +721,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.2; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -733,27 +733,27 @@ import library "extern_api"; // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc53_16.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.30] -// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.30] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.6) +// CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_16.1: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_16.2: %i32 = converted %int_1.loc53, %.loc53_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc54_23: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc54_25.1: %tuple.type.3 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.30] -// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.30] -// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.30] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc54_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc54_25.7: %tuple.type.2 = converted %.loc54_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc54_25.7) +// CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc54_25.1: %tuple.type.3 = tuple_literal (%int_1.loc54) +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc54_25.2: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc54_25.3: %i32 = converted %int_1.loc54, %.loc54_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc54_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc54_25.4: %tuple.type.2 = converted %.loc54_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc54_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -771,31 +771,31 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] // CHECK:STDOUT: %E: %E.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.30) [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -829,35 +829,35 @@ import library "extern_api"; // CHECK:STDOUT: %default.import = import // 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: %.loc7_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_16: init type = call constants.%Int(%.loc7_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.2: type = value_of_initializer %int.make_type_signed.loc7_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.3: type = converted %int.make_type_signed.loc7_16, %.loc7_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_24: init type = call constants.%Int(%.loc7_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_24.2: type = value_of_initializer %int.make_type_signed.loc7_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_24.3: type = converted %int.make_type_signed.loc7_24, %.loc7_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_16: init type = call constants.%Int(%int_32.loc7_16) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_signed.loc7_16 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_signed.loc7_16, %.loc7_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_24: init type = call constants.%Int(%int_32.loc7_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_signed.loc7_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_signed.loc7_24, %.loc7_24.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc7_21: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { -// CHECK:STDOUT: %.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_17: init type = call constants.%Int(%.loc8_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_17: init type = call constants.%Int(%int_32.loc8_17) [template = constants.%i32] // CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc8_17) // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_signed.loc8_17 [template = constants.%i32] // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_signed.loc8_17, %.loc8_21.2 [template = constants.%i32] // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc8_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%.loc8_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.2: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.3: type = converted %int.make_type_signed.loc8_32, %.loc8_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_35: type = struct_type {.c: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%int_32.loc8_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_signed.loc8_32, %.loc8_32.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %.loc8_24: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 +// CHECK:STDOUT: %.loc8_24: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} @@ -865,19 +865,19 @@ import library "extern_api"; // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc13_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.3: type = converted %int.make_type_signed.loc13, %.loc13_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed.loc14, %.loc14_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.c: %i32} [template = constants.%.2] -// CHECK:STDOUT: %c.var: ref %.2 = var c -// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: %.loc15_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -892,7 +892,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %.2; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -904,27 +904,27 @@ import library "extern_api"; // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.30] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc13_16.6) +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1.loc13) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_16.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_16.2: %i32 = converted %int_1.loc13, %.loc13_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc13_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_23: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_25.1: %tuple.type.3 = tuple_literal (%.loc14_23) -// CHECK:STDOUT: %.loc14_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_25.3: = bound_method %.loc14_23, %.loc14_25.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_25.4: = specific_function %.loc14_25.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_25.4(%.loc14_23) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_25.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_25.6: %i32 = converted %.loc14_23, %.loc14_25.5 [template = constants.%.30] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_25.7: %tuple.type.2 = converted %.loc14_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc14_25.7) +// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc14_25.1: %tuple.type.3 = tuple_literal (%int_1.loc14) +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_25.2: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_25.3: %i32 = converted %int_1.loc14, %.loc14_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_25.4: %tuple.type.2 = converted %.loc14_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc14_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -942,26 +942,26 @@ import library "extern_api"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -1006,19 +1006,19 @@ import library "extern_api"; // CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc53_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%.loc53_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.2: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.3: type = converted %int.make_type_signed.loc53, %.loc53_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_signed.loc53, %.loc53_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc54_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%.loc54_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.2: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.3: type = converted %int.make_type_signed.loc54, %.loc54_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: %i32} [template = constants.%.30] -// CHECK:STDOUT: %c.var: ref %.30 = var c -// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%int_32.loc54) [template = constants.%i32] +// CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] +// CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_signed.loc54, %.loc54_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -1033,7 +1033,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1045,27 +1045,27 @@ import library "extern_api"; // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc53_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.29] -// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.29] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.6) +// CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_16.1: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_16.2: %i32 = converted %int_1.loc53, %.loc53_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc54_23: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.29] -// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.29] -// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc54_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc54_25.7: %tuple.type.1 = converted %.loc54_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc54_25.7) +// CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%int_1.loc54) +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc54_25.2: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc54_25.3: %i32 = converted %int_1.loc54, %.loc54_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc54_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc54_25.4: %tuple.type.1 = converted %.loc54_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc54_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -1083,26 +1083,26 @@ import library "extern_api"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -1147,19 +1147,19 @@ import library "extern_api"; // CHECK:STDOUT: %.loc51_9.2: type = converted %.loc51_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc52_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%.loc52_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc52_8.2: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] -// CHECK:STDOUT: %.loc52_8.3: type = converted %int.make_type_signed.loc52, %.loc52_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%int_32.loc52) [template = constants.%i32] +// CHECK:STDOUT: %.loc52_8.1: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] +// CHECK:STDOUT: %.loc52_8.2: type = converted %int.make_type_signed.loc52, %.loc52_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc53_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%.loc53_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.2: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.3: type = converted %int.make_type_signed.loc53, %.loc53_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_16: type = struct_type {.c: %i32} [template = constants.%.30] -// CHECK:STDOUT: %c.var: ref %.30 = var c -// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_signed.loc53, %.loc53_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: %.loc54_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -1174,7 +1174,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.1) -> %.30; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.1) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1186,27 +1186,27 @@ import library "extern_api"; // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc52_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc52_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc52_16.3: = bound_method %.loc52_16.1, %.loc52_16.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc52_16.4: = specific_function %.loc52_16.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %.loc52_16.4(%.loc52_16.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc52_16.5: %i32 = value_of_initializer %int.convert_checked.loc52 [template = constants.%.29] -// CHECK:STDOUT: %.loc52_16.6: %i32 = converted %.loc52_16.1, %.loc52_16.5 [template = constants.%.29] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc52_16.6) +// CHECK:STDOUT: %int_1.loc52: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc52: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc52: = bound_method %int_1.loc52, %impl.elem0.loc52 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc52: = specific_function %Convert.bound.loc52, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %Convert.specific_fn.loc52(%int_1.loc52) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc52_16.1: %i32 = value_of_initializer %int.convert_checked.loc52 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc52_16.2: %i32 = converted %int_1.loc52, %.loc52_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc52_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc53_23: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc53_25.1: %tuple.type.2 = tuple_literal (%.loc53_23) -// CHECK:STDOUT: %.loc53_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_25.3: = bound_method %.loc53_23, %.loc53_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc53_25.4: = specific_function %.loc53_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_25.4(%.loc53_23) [template = constants.%.29] -// CHECK:STDOUT: %.loc53_25.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.29] -// CHECK:STDOUT: %.loc53_25.6: %i32 = converted %.loc53_23, %.loc53_25.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc53_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc53_25.7: %tuple.type.1 = converted %.loc53_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc53_25.7) +// CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc53_25.1: %tuple.type.2 = tuple_literal (%int_1.loc53) +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_25.2: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc53_25.3: %i32 = converted %int_1.loc53, %.loc53_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc53_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc53_25.4: %tuple.type.1 = converted %.loc53_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc53_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index 7ecffbb6cf690..f44455f3dcb79 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -172,8 +172,8 @@ extern library "basic" fn F(); // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -193,13 +193,13 @@ extern library "basic" fn F(); // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); 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 e8f69ecc3e605..1c8fdc7eeb267 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 @@ -98,8 +98,8 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -153,11 +153,11 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: class @C; // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc37: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc37 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnCUnused() -> %C; @@ -190,8 +190,8 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] // CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: } @@ -204,7 +204,7 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %import_ref.5: %ReturnDUnused.type = import_ref Main//incomplete_return, inst+27, loaded [template = constants.%ReturnDUnused] // CHECK:STDOUT: %import_ref.6: %ReturnDUsed.type = import_ref Main//incomplete_return, inst+35, loaded [template = constants.%ReturnDUsed] // CHECK:STDOUT: %import_ref.7 = import_ref Main//incomplete_return, inst+38, unloaded -// CHECK:STDOUT: %import_ref.8: = import_ref Main//incomplete_return, inst+48, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//incomplete_return, inst+48, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.9 = import_ref Main//incomplete_return, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon b/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon index e6b439e3e8a73..2fe30b9760353 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon @@ -62,8 +62,8 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.1: type = class_type @C.1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C.2: type = class_type @C.2 [template] // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] @@ -103,19 +103,19 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.1 { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.2 { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F1(%x.param_patt: %C.2); @@ -133,8 +133,8 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.1: type = class_type @C.1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template] // CHECK:STDOUT: %F1: %F1.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C.2 [template] @@ -162,19 +162,19 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.1 { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.2 { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F1(%x.param_patt: %C.1); @@ -183,8 +183,8 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.1: type = class_type @C.1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F1: %F1.type = struct_value () [template] @@ -224,19 +224,19 @@ fn N.F2(x: C) { N.F1(x); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.1 { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C.2 { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F1(%x.param_patt: %C.1); diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index ff5d51f816f7e..c1fafa83e0b69 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -15,10 +15,10 @@ fn G(a: i32); // CHECK:STDOUT: --- param_same_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -44,10 +44,10 @@ fn G(a: i32); // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed, %.loc11_9.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -55,10 +55,10 @@ fn G(a: i32); // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_9.3: type = converted %int.make_type_signed, %.loc13_9.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_signed, %.loc13_9.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 7168931bffacb..908ed2705118e 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -114,18 +114,18 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } @@ -154,14 +154,14 @@ fn D() {} // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%.loc5_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.2: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.3: type = converted %int.make_type_signed.loc5_9, %.loc5_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%.loc5_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.3: type = converted %int.make_type_signed.loc5_17, %.loc5_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%int_32.loc5_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_signed.loc5_9, %.loc5_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_signed.loc5_17, %.loc5_17.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -170,24 +170,24 @@ fn D() {} // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%.loc6_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_10, %.loc6_14.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc6_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%.loc6_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.2: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.3: type = converted %int.make_type_signed.loc6_25, %.loc6_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: %i32} [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%int_32.loc6_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_signed.loc6_25, %.loc6_25.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: } @@ -203,14 +203,14 @@ fn D() {} // CHECK:STDOUT: return %b.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.2 { +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %struct_type.c { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %tuple.type.2 = name_ref c, %c -// CHECK:STDOUT: %.loc6_47: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_46: %i32 = tuple_access %c.ref, element0 -// CHECK:STDOUT: %.loc6_48: %.2 = struct_literal (%.loc6_46) -// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc6_46) -// CHECK:STDOUT: %.loc6_49: %.2 = converted %.loc6_48, %struct +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %c.ref, element0 +// CHECK:STDOUT: %.loc6_48: %struct_type.c = struct_literal (%tuple.elem0) +// CHECK:STDOUT: %struct: %struct_type.c = struct_value (%tuple.elem0) +// CHECK:STDOUT: %.loc6_49: %struct_type.c = converted %.loc6_48, %struct // CHECK:STDOUT: return %.loc6_49 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -247,26 +247,26 @@ fn D() {} // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -299,26 +299,26 @@ fn D() {} // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.30] -// CHECK:STDOUT: %c.var: ref %.30 = var c -// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] +// CHECK:STDOUT: %c.var: ref %struct_type.c = var c +// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %struct_type.c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -326,27 +326,27 @@ fn D() {} // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc7_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.29] -// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.6) +// CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_16.1: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_16.2: %i32 = converted %int_1.loc7, %.loc7_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.2) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_25.7: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc8_25.7) +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_25.2: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc8_25.3: %i32 = converted %int_1.loc8, %.loc8_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_25.4: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %struct_type.c = call %C.ref(%.loc8_25.4) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -356,10 +356,10 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -386,14 +386,14 @@ fn D() {} // CHECK:STDOUT: %default.import = import // 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: %.loc23_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_9: init type = call constants.%Int(%.loc23_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_9.2: type = value_of_initializer %int.make_type_signed.loc23_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_9.3: type = converted %int.make_type_signed.loc23_9, %.loc23_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_17: init type = call constants.%Int(%.loc23_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_17.2: type = value_of_initializer %int.make_type_signed.loc23_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_17.3: type = converted %int.make_type_signed.loc23_17, %.loc23_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_9: init type = call constants.%Int(%int_32.loc23_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_9.1: type = value_of_initializer %int.make_type_signed.loc23_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_9.2: type = converted %int.make_type_signed.loc23_9, %.loc23_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_17: init type = call constants.%Int(%int_32.loc23_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int.make_type_signed.loc23_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_17.2: type = converted %int.make_type_signed.loc23_17, %.loc23_17.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 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 3ea067e62e64a..23a1eff6441ee 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 @@ -91,10 +91,10 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %.5: %.type.5 = struct_value () [template] // CHECK:STDOUT: %K.type: type = fn_type @K [template] // CHECK:STDOUT: %K: %K.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %.type.6: type = fn_type @.6 [template] -// CHECK:STDOUT: %.7: %.type.6 = struct_value () [template] -// CHECK:STDOUT: %struct: %.6 = struct_value () [template] +// CHECK:STDOUT: %.6: %.type.6 = struct_value () [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -171,14 +171,14 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.7] { -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.6] { +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc65_12.1: %.6 = struct_literal () -// CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.6 [template = constants.%.6] -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %.loc65_12.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -222,11 +222,11 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: fn @K() -> %empty_tuple.type; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.6() -> %.6 { +// CHECK:STDOUT: fn @.6() -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc65_24: %.6 = struct_literal () -// CHECK:STDOUT: %struct: %.6 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc65_25: %.6 = converted %.loc65_24, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc65_24: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc65_25: %empty_struct_type = converted %.loc65_24, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc65_25 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon index 61b83c55aaaa5..1bff7234499d7 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon @@ -172,8 +172,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] @@ -225,11 +225,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) { @@ -246,8 +246,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -277,11 +277,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo[](%a.param_patt: %C) { @@ -293,12 +293,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -315,7 +315,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { @@ -326,11 +326,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); @@ -344,8 +344,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -375,11 +375,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) { @@ -391,8 +391,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] @@ -428,11 +428,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); @@ -443,8 +443,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] @@ -454,7 +454,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//two_file, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//two_file, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -505,12 +505,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -530,7 +530,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { @@ -541,11 +541,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); @@ -559,12 +559,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -584,7 +584,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { @@ -595,11 +595,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); @@ -613,14 +613,14 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -640,7 +640,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_8.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt.loc15_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_8.1, runtime_param [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -651,11 +651,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Foo(%a.loc7_8.1: %C) { @@ -691,11 +691,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -726,18 +726,18 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_25.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc8_26: init %C = converted %.loc8_25.1, %.loc8_25.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc8_26: init %C = converted %.loc8_25.1, %.loc8_25.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc8_26 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -745,8 +745,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -768,11 +768,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); @@ -781,15 +781,15 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//alias_two_file, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//alias_two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -828,13 +828,13 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = const_type %C [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %const: type = const_type %C [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -844,37 +844,37 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %a.patt: %.3 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %const = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.3 = bind_name a, %a.param +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param0 +// CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %a.patt: %.3 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %a.patt: %const = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc17_18: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %.loc17_11: type = const_type %.3 [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.3 = bind_name a, %a.param +// CHECK:STDOUT: %const.loc17_18: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc17_11: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param0 +// CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%a.param_patt: %.3); +// CHECK:STDOUT: fn @Foo(%a.param_patt: %const); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%a.param_patt: %.3) { +// CHECK:STDOUT: fn @.1(%a.param_patt: %const) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index dfc32adbcde8f..a75e1f4a6a654 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -13,10 +13,10 @@ fn Foo(a: i32) {} // CHECK:STDOUT: --- params_one.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -39,10 +39,10 @@ fn Foo(a: i32) {} // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 0f44b67931ea4..6aec7f6a5a615 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -13,10 +13,10 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: --- params_one_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -39,10 +39,10 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index a6683aceec3c2..bf7b88526fa33 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -13,10 +13,10 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: --- params_two.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -41,14 +41,14 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 3636204fb7a59..25fd363f98e6b 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -13,10 +13,10 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: --- params_two_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -41,14 +41,14 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11_11, %.loc11_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11_19, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 64fc86e6cd56f..20800f5e991d5 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -195,23 +195,23 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.type: type = fn_type @ExplicitGenericParam [template] // CHECK:STDOUT: %ExplicitGenericParam: %ExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.1: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %CallExplicitGenericParam.type: type = fn_type @CallExplicitGenericParam [template] // CHECK:STDOUT: %CallExplicitGenericParam: %CallExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%i32) [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [symbolic] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.2: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%i32) [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %ptr.3: type = ptr_type %struct_type.a [symbolic] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.type: type = fn_type @CallExplicitGenericParamWithGenericArg [template] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg: %CallExplicitGenericParamWithGenericArg.type = struct_value () [template] -// CHECK:STDOUT: %.8: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%.6) [symbolic] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.3: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -233,96 +233,96 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ExplicitGenericParam.decl: %ExplicitGenericParam.type = fn_decl @ExplicitGenericParam [template = constants.%ExplicitGenericParam] { // CHECK:STDOUT: %T.patt.loc4_25.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_25.1, runtime_param [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.patt: @ExplicitGenericParam.%.loc4_39.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @ExplicitGenericParam.%.loc4_39.2 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_39.1: type = ptr_type %T [symbolic = %.loc4_39.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_39.1: type = ptr_type %T [symbolic = %ptr.loc4_39.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%.loc4_39.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%.loc4_39.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParam.decl: %CallExplicitGenericParam.type = fn_decl @CallExplicitGenericParam [template = constants.%CallExplicitGenericParam] { -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_34: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_34) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] // CHECK:STDOUT: %.loc6_37.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_37.2: type = converted %int.make_type_signed.loc6, %.loc6_37.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.3: type = ptr_type %i32 [template = constants.%.4] -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.decl: %CallExplicitGenericParamWithGenericArg.type = fn_decl @CallExplicitGenericParamWithGenericArg [template = constants.%CallExplicitGenericParamWithGenericArg] { // CHECK:STDOUT: %T.patt.loc10_43.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_43.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_43.1, runtime_param [symbolic = %T.patt.loc10_43.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc10_43.1 [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %.loc10_62.1: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc10_63.1: type = ptr_type %.6 [symbolic = %.loc10_63.2 (constants.%.7)] +// CHECK:STDOUT: %struct_type.a.loc10_62.1: type = struct_type {.a: %T} [symbolic = %struct_type.a.loc10_62.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %ptr.loc10_63.1: type = ptr_type %struct_type.a [symbolic = %ptr.loc10_63.2 (constants.%ptr.3)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_43.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_25.1: type) { // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_25.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_39.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %ptr.loc4_39.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.2)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%.loc4_39.2 (%.1) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.2)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%.loc4_39.2 (%.1) = call %.loc4_50.1() -// CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%.loc4_39.2 (%.1) = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%.loc4_39.2 (%.1) = converted %ExplicitGenericParam.call, %.loc4_73.1 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn.1)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = call %ExplicitGenericParam.specific_fn.loc4_50.1() +// CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr.1) = converted %ExplicitGenericParam.call, %.loc4_73.1 // CHECK:STDOUT: return %.loc4_73.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallExplicitGenericParam() -> %.4 { +// CHECK:STDOUT: fn @CallExplicitGenericParam() -> %ptr.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] -// CHECK:STDOUT: %.loc7_31: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_31) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] // CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] // CHECK:STDOUT: %.loc7_34.2: type = converted %int.make_type_signed.loc7, %.loc7_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%i32) [template = constants.%.5] -// CHECK:STDOUT: %ExplicitGenericParam.call: init %.4 = call %.loc7_10() -// CHECK:STDOUT: %.loc7_35.1: %.4 = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc7_35.2: %.4 = converted %ExplicitGenericParam.call, %.loc7_35.1 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%i32) [template = constants.%ExplicitGenericParam.specific_fn.2] +// CHECK:STDOUT: %ExplicitGenericParam.call: init %ptr.2 = call %ExplicitGenericParam.specific_fn() +// CHECK:STDOUT: %.loc7_35.1: %ptr.2 = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc7_35.2: %ptr.2 = converted %ExplicitGenericParam.call, %.loc7_35.1 // CHECK:STDOUT: return %.loc7_35.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @CallExplicitGenericParamWithGenericArg(%T.loc10_43.1: type) { // CHECK:STDOUT: %T.loc10_43.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_43.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_43.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_43.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_43.2 (%T)} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc10_63.2: type = ptr_type @CallExplicitGenericParamWithGenericArg.%.loc10_62.2 (%.6) [symbolic = %.loc10_63.2 (constants.%.7)] +// CHECK:STDOUT: %struct_type.a.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_43.2 (%T)} [symbolic = %struct_type.a.loc10_62.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %ptr.loc10_63.2: type = ptr_type @CallExplicitGenericParamWithGenericArg.%struct_type.a.loc10_62.2 (%struct_type.a) [symbolic = %ptr.loc10_63.2 (constants.%ptr.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%.loc10_62.2) [symbolic = %.loc11_10.2 (constants.%.8)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a.loc10_62.2) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc11: type = name_ref T, %T.loc10_43.1 [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %.loc11_37: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc11_10.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%.6) [symbolic = %.loc11_10.2 (constants.%.8)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = call %.loc11_10.1() -// CHECK:STDOUT: %.loc11_39.1: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc11_39.2: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = converted %ExplicitGenericParam.call, %.loc11_39.1 +// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: %T} [symbolic = %struct_type.a.loc10_62.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%struct_type.a) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.3)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = call %ExplicitGenericParam.specific_fn.loc11_10.1() +// CHECK:STDOUT: %.loc11_39.1: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc11_39.2: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) = converted %ExplicitGenericParam.call, %.loc11_39.1 // CHECK:STDOUT: return %.loc11_39.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -330,47 +330,47 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%T) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_39.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.2 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_39.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%i32) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%i32 // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%i32 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.4 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.5 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamWithGenericArg(constants.%T) { // CHECK:STDOUT: %T.loc10_43.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_43.2 => constants.%T -// CHECK:STDOUT: %.loc10_62.2 => constants.%.6 -// CHECK:STDOUT: %.loc10_63.2 => constants.%.7 +// CHECK:STDOUT: %struct_type.a.loc10_62.2 => constants.%struct_type.a +// CHECK:STDOUT: %ptr.loc10_63.2 => constants.%ptr.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(constants.%.6) { -// CHECK:STDOUT: %T.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.7 +// CHECK:STDOUT: specific @ExplicitGenericParam(constants.%struct_type.a) { +// CHECK:STDOUT: %T.loc4_25.2 => constants.%struct_type.a +// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%struct_type.a +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.8 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamWithGenericArg.%.loc10_62.2) { -// CHECK:STDOUT: %T.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.7 +// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamWithGenericArg.%struct_type.a.loc10_62.2) { +// CHECK:STDOUT: %T.loc4_25.2 => constants.%struct_type.a +// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%struct_type.a +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon @@ -378,10 +378,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.type: type = fn_type @ExplicitGenericParam [template] // CHECK:STDOUT: %ExplicitGenericParam: %ExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] // CHECK:STDOUT: %CallExplicitGenericParamConst.type: type = fn_type @CallExplicitGenericParamConst [template] // CHECK:STDOUT: %CallExplicitGenericParamConst: %CallExplicitGenericParamConst.type = struct_value () [template] // CHECK:STDOUT: %CallExplicitGenericParamNonConst.type: type = fn_type @CallExplicitGenericParamNonConst [template] @@ -406,15 +406,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ExplicitGenericParam.decl: %ExplicitGenericParam.type = fn_decl @ExplicitGenericParam [template = constants.%ExplicitGenericParam] { // CHECK:STDOUT: %T.patt.loc4_25.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_25.1, runtime_param [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.patt: @ExplicitGenericParam.%.loc4_39.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @ExplicitGenericParam.%.loc4_39.2 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_39.1: type = ptr_type %T [symbolic = %.loc4_39.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_39.1: type = ptr_type %T [symbolic = %ptr.loc4_39.2 (constants.%ptr)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%.loc4_39.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%.loc4_39.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamConst.decl: %CallExplicitGenericParamConst.type = fn_decl @CallExplicitGenericParamConst [template = constants.%CallExplicitGenericParamConst] { // CHECK:STDOUT: %T.patt.loc6_34.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_34.2 (constants.%T.patt)] @@ -435,19 +435,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_25.1: type) { // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_25.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_39.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %ptr.loc4_39.2 (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.2)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%.loc4_39.2 (%.1) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.2)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%.loc4_39.2 (%.1) = call %.loc4_50.1() -// CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%.loc4_39.2 (%.1) = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%.loc4_39.2 (%.1) = converted %ExplicitGenericParam.call, %.loc4_73.1 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = call %ExplicitGenericParam.specific_fn.loc4_50.1() +// CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%ptr.loc4_39.2 (%ptr) = converted %ExplicitGenericParam.call, %.loc4_73.1 // CHECK:STDOUT: return %.loc4_73.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -457,15 +457,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt.loc6_34.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_34.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_34.2) [symbolic = %.loc7_3.2 (constants.%.2)] -// CHECK:STDOUT: %.loc7_25: type = ptr_type @CallExplicitGenericParamConst.%T.loc6_34.2 (%T) [symbolic = %.loc7_25 (constants.%.1)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_34.2) [symbolic = %ExplicitGenericParam.specific_fn.loc7_3.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %ptr: type = ptr_type @CallExplicitGenericParamConst.%T.loc6_34.2 (%T) [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_34.1 [symbolic = %T.loc6_34.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc7_3.2 (constants.%.2)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%.loc7_25 (%.1) = call %.loc7_3.1() +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc7_3.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%ptr (%ptr) = call %ExplicitGenericParam.specific_fn.loc7_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -480,16 +480,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%T) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_39.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.2 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_39.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamConst(constants.%T) { @@ -500,26 +500,26 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamConst.%T.loc6_34.2) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_39.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- explicit_vs_deduced.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.type: type = fn_type @ExplicitAndAlsoDeduced [template] // CHECK:STDOUT: %ExplicitAndAlsoDeduced: %ExplicitAndAlsoDeduced.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %A [template] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.1: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %A [template] // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.type: type = fn_type @CallExplicitAndAlsoDeduced [template] // CHECK:STDOUT: %CallExplicitAndAlsoDeduced: %CallExplicitAndAlsoDeduced.type = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [template] -// CHECK:STDOUT: %struct: %A = struct_value () [template] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.2: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [template] +// CHECK:STDOUT: %A.val: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -543,98 +543,98 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_27.1, runtime_param [symbolic = %T.patt.loc6_27.2 (constants.%T.patt)] // CHECK:STDOUT: %x.patt: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_47.1: type = ptr_type %T [symbolic = %.loc6_47.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T [symbolic = %ptr.loc6_47.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.decl: %CallExplicitAndAlsoDeduced.type = fn_decl @CallExplicitAndAlsoDeduced [template = constants.%CallExplicitAndAlsoDeduced] { -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref.loc10: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc10_37: type = ptr_type %A [template = constants.%.5] -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.2] +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @ExplicitAndAlsoDeduced(%T.loc6_27.1: type) { // CHECK:STDOUT: %T.loc6_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc6_27.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_27.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_47.2: type = ptr_type @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) [symbolic = %.loc6_47.2 (constants.%.3)] +// CHECK:STDOUT: %ptr.loc6_47.2: type = ptr_type @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) [symbolic = %ptr.loc6_47.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.2) [symbolic = %.loc7_10.2 (constants.%.4)] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.2) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T)) -> @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) { +// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T)) -> @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [template = constants.%ExplicitAndAlsoDeduced] // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %.loc7_10.2 (constants.%.4)] -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = call %.loc7_10.1(%x.ref) -// CHECK:STDOUT: %.loc7_38.1: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = value_of_initializer %ExplicitAndAlsoDeduced.call -// CHECK:STDOUT: %.loc7_38.2: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = converted %ExplicitAndAlsoDeduced.call, %.loc7_38.1 +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.1)] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) +// CHECK:STDOUT: %.loc7_38.1: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = value_of_initializer %ExplicitAndAlsoDeduced.call +// CHECK:STDOUT: %.loc7_38.2: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = converted %ExplicitAndAlsoDeduced.call, %.loc7_38.1 // CHECK:STDOUT: return %.loc7_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> %.5 { +// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> %ptr.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [template = constants.%ExplicitAndAlsoDeduced] // CHECK:STDOUT: %A.ref.loc11: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc11_37.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_10: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%A) [template = constants.%.6] +// CHECK:STDOUT: %.loc11_37.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%A) [template = constants.%ExplicitAndAlsoDeduced.specific_fn.2] // CHECK:STDOUT: %.loc11_37.2: ref %A = temporary_storage -// CHECK:STDOUT: %.loc11_37.3: init %A = class_init (), %.loc11_37.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_37.3: init %A = class_init (), %.loc11_37.2 [template = constants.%A.val] // CHECK:STDOUT: %.loc11_37.4: ref %A = temporary %.loc11_37.2, %.loc11_37.3 // CHECK:STDOUT: %.loc11_37.5: ref %A = converted %.loc11_37.1, %.loc11_37.4 // CHECK:STDOUT: %.loc11_37.6: %A = bind_value %.loc11_37.5 -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %.5 = call %.loc11_10(%.loc11_37.6) -// CHECK:STDOUT: %.loc11_39.1: %.5 = value_of_initializer %ExplicitAndAlsoDeduced.call -// CHECK:STDOUT: %.loc11_39.2: %.5 = converted %ExplicitAndAlsoDeduced.call, %.loc11_39.1 +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %ptr.2 = call %ExplicitAndAlsoDeduced.specific_fn(%.loc11_37.6) +// CHECK:STDOUT: %.loc11_39.1: %ptr.2 = value_of_initializer %ExplicitAndAlsoDeduced.call +// CHECK:STDOUT: %.loc11_39.2: %ptr.2 = converted %ExplicitAndAlsoDeduced.call, %.loc11_39.1 // CHECK:STDOUT: return %.loc11_39.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%T) { // CHECK:STDOUT: %T.loc6_27.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_27.2 => constants.%T -// CHECK:STDOUT: %.loc6_47.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_47.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.4 +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(%T.loc6_27.2) { // CHECK:STDOUT: %T.loc6_27.2 => constants.%T // CHECK:STDOUT: %T.patt.loc6_27.2 => constants.%T -// CHECK:STDOUT: %.loc6_47.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc6_47.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) { // CHECK:STDOUT: %T.loc6_27.2 => constants.%A // CHECK:STDOUT: %T.patt.loc6_27.2 => constants.%A -// CHECK:STDOUT: %.loc6_47.2 => constants.%.5 +// CHECK:STDOUT: %ptr.loc6_47.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.6 +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_implicit.carbon @@ -642,18 +642,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ImplicitGenericParam.type: type = fn_type @ImplicitGenericParam [template] // CHECK:STDOUT: %ImplicitGenericParam: %ImplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%T) [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.1: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %CallImplicitGenericParam.type: type = fn_type @CallImplicitGenericParam [template] // CHECK:STDOUT: %CallImplicitGenericParam: %CallImplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%i32) [template] +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.2: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -676,94 +676,94 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_25.1, runtime_param [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: %x.patt: @ImplicitGenericParam.%T.loc4_25.2 (%T) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @ImplicitGenericParam.%T.loc4_25.2 (%T) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @ImplicitGenericParam.%.loc4_45.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @ImplicitGenericParam.%.loc4_45.2 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_45.1: type = ptr_type %T [symbolic = %.loc4_45.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_45.1: type = ptr_type %T [symbolic = %ptr.loc4_45.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitGenericParam.%T.loc4_25.2 (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @ImplicitGenericParam.%T.loc4_25.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%.loc4_45.2 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @ImplicitGenericParam.%.loc4_45.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallImplicitGenericParam.decl: %CallImplicitGenericParam.type = fn_decl @CallImplicitGenericParam [template = constants.%CallImplicitGenericParam] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_32.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc6_32: init type = call constants.%Int(%.loc6_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_32.2: type = value_of_initializer %int.make_type_signed.loc6_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_32.3: type = converted %int.make_type_signed.loc6_32, %.loc6_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%.loc6_40) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_32: init type = call constants.%Int(%int_32.loc6_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_signed.loc6_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_signed.loc6_32, %.loc6_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%int_32.loc6_40) [template = constants.%i32] // CHECK:STDOUT: %.loc6_43.1: type = value_of_initializer %int.make_type_signed.loc6_40 [template = constants.%i32] // CHECK:STDOUT: %.loc6_43.2: type = converted %int.make_type_signed.loc6_40, %.loc6_43.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.3: type = ptr_type %i32 [template = constants.%.4] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @ImplicitGenericParam(%T.loc4_25.1: type) { // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_25.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_45.2: type = ptr_type @ImplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_45.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_45.2: type = ptr_type @ImplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %ptr.loc4_45.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_56.2 (constants.%.2)] +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_25.2) [symbolic = %ImplicitGenericParam.specific_fn.loc4_56.2 (constants.%ImplicitGenericParam.specific_fn.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @ImplicitGenericParam.%T.loc4_25.2 (%T)) -> @ImplicitGenericParam.%.loc4_45.2 (%.1) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @ImplicitGenericParam.%T.loc4_25.2 (%T)) -> @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [template = constants.%ImplicitGenericParam] // CHECK:STDOUT: %x.ref: @ImplicitGenericParam.%T.loc4_25.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc4_56.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %.loc4_56.2 (constants.%.2)] -// CHECK:STDOUT: %ImplicitGenericParam.call: init @ImplicitGenericParam.%.loc4_45.2 (%.1) = call %.loc4_56.1(%x.ref) -// CHECK:STDOUT: %.loc4_79.1: @ImplicitGenericParam.%.loc4_45.2 (%.1) = value_of_initializer %ImplicitGenericParam.call -// CHECK:STDOUT: %.loc4_79.2: @ImplicitGenericParam.%.loc4_45.2 (%.1) = converted %ImplicitGenericParam.call, %.loc4_79.1 +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %ImplicitGenericParam.specific_fn.loc4_56.2 (constants.%ImplicitGenericParam.specific_fn.1)] +// CHECK:STDOUT: %ImplicitGenericParam.call: init @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = call %ImplicitGenericParam.specific_fn.loc4_56.1(%x.ref) +// CHECK:STDOUT: %.loc4_79.1: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = value_of_initializer %ImplicitGenericParam.call +// CHECK:STDOUT: %.loc4_79.2: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = converted %ImplicitGenericParam.call, %.loc4_79.1 // CHECK:STDOUT: return %.loc4_79.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param_patt: %i32) -> %.4 { +// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param_patt: %i32) -> %ptr.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [template = constants.%ImplicitGenericParam] // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc7_10: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%i32) [template = constants.%.5] -// CHECK:STDOUT: %ImplicitGenericParam.call: init %.4 = call %.loc7_10(%n.ref) -// CHECK:STDOUT: %.loc7_33.1: %.4 = value_of_initializer %ImplicitGenericParam.call -// CHECK:STDOUT: %.loc7_33.2: %.4 = converted %ImplicitGenericParam.call, %.loc7_33.1 +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%i32) [template = constants.%ImplicitGenericParam.specific_fn.2] +// CHECK:STDOUT: %ImplicitGenericParam.call: init %ptr.2 = call %ImplicitGenericParam.specific_fn(%n.ref) +// CHECK:STDOUT: %.loc7_33.1: %ptr.2 = value_of_initializer %ImplicitGenericParam.call +// CHECK:STDOUT: %.loc7_33.2: %ptr.2 = converted %ImplicitGenericParam.call, %.loc7_33.1 // CHECK:STDOUT: return %.loc7_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%T) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_45.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_45.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2 => constants.%.2 +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(%T.loc4_25.2) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_45.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_45.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%i32) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%i32 // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%i32 -// CHECK:STDOUT: %.loc4_45.2 => constants.%.4 +// CHECK:STDOUT: %ptr.loc4_45.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2 => constants.%.5 +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_nested_tuple.carbon @@ -771,30 +771,30 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %i32) [symbolic] // CHECK:STDOUT: %TupleParam.type: type = fn_type @TupleParam [template] // CHECK:STDOUT: %TupleParam: %TupleParam.type = struct_value () [template] // CHECK:STDOUT: %CallTupleParam.type: type = fn_type @CallTupleParam [template] // CHECK:STDOUT: %CallTupleParam: %CallTupleParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (Core.IntLiteral, %i32) [template] -// CHECK:STDOUT: %.5: = specific_function %TupleParam, @TupleParam(Core.IntLiteral) [template] +// CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam, @TupleParam(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.3, %.33) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%int_1, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -820,8 +820,8 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.param_patt: @TupleParam.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %int.make_type_signed) // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_signed, %.loc4_35.2 [template = constants.%i32] @@ -850,19 +850,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallTupleParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TupleParam.ref: %TupleParam.type = name_ref TupleParam, file.%TupleParam.decl [template = constants.%TupleParam] -// CHECK:STDOUT: %.loc7_15: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%.loc7_15, %.loc7_18) -// CHECK:STDOUT: %.loc7_3: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [template = constants.%.5] -// CHECK:STDOUT: %.loc7_19.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_19.3: = bound_method %.loc7_18, %.loc7_19.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_19.4: = specific_function %.loc7_19.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_19.4(%.loc7_18) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_19.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc7_19.6: %i32 = converted %.loc7_18, %.loc7_19.5 [template = constants.%.33] -// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.loc7_15, %.loc7_19.6) [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_19.7: %tuple.type.4 = converted %.loc7_19.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %TupleParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_19.7) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [template = constants.%TupleParam.specific_fn] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc7_19.2: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc7_19.3: %i32 = converted %int_2, %.loc7_19.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%int_1, %.loc7_19.3) [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.4: %tuple.type.4 = converted %.loc7_19.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %TupleParam.call: init %empty_tuple.type = call %TupleParam.specific_fn(%.loc7_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -885,29 +885,29 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %T, .b: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %T, .b: %i32} [symbolic] // CHECK:STDOUT: %StructParam.type: type = fn_type @StructParam [template] // CHECK:STDOUT: %StructParam: %StructParam.type = struct_value () [template] // CHECK:STDOUT: %CallStructParam.type: type = fn_type @CallStructParam [template] // CHECK:STDOUT: %CallStructParam: %CallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: Core.IntLiteral, .b: %i32} [template] -// CHECK:STDOUT: %.8: = specific_function %StructParam, @StructParam(Core.IntLiteral) [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct_type.a.b.3: type = struct_type {.a: Core.IntLiteral, .b: %i32} [template] +// CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam, @StructParam(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.7 = struct_value (%.4, %.36) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.3 = struct_value (%int_1, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -929,19 +929,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %StructParam.decl: %StructParam.type = fn_decl @StructParam [template = constants.%StructParam] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @StructParam.%.loc4_44.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @StructParam.%.loc4_44.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_41.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_41.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_41.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_41.3: type = converted %int.make_type_signed, %.loc4_41.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %.loc4_44.2 (constants.%.2)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_41.2: type = converted %int.make_type_signed, %.loc4_41.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @StructParam.%.loc4_44.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @StructParam.%.loc4_44.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [template = constants.%CallStructParam] {} {} // CHECK:STDOUT: } @@ -949,11 +949,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @StructParam(%T.loc4_16.1: type) { // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: %i32} [symbolic = %.loc4_44.2 (constants.%.2)] +// CHECK:STDOUT: %struct_type.a.b.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @StructParam.%.loc4_44.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -962,32 +962,32 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %StructParam.ref: %StructParam.type = name_ref StructParam, file.%StructParam.decl [template = constants.%StructParam] -// CHECK:STDOUT: %.loc7_21: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc7_29: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_30.1: %.6 = struct_literal (%.loc7_21, %.loc7_29) -// CHECK:STDOUT: %.loc7_3: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [template = constants.%.8] -// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_29, %.loc7_30.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_30.4(%.loc7_29) [template = constants.%.36] -// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.36] -// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_29, %.loc7_30.5 [template = constants.%.36] -// CHECK:STDOUT: %struct: %.7 = struct_value (%.loc7_21, %.loc7_30.6) [template = constants.%struct] -// CHECK:STDOUT: %.loc7_30.7: %.7 = converted %.loc7_30.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %StructParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_30.7) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [template = constants.%StructParam.specific_fn] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc7_30.2: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc7_30.3: %i32 = converted %int_2, %.loc7_30.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %struct: %struct_type.a.b.3 = struct_value (%int_1, %.loc7_30.3) [template = constants.%struct] +// CHECK:STDOUT: %.loc7_30.4: %struct_type.a.b.3 = converted %.loc7_30.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %StructParam.call: init %empty_tuple.type = call %StructParam.specific_fn(%.loc7_30.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_16.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T -// CHECK:STDOUT: %.loc4_44.2 => constants.%.2 +// CHECK:STDOUT: %struct_type.a.b.loc4_44.2 => constants.%struct_type.a.b.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StructParam(Core.IntLiteral) { // CHECK:STDOUT: %T.loc4_16.2 => Core.IntLiteral // CHECK:STDOUT: %T.patt.loc4_16.2 => Core.IntLiteral -// CHECK:STDOUT: %.loc4_44.2 => constants.%.7 +// CHECK:STDOUT: %struct_type.a.b.loc4_44.2 => constants.%struct_type.a.b.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -997,18 +997,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.c.d.e: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic] // CHECK:STDOUT: %BigStructParam.type: type = fn_type @BigStructParam [template] // CHECK:STDOUT: %BigStructParam: %BigStructParam.type = struct_value () [template] // CHECK:STDOUT: %CallBigStructParam.type: type = fn_type @CallBigStructParam [template] // CHECK:STDOUT: %CallBigStructParam: %CallBigStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.6: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1029,23 +1029,23 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %BigStructParam.decl: %BigStructParam.type = fn_decl @BigStructParam [template = constants.%BigStructParam] { // CHECK:STDOUT: %T.patt.loc4_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_19.1, runtime_param [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @BigStructParam.%.loc4_56.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @BigStructParam.%.loc4_56.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_44.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_44: init type = call constants.%Int(%.loc4_44.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_44.2: type = value_of_initializer %int.make_type_signed.loc4_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_44.3: type = converted %int.make_type_signed.loc4_44, %.loc4_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_53: init type = call constants.%Int(%.loc4_53.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.2: type = value_of_initializer %int.make_type_signed.loc4_53 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.3: type = converted %int.make_type_signed.loc4_53, %.loc4_53.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %.loc4_56.2 (constants.%.2)] +// CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_44: init type = call constants.%Int(%int_32.loc4_44) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_44.1: type = value_of_initializer %int.make_type_signed.loc4_44 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_44.2: type = converted %int.make_type_signed.loc4_44, %.loc4_44.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_53: init type = call constants.%Int(%int_32.loc4_53) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_53.1: type = value_of_initializer %int.make_type_signed.loc4_53 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_53.2: type = converted %int.make_type_signed.loc4_53, %.loc4_53.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @BigStructParam.%.loc4_56.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @BigStructParam.%.loc4_56.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param runtime_param0 +// CHECK:STDOUT: %x: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallBigStructParam.decl: %CallBigStructParam.type = fn_decl @CallBigStructParam [template = constants.%CallBigStructParam] {} {} // CHECK:STDOUT: } @@ -1053,11 +1053,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @BigStructParam(%T.loc4_19.1: type) { // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_56.2: type = struct_type {.c: @BigStructParam.%T.loc4_19.2 (%T), .d: %i32, .e: %i32} [symbolic = %.loc4_56.2 (constants.%.2)] +// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.2: type = struct_type {.c: @BigStructParam.%T.loc4_19.2 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @BigStructParam.%.loc4_56.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1066,16 +1066,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallBigStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %BigStructParam.ref: %BigStructParam.type = name_ref BigStructParam, file.%BigStructParam.decl [template = constants.%BigStructParam] -// CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_32: Core.IntLiteral = int_value 4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_33: %.6 = struct_literal (%.loc14_24, %.loc14_32) +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc14: %struct_type.c.d = struct_literal (%int_3, %int_4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @BigStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_19.2 => constants.%T -// CHECK:STDOUT: %.loc4_56.2 => constants.%.2 +// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.2 => constants.%struct_type.c.d.e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_smaller_struct.carbon @@ -1083,19 +1083,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.f: %T, .g: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.f.g: type = struct_type {.f: %T, .g: %i32} [symbolic] // CHECK:STDOUT: %SmallStructParam.type: type = fn_type @SmallStructParam [template] // CHECK:STDOUT: %SmallStructParam: %SmallStructParam.type = struct_value () [template] // CHECK:STDOUT: %CallSmallStructParam.type: type = fn_type @CallSmallStructParam [template] // CHECK:STDOUT: %CallSmallStructParam: %CallSmallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.7: type = struct_type {.f: Core.IntLiteral, .g: Core.IntLiteral, .h: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %struct_type.f.g.h: type = struct_type {.f: Core.IntLiteral, .g: Core.IntLiteral, .h: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1116,19 +1116,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %SmallStructParam.decl: %SmallStructParam.type = fn_decl @SmallStructParam [template = constants.%SmallStructParam] { // CHECK:STDOUT: %T.patt.loc4_21.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_21.1, runtime_param [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @SmallStructParam.%.loc4_49.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @SmallStructParam.%.loc4_49.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_46.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_46.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_46.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_46.3: type = converted %int.make_type_signed, %.loc4_46.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %.loc4_49.2 (constants.%.2)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_46.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_46.2: type = converted %int.make_type_signed, %.loc4_46.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_21.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @SmallStructParam.%.loc4_49.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @SmallStructParam.%.loc4_49.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param runtime_param0 +// CHECK:STDOUT: %x: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallSmallStructParam.decl: %CallSmallStructParam.type = fn_decl @CallSmallStructParam [template = constants.%CallSmallStructParam] {} {} // CHECK:STDOUT: } @@ -1136,11 +1136,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @SmallStructParam(%T.loc4_21.1: type) { // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_21.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_49.2: type = struct_type {.f: @SmallStructParam.%T.loc4_21.2 (%T), .g: %i32} [symbolic = %.loc4_49.2 (constants.%.2)] +// CHECK:STDOUT: %struct_type.f.g.loc4_49.2: type = struct_type {.f: @SmallStructParam.%T.loc4_21.2 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @SmallStructParam.%.loc4_49.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1149,17 +1149,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallSmallStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %SmallStructParam.ref: %SmallStructParam.type = name_ref SmallStructParam, file.%SmallStructParam.decl [template = constants.%SmallStructParam] -// CHECK:STDOUT: %.loc14_26: Core.IntLiteral = int_value 5 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 6 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_42: Core.IntLiteral = int_value 7 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_43: %.7 = struct_literal (%.loc14_26, %.loc14_34, %.loc14_42) +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc14: %struct_type.f.g.h = struct_literal (%int_5, %int_6, %int_7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SmallStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_21.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_21.2 => constants.%T -// CHECK:STDOUT: %.loc4_49.2 => constants.%.2 +// CHECK:STDOUT: %struct_type.f.g.loc4_49.2 => constants.%struct_type.f.g // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_struct_wrong_name.carbon @@ -1167,18 +1167,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.i: %T, .different: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.i.different: type = struct_type {.i: %T, .different: %i32} [symbolic] // CHECK:STDOUT: %WrongNameStructParam.type: type = fn_type @WrongNameStructParam [template] // CHECK:STDOUT: %WrongNameStructParam: %WrongNameStructParam.type = struct_value () [template] // CHECK:STDOUT: %CallWrongNameStructParam.type: type = fn_type @CallWrongNameStructParam [template] // CHECK:STDOUT: %CallWrongNameStructParam: %CallWrongNameStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %.6: type = struct_type {.i: Core.IntLiteral, .j: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %struct_type.i.j: type = struct_type {.i: Core.IntLiteral, .j: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1199,19 +1199,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %WrongNameStructParam.decl: %WrongNameStructParam.type = fn_decl @WrongNameStructParam [template = constants.%WrongNameStructParam] { // CHECK:STDOUT: %T.patt.loc4_25.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_25.1, runtime_param [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @WrongNameStructParam.%.loc4_61.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_58.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_58.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_58.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_58.3: type = converted %int.make_type_signed, %.loc4_58.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %.loc4_61.2 (constants.%.2)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_58.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_58.2: type = converted %int.make_type_signed, %.loc4_58.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongNameStructParam.%.loc4_61.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @WrongNameStructParam.%.loc4_61.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param runtime_param0 +// CHECK:STDOUT: %x: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongNameStructParam.decl: %CallWrongNameStructParam.type = fn_decl @CallWrongNameStructParam [template = constants.%CallWrongNameStructParam] {} {} // CHECK:STDOUT: } @@ -1219,11 +1219,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @WrongNameStructParam(%T.loc4_25.1: type) { // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_25.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_61.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_25.2 (%T), .different: %i32} [symbolic = %.loc4_61.2 (constants.%.2)] +// CHECK:STDOUT: %struct_type.i.different.loc4_61.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_25.2 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1232,16 +1232,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallWrongNameStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WrongNameStructParam.ref: %WrongNameStructParam.type = name_ref WrongNameStructParam, file.%WrongNameStructParam.decl [template = constants.%WrongNameStructParam] -// CHECK:STDOUT: %.loc14_30: Core.IntLiteral = int_value 8 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_38: Core.IntLiteral = int_value 9 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_39: %.6 = struct_literal (%.loc14_30, %.loc14_38) +// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9] +// CHECK:STDOUT: %.loc14: %struct_type.i.j = struct_literal (%int_8, %int_9) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WrongNameStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_61.2 => constants.%.2 +// CHECK:STDOUT: %struct_type.i.different.loc4_61.2 => constants.%struct_type.i.different // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_deduce_struct_wrong_order.carbon @@ -1249,18 +1249,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.first: %T, .second: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.first.second: type = struct_type {.first: %T, .second: %i32} [symbolic] // CHECK:STDOUT: %WrongOrderStructParam.type: type = fn_type @WrongOrderStructParam [template] // CHECK:STDOUT: %WrongOrderStructParam: %WrongOrderStructParam.type = struct_value () [template] // CHECK:STDOUT: %CallWrongOrderStructParam.type: type = fn_type @CallWrongOrderStructParam [template] // CHECK:STDOUT: %CallWrongOrderStructParam: %CallWrongOrderStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 11 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.6: type = struct_type {.second: Core.IntLiteral, .first: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [template] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %struct_type.second.first: type = struct_type {.second: Core.IntLiteral, .first: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1281,19 +1281,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %WrongOrderStructParam.decl: %WrongOrderStructParam.type = fn_decl @WrongOrderStructParam [template = constants.%WrongOrderStructParam] { // CHECK:STDOUT: %T.patt.loc4_26.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_26.1, runtime_param [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%.loc4_63.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_60.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_60.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_60.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_60.3: type = converted %int.make_type_signed, %.loc4_60.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %.loc4_63.2 (constants.%.2)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_60.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_60.2: type = converted %int.make_type_signed, %.loc4_60.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_26.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%.loc4_63.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @WrongOrderStructParam.%.loc4_63.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param runtime_param0 +// CHECK:STDOUT: %x: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongOrderStructParam.decl: %CallWrongOrderStructParam.type = fn_decl @CallWrongOrderStructParam [template = constants.%CallWrongOrderStructParam] {} {} // CHECK:STDOUT: } @@ -1301,11 +1301,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @WrongOrderStructParam(%T.loc4_26.1: type) { // CHECK:STDOUT: %T.loc4_26.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_26.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_26.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_63.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_26.2 (%T), .second: %i32} [symbolic = %.loc4_63.2 (constants.%.2)] +// CHECK:STDOUT: %struct_type.first.second.loc4_63.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_26.2 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1314,16 +1314,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallWrongOrderStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WrongOrderStructParam.ref: %WrongOrderStructParam.type = name_ref WrongOrderStructParam, file.%WrongOrderStructParam.decl [template = constants.%WrongOrderStructParam] -// CHECK:STDOUT: %.loc14_36: Core.IntLiteral = int_value 11 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_49: Core.IntLiteral = int_value 10 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_51: %.6 = struct_literal (%.loc14_36, %.loc14_49) +// CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [template = constants.%int_11] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] +// CHECK:STDOUT: %.loc14: %struct_type.second.first = struct_literal (%int_11, %int_10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WrongOrderStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_26.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T -// CHECK:STDOUT: %.loc4_63.2 => constants.%.2 +// CHECK:STDOUT: %struct_type.first.second.loc4_63.2 => constants.%struct_type.first.second // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_incomplete.carbon @@ -1337,7 +1337,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template] // CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template] // CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1390,7 +1390,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible] -// CHECK:STDOUT: %.loc16: Core.IntLiteral = int_value 42 [template = constants.%.1] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1410,9 +1410,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template] // CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template] // CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1464,9 +1464,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible] -// CHECK:STDOUT: %.loc13_24: Core.IntLiteral = int_value 42 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_34: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_36: %.3 = struct_literal (%.loc13_34) +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12] +// CHECK:STDOUT: %.loc13: %struct_type.x = struct_literal (%int_12) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index 71e37b25842ef..1742887fb232a 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 @@ -16,19 +16,19 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: --- fail_todo_param_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.1) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.24: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.4(%.1) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.25(%N.1) [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -54,23 +54,23 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed.loc14_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed.loc14_10, %.loc14_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%.loc14_19.1) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%int_32.loc14_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14_10, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%int_32.loc14_19) [template = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_signed.loc14_19, %.loc14_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc14_24.2: = bound_method %N.ref, %.loc14_24.1 [symbolic = %.loc14_24.6 (constants.%.24)] -// CHECK:STDOUT: %.loc14_24.3: = specific_function %.loc14_24.2, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.25)] -// CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %.loc14_24.3(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_24.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_24.5: Core.IntLiteral = converted %N.ref, %.loc14_24.4 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_25: type = array_type %.loc14_24.5, %i32 [template = ] -// CHECK:STDOUT: %.loc14_26: type = ptr_type [template = ] +// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14_19, %.loc14_19.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %Convert.bound.loc14_24.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: = specific_function %Convert.bound.loc14_24.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.1(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc14_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_6.2 (constants.%N.1)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 @@ -81,9 +81,9 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: generic fn @F(%N.loc14_6.1: %i32) { // CHECK:STDOUT: %N.loc14_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc14_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc14_24.6: = bound_method %N.loc14_6.2, constants.%Convert.13 [symbolic = %.loc14_24.6 (constants.%.24)] -// CHECK:STDOUT: %.loc14_24.7: = specific_function %.loc14_24.6, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.25)] -// CHECK:STDOUT: %int.convert_checked.loc14_24.2: init Core.IntLiteral = call %.loc14_24.7(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound.loc14_24.2: = bound_method %N.loc14_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc14_24.2: = specific_function %Convert.bound.loc14_24.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %int.convert_checked.loc14_24.2: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.2(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32, %a.param_patt: ); // CHECK:STDOUT: } @@ -91,8 +91,8 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc14_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc14_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc14_24.6 => constants.%.24 -// CHECK:STDOUT: %.loc14_24.7 => constants.%.25 +// CHECK:STDOUT: %Convert.bound.loc14_24.2 => constants.%Convert.bound +// CHECK:STDOUT: %Convert.specific_fn.loc14_24.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc14_24.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/call.carbon b/toolchain/check/testdata/function/generic/no_prelude/call.carbon index 9e57a62e7ed4c..6eb1d3b083228 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/call.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/call.carbon @@ -61,17 +61,17 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.1: = specific_function %Function, @Function(%T) [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %Function.specific_fn.1: = specific_function %Function, @Function(%T) [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] // CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] -// CHECK:STDOUT: %.3: = specific_function %Function, @Function(%.2) [symbolic] +// CHECK:STDOUT: %Function.specific_fn.2: = specific_function %Function, @Function(%ptr.1) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %Function, @Function(%C) [template] +// CHECK:STDOUT: %Function.specific_fn.3: = specific_function %Function, @Function(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,21 +119,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { // CHECK:STDOUT: %T.patt.loc12_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_19.1, runtime_param [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.2) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.2) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot %return.param +// CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { @@ -152,11 +152,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Function(%T.loc4_13.1: type) { @@ -177,15 +177,15 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T.patt.loc8_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.1)] +// CHECK:STDOUT: %Function.specific_fn.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %Function.specific_fn.loc9_10.2 (constants.%Function.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGeneric.%T.loc8_16.2 (%T)) -> @CallGeneric.%T.loc8_16.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x.ref: @CallGeneric.%T.loc8_16.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.1)] -// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %.loc9_10.1(%x.ref) +// CHECK:STDOUT: %Function.specific_fn.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %Function.specific_fn.loc9_10.2 (constants.%Function.specific_fn.1)] +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %Function.specific_fn.loc9_10.1(%x.ref) // CHECK:STDOUT: %.loc9_24.1: @CallGeneric.%T.loc8_16.2 (%T) = value_of_initializer %Function.call // CHECK:STDOUT: %.loc9_24.2: @CallGeneric.%T.loc8_16.2 (%T) = converted %Function.call, %.loc9_24.1 // CHECK:STDOUT: return %.loc9_24.2 @@ -195,21 +195,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12_19.1: type) { // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc12_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.3)] +// CHECK:STDOUT: %Function.specific_fn.loc13_10.2: = specific_function constants.%Function, @Function(%ptr.loc12_33.2) [symbolic = %Function.specific_fn.loc13_10.2 (constants.%Function.specific_fn.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2)) -> @CallGenericPtr.%.loc12_33.2 (%.2) { +// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1)) -> @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_20: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.2) = name_ref x, %x -// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.2) [symbolic = %.loc13_10.2 (constants.%.3)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.2) = call %.loc13_10.1(%x.ref) -// CHECK:STDOUT: %.loc13_25.1: @CallGenericPtr.%.loc12_33.2 (%.2) = value_of_initializer %Function.call -// CHECK:STDOUT: %.loc13_25.2: @CallGenericPtr.%.loc12_33.2 (%.2) = converted %Function.call, %.loc13_25.1 +// CHECK:STDOUT: %ptr.loc13: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = name_ref x, %x +// CHECK:STDOUT: %Function.specific_fn.loc13_10.1: = specific_function %Function.ref, @Function(constants.%ptr.1) [symbolic = %Function.specific_fn.loc13_10.2 (constants.%Function.specific_fn.2)] +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = call %Function.specific_fn.loc13_10.1(%x.ref) +// CHECK:STDOUT: %.loc13_25.1: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_25.2: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = converted %Function.call, %.loc13_25.1 // CHECK:STDOUT: return %.loc13_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -219,9 +219,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.ref: %C = name_ref x, %x -// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %Function.specific_fn: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%Function.specific_fn.3] // CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Function.call: init %C = call %.loc19(%x.ref) to %.loc18_23.2 +// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18_23.2 // CHECK:STDOUT: return %Function.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,19 +245,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc12_19.2 => constants.%T -// CHECK:STDOUT: %.loc12_33.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc12_33.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(constants.%.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: specific @Function(constants.%ptr.1) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGenericPtr.%.loc12_33.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { @@ -276,17 +276,17 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.1: = specific_function %Function, @Function(%T) [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %Function.specific_fn.1: = specific_function %Function, @Function(%T) [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] // CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] -// CHECK:STDOUT: %.3: = specific_function %Function, @Function(%.2) [symbolic] +// CHECK:STDOUT: %Function.specific_fn.2: = specific_function %Function, @Function(%ptr.1) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %Function, @Function(%C) [template] +// CHECK:STDOUT: %Function.specific_fn.3: = specific_function %Function, @Function(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -334,21 +334,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { // CHECK:STDOUT: %T.patt.loc12_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_19.1, runtime_param [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.2) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.2) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot %return.param +// CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { @@ -367,11 +367,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Function(%T.loc4_13.1: type) { @@ -392,14 +392,14 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T.patt.loc8_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.1)] +// CHECK:STDOUT: %Function.specific_fn.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %Function.specific_fn.loc9_10.2 (constants.%Function.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGeneric.%T.loc8_16.2 (%T)) -> @CallGeneric.%T.loc8_16.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %x.ref: @CallGeneric.%T.loc8_16.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.1)] -// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %.loc9_10.1(%x.ref) +// CHECK:STDOUT: %Function.specific_fn.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %Function.specific_fn.loc9_10.2 (constants.%Function.specific_fn.1)] +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %Function.specific_fn.loc9_10.1(%x.ref) // CHECK:STDOUT: %.loc9_21.1: @CallGeneric.%T.loc8_16.2 (%T) = value_of_initializer %Function.call // CHECK:STDOUT: %.loc9_21.2: @CallGeneric.%T.loc8_16.2 (%T) = converted %Function.call, %.loc9_21.1 // CHECK:STDOUT: return %.loc9_21.2 @@ -409,19 +409,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12_19.1: type) { // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc12_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.3)] +// CHECK:STDOUT: %Function.specific_fn.loc13_10.2: = specific_function constants.%Function, @Function(%ptr.loc12_33.2) [symbolic = %Function.specific_fn.loc13_10.2 (constants.%Function.specific_fn.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2)) -> @CallGenericPtr.%.loc12_33.2 (%.2) { +// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1)) -> @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.2) = name_ref x, %x -// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.2) [symbolic = %.loc13_10.2 (constants.%.3)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.2) = call %.loc13_10.1(%x.ref) -// CHECK:STDOUT: %.loc13_21.1: @CallGenericPtr.%.loc12_33.2 (%.2) = value_of_initializer %Function.call -// CHECK:STDOUT: %.loc13_21.2: @CallGenericPtr.%.loc12_33.2 (%.2) = converted %Function.call, %.loc13_21.1 +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = name_ref x, %x +// CHECK:STDOUT: %Function.specific_fn.loc13_10.1: = specific_function %Function.ref, @Function(constants.%ptr.1) [symbolic = %Function.specific_fn.loc13_10.2 (constants.%Function.specific_fn.2)] +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = call %Function.specific_fn.loc13_10.1(%x.ref) +// CHECK:STDOUT: %.loc13_21.1: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_21.2: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = converted %Function.call, %.loc13_21.1 // CHECK:STDOUT: return %.loc13_21.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -430,9 +430,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %x.ref: %C = name_ref x, %x -// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %Function.specific_fn: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%Function.specific_fn.3] // CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Function.call: init %C = call %.loc19(%x.ref) to %.loc18_23.2 +// CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18_23.2 // CHECK:STDOUT: return %Function.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -456,19 +456,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc12_19.2 => constants.%T -// CHECK:STDOUT: %.loc12_33.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc12_33.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(constants.%.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: specific @Function(constants.%ptr.1) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGenericPtr.%.loc12_33.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.1 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index bfa40d573a392..0f15fed2c8ea3 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 @@ -25,7 +25,7 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,17 +52,17 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U.patt.loc11_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc11_16.2 (constants.%U.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.1)] -// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.1) = var p -// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.1) = bind_name p, %p.var +// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)] +// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p +// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc11_16.1 [symbolic = %U.loc11_16.2 (constants.%U)] -// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.1) = name_ref p, %p -// CHECK:STDOUT: %.loc16_15: @F.%.loc12_11.2 (%.1) = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p +// CHECK:STDOUT: %.loc16_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref // CHECK:STDOUT: %.loc16_14: ref @F.%T.loc11_6.2 (%T) = deref %.loc16_15 // CHECK:STDOUT: %.loc16_16: @F.%U.loc11_16.2 (%U) = converted %.loc16_14, [template = ] // CHECK:STDOUT: %n: @F.%U.loc11_16.2 (%U) = bind_name n, diff --git a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon index 85017f7ba8bd6..a94650ab8f7db 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon @@ -44,7 +44,7 @@ fn H() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,14 +85,14 @@ fn H() { // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc8_3.2 (constants.%.1)] +// CHECK:STDOUT: %F.specific_fn.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %F.specific_fn.loc8_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc8_3.2 (constants.%.1)] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc8_3.1() +// CHECK:STDOUT: %F.specific_fn.loc8_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc8_3.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc8_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -118,8 +118,8 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] @@ -127,11 +127,11 @@ fn H() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %F.specific_fn.1: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.5: = specific_function %G, @G(%C) [template] +// CHECK:STDOUT: %F.specific_fn.2: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -152,23 +152,23 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.3] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc10() +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.1] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.2 [template = constants.%G] // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc12: = specific_function %G.ref, @G(constants.%C) [template = constants.%.5] -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc12() +// CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%C) [template = constants.%G.specific_fn] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -186,7 +186,7 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: = specific_function constants.%F, @F(%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %F.specific_fn: = specific_function constants.%F, @F(%T) [symbolic = %F.specific_fn (constants.%F.specific_fn.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type); // CHECK:STDOUT: } @@ -220,6 +220,6 @@ fn H() { // CHECK:STDOUT: %T.patt => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %F.specific_fn => constants.%F.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon index eec62e42a743f..323a5cc6f6940 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon @@ -17,8 +17,8 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -30,38 +30,38 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc11_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_6.1, runtime_param [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc11_21.2 (%.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc11_21.2 (%.2) = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%.loc11_20.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc11_20.2 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: @F.%ptr.loc11_21.2 (%ptr.2) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%ptr.loc11_21.2 (%ptr.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%ptr.loc11_20.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%ptr.loc11_20.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc11_20.1: type = ptr_type %T [symbolic = %.loc11_20.2 (constants.%.1)] -// CHECK:STDOUT: %.loc11_21.1: type = ptr_type %.1 [symbolic = %.loc11_21.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc11_20.1: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] +// CHECK:STDOUT: %ptr.loc11_21.1: type = ptr_type %ptr.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] // CHECK:STDOUT: %T.ref.loc11_27: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc11_28: type = ptr_type %T [symbolic = %.loc11_20.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc11_28: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc11_21.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc11_21.2 (%.2) = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref @F.%.loc11_20.2 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%.loc11_20.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %p.param: @F.%ptr.loc11_21.2 (%ptr.2) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%ptr.loc11_21.2 (%ptr.2) = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref @F.%ptr.loc11_20.2 (%ptr.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%ptr.loc11_20.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc11_6.1: type) { // CHECK:STDOUT: %T.loc11_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc11_20.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc11_20.2 (constants.%.1)] -// CHECK:STDOUT: %.loc11_21.2: type = ptr_type @F.%.loc11_20.2 (%.1) [symbolic = %.loc11_21.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc11_20.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] +// CHECK:STDOUT: %ptr.loc11_21.2: type = ptr_type @F.%ptr.loc11_20.2 (%ptr.1) [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %p.param_patt: @F.%.loc11_21.2 (%.2)) -> @F.%.loc11_20.2 (%.1) { +// CHECK:STDOUT: fn(%T.param_patt: type, %p.param_patt: @F.%ptr.loc11_21.2 (%ptr.2)) -> @F.%ptr.loc11_20.2 (%ptr.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: @F.%.loc11_21.2 (%.2) = name_ref p, %p -// CHECK:STDOUT: %.loc12_10.1: ref @F.%.loc11_20.2 (%.1) = deref %p.ref -// CHECK:STDOUT: %.loc12_10.2: @F.%.loc11_20.2 (%.1) = bind_value %.loc12_10.1 +// CHECK:STDOUT: %p.ref: @F.%ptr.loc11_21.2 (%ptr.2) = name_ref p, %p +// CHECK:STDOUT: %.loc12_10.1: ref @F.%ptr.loc11_20.2 (%ptr.1) = deref %p.ref +// CHECK:STDOUT: %.loc12_10.2: @F.%ptr.loc11_20.2 (%ptr.1) = bind_value %.loc12_10.1 // CHECK:STDOUT: return %.loc12_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -69,7 +69,7 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc11_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc11_6.2 => constants.%T -// CHECK:STDOUT: %.loc11_20.2 => constants.%.1 -// CHECK:STDOUT: %.loc11_21.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc11_20.2 => constants.%ptr.1 +// CHECK:STDOUT: %ptr.loc11_21.2 => constants.%ptr.2 // 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 983f324e3ef9a..44ed8f97931ba 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -20,7 +20,7 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,17 +41,17 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.1)] -// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.1) = var p -// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.1) = bind_name p, %p.var +// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)] +// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p +// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.1) = name_ref p, %p -// CHECK:STDOUT: %.loc13_15: @F.%.loc12_11.2 (%.1) = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p +// CHECK:STDOUT: %.loc13_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref // CHECK:STDOUT: %.loc13_14.1: ref @F.%T.loc11_6.2 (%T) = deref %.loc13_15 // CHECK:STDOUT: %.loc13_14.2: @F.%T.loc11_6.2 (%T) = bind_value %.loc13_14.1 // CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %.loc13_14.2 diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index cce666472d8f4..42aea209edfa6 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -94,10 +94,10 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -116,47 +116,47 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6, runtime_param [symbolic = constants.%T.patt] -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_20.1: type = ptr_type %T [symbolic = %.loc4_20.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_20.1: type = ptr_type %T [symbolic = %ptr.loc4_20.2 (constants.%ptr)] // CHECK:STDOUT: %T.param.loc4: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_6.1: type = bind_symbolic_name T, 0, %T.param.loc4 [symbolic = %T.loc4_6.2 (constants.%T)] -// CHECK:STDOUT: %return.param.loc4: ref @F.%.loc4_20.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %.loc4_16: ref @F.%.loc4_20.2 (%.1) = return_slot %return.param.loc4 +// CHECK:STDOUT: %return.param.loc4: ref @F.%ptr.loc4_20.2 (%ptr) = out_param runtime_param0 +// CHECK:STDOUT: %.loc4: ref @F.%ptr.loc4_20.2 (%ptr) = return_slot %return.param.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc6: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6, runtime_param [symbolic = constants.%T.patt] -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc6_20: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %T [symbolic = constants.%ptr] // CHECK:STDOUT: %T.param.loc6: type = value_param runtime_param // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0, %T.param.loc6 [symbolic = constants.%T] -// CHECK:STDOUT: %return.param.loc6: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param.loc6 +// CHECK:STDOUT: %return.param.loc6: ref %ptr = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %ptr = return_slot %return.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc4_6.1: type) { // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_20.2: type = ptr_type @F.%T.loc4_6.2 (%T) [symbolic = %.loc4_20.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_20.2: type = ptr_type @F.%T.loc4_6.2 (%T) [symbolic = %ptr.loc4_20.2 (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_6.2) [symbolic = %.loc7_10.2 (constants.%.2)] +// CHECK:STDOUT: %F.specific_fn.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_6.2) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> %.1 { +// CHECK:STDOUT: fn(%T.param_patt: type) -> %ptr { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [template = constants.%F] // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6 [symbolic = %T.loc4_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_10.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_10.2 (constants.%.2)] -// CHECK:STDOUT: %F.call: init @F.%.loc4_20.2 (%.1) = call %.loc7_10.1() -// CHECK:STDOUT: %.loc7_14.1: @F.%.loc4_20.2 (%.1) = value_of_initializer %F.call -// CHECK:STDOUT: %.loc7_14.2: @F.%.loc4_20.2 (%.1) = converted %F.call, %.loc7_14.1 +// CHECK:STDOUT: %F.specific_fn.loc7_10.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.call: init @F.%ptr.loc4_20.2 (%ptr) = call %F.specific_fn.loc7_10.1() +// CHECK:STDOUT: %.loc7_14.1: @F.%ptr.loc4_20.2 (%ptr) = value_of_initializer %F.call +// CHECK:STDOUT: %.loc7_14.2: @F.%ptr.loc4_20.2 (%ptr) = converted %F.call, %.loc7_14.1 // CHECK:STDOUT: return %.loc7_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -164,16 +164,16 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc4_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4 => constants.%T -// CHECK:STDOUT: %.loc4_20.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_20.2 => constants.%ptr // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.2 +// CHECK:STDOUT: %F.specific_fn.loc7_10.2 => constants.%F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(%T.loc4_6.2) { // CHECK:STDOUT: %T.loc4_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4 => constants.%T -// CHECK:STDOUT: %.loc4_20.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_20.2 => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_different_return_type.carbon @@ -183,12 +183,12 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %U [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %U [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -209,34 +209,34 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_6.1, runtime_param [symbolic = %T.patt.loc4_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc4_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc4_16.1, runtime_param [symbolic = %U.patt.loc4_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.patt: @F.%.loc4_30.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc4_30.2 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%ptr.loc4_30.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%ptr.loc4_30.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_30.1: type = ptr_type %T [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc4_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc4_16.2 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%ptr.loc4_30.2 (%ptr.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @F.%ptr.loc4_30.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc13_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_6.1, runtime_param [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc13_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_16.1, runtime_param [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%ptr.loc13_30.2 (%ptr.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.1: type = ptr_type %U [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%ptr.loc13_30.2 (%ptr.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,9 +245,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc4_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T) [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T) [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%.loc4_30.2 (%.1); +// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%ptr.loc4_30.2 (%ptr.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%T.loc13_6.1: type, %U.loc13_16.1: type) { @@ -255,11 +255,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc13_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc13_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_16.2 (%U) [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type @.1.%U.loc13_16.2 (%U) [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { +// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @.1.%ptr.loc13_30.2 (%ptr.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] @@ -272,7 +272,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2 => constants.%T // CHECK:STDOUT: %U.loc4_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc4_16.2 => constants.%U -// CHECK:STDOUT: %.loc4_30.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_30.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%T, constants.%U) { @@ -280,7 +280,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc13_30.2 => constants.%ptr.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_reorder.carbon @@ -290,16 +290,16 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T.2 [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %T.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -320,34 +320,34 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_6.1, runtime_param [symbolic = %T.patt.loc4_6.2 (constants.%T.patt.1)] // CHECK:STDOUT: %U.patt.loc4_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc4_16.1, runtime_param [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] -// CHECK:STDOUT: %return.patt: @F.%.loc4_30.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc4_30.2 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%ptr.loc4_30.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%ptr.loc4_30.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc4_30.1: type = ptr_type %T.1 [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T.1 [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_6.2 (constants.%T.1)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc4_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc4_16.2 (constants.%U.1)] -// CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%ptr.loc4_30.2 (%ptr.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @F.%ptr.loc4_30.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %U.patt.loc13_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_6.1, runtime_param [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.patt.loc13_16.1: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_16.1, runtime_param [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%ptr.loc13_30.2 (%ptr.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %T.2 [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.1: type = ptr_type %T.2 [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc13_6.2 (constants.%U.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_16.1: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%ptr.loc13_30.2 (%ptr.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -356,9 +356,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_6.2 (constants.%T.patt.1)] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.2 (constants.%U.1)] // CHECK:STDOUT: %U.patt.loc4_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] -// CHECK:STDOUT: %.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T.1) [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T.1) [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%.loc4_30.2 (%.1); +// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%ptr.loc4_30.2 (%ptr.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%U.loc13_6.1: type, %T.loc13_16.1: type) { @@ -366,11 +366,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc13_16.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%T.loc13_16.2 (%T.2) [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type @.1.%T.loc13_16.2 (%T.2) [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { +// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%ptr.loc13_30.2 (%ptr.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] @@ -383,7 +383,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2 => constants.%T.1 // CHECK:STDOUT: %U.loc4_16.2 => constants.%U.1 // CHECK:STDOUT: %U.patt.loc4_16.2 => constants.%U.1 -// CHECK:STDOUT: %.loc4_30.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_30.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%U.2, constants.%T.2) { @@ -391,7 +391,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2 => constants.%U.2 // CHECK:STDOUT: %T.loc13_16.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc13_16.2 => constants.%T.2 -// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc13_30.2 => constants.%ptr.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_rename.carbon @@ -401,16 +401,16 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %U.2 [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %U.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -431,34 +431,34 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_6.1, runtime_param [symbolic = %T.patt.loc4_6.2 (constants.%T.patt.1)] // CHECK:STDOUT: %U.patt.loc4_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc4_16.1, runtime_param [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] -// CHECK:STDOUT: %return.patt: @F.%.loc4_30.2 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc4_30.2 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%ptr.loc4_30.2 (%ptr.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%ptr.loc4_30.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc4_30.1: type = ptr_type %T.1 [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T.1 [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_6.2 (constants.%T.1)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc4_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc4_16.2 (constants.%U.1)] -// CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%ptr.loc4_30.2 (%ptr.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @F.%ptr.loc4_30.2 (%ptr.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %U.patt.loc13_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_6.1, runtime_param [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.patt.loc13_16.1: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_16.1, runtime_param [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%ptr.loc13_30.2 (%ptr.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_6.1 [symbolic = %U.loc13_6.2 (constants.%U.2)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U.2 [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.1: type = ptr_type %U.2 [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc13_6.2 (constants.%U.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_16.1: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%ptr.loc13_30.2 (%ptr.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%ptr.loc13_30.2 (%ptr.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -467,9 +467,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_6.2 (constants.%T.patt.1)] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.2 (constants.%U.1)] // CHECK:STDOUT: %U.patt.loc4_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_16.2 (constants.%U.patt.1)] -// CHECK:STDOUT: %.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T.1) [symbolic = %.loc4_30.2 (constants.%.1)] +// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type @F.%T.loc4_6.2 (%T.1) [symbolic = %ptr.loc4_30.2 (constants.%ptr.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%.loc4_30.2 (%.1); +// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @F.%ptr.loc4_30.2 (%ptr.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%U.loc13_6.1: type, %T.loc13_16.1: type) { @@ -477,11 +477,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc13_16.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_6.2 (%U.2) [symbolic = %.loc13_30.2 (constants.%.2)] +// CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type @.1.%U.loc13_6.2 (%U.2) [symbolic = %ptr.loc13_30.2 (constants.%ptr.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { +// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%ptr.loc13_30.2 (%ptr.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] @@ -494,7 +494,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc4_6.2 => constants.%T.1 // CHECK:STDOUT: %U.loc4_16.2 => constants.%U.1 // CHECK:STDOUT: %U.patt.loc4_16.2 => constants.%U.1 -// CHECK:STDOUT: %.loc4_30.2 => constants.%.1 +// CHECK:STDOUT: %ptr.loc4_30.2 => constants.%ptr.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%U.2, constants.%T.2) { @@ -502,6 +502,6 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2 => constants.%U.2 // CHECK:STDOUT: %T.loc13_16.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc13_16.2 => constants.%T.2 -// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 +// CHECK:STDOUT: %ptr.loc13_30.2 => constants.%ptr.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index d22c42c7170a5..914b6833e0b22 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -42,8 +42,8 @@ fn CallNegative() { // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template] // CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.2: = specific_function %ErrorIfNIsZero, @ErrorIfNIsZero(%.1) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %ErrorIfNIsZero.specific_fn: = specific_function %ErrorIfNIsZero, @ErrorIfNIsZero(%int_0) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,9 +103,9 @@ fn CallNegative() { // CHECK:STDOUT: fn @CallNegative() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ErrorIfNIsZero.ref: %ErrorIfNIsZero.type = name_ref ErrorIfNIsZero, file.%ErrorIfNIsZero.decl [template = constants.%ErrorIfNIsZero] -// CHECK:STDOUT: %.loc16_18: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc16_3: = specific_function %ErrorIfNIsZero.ref, @ErrorIfNIsZero(constants.%.1) [template = constants.%.2] -// CHECK:STDOUT: %ErrorIfNIsZero.call: init %empty_tuple.type = call %.loc16_3() +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %ErrorIfNIsZero.specific_fn: = specific_function %ErrorIfNIsZero.ref, @ErrorIfNIsZero(constants.%int_0) [template = constants.%ErrorIfNIsZero.specific_fn] +// CHECK:STDOUT: %ErrorIfNIsZero.call: init %empty_tuple.type = call %ErrorIfNIsZero.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,9 +114,9 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%.1) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%.1 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.1 +// CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%int_0) { +// CHECK:STDOUT: %N.loc4_19.2 => constants.%int_0 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%int_0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %iN => diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index ca830d5020a90..2f6091be41077 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -27,37 +27,37 @@ fn G() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Wrap.type: type = generic_class_type @Wrap [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %Wrap.1: %Wrap.type = struct_value () [template] -// CHECK:STDOUT: %Wrap.2: type = class_type @Wrap, @Wrap(%T) [symbolic] +// CHECK:STDOUT: %Wrap.generic: %Wrap.type = struct_value () [template] +// CHECK:STDOUT: %Wrap.1: type = class_type @Wrap, @Wrap(%T) [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Wrap(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: = specific_function %Make.1, @Make(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %Make.specific_fn.1: = specific_function %Make.1, @Make(%T) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 100 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, %i32 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C, %.6 [template] -// CHECK:STDOUT: %.9: type = struct_type {.arr: %.6} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %array_type [template] +// CHECK:STDOUT: %struct_type.arr.1: type = struct_type {.arr: %array_type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.arr.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %Wrap.3: type = class_type @Wrap, @Wrap(%i32) [template] +// CHECK:STDOUT: %Wrap.2: type = class_type @Wrap, @Wrap(%i32) [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Wrap(%i32) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: = specific_function %Make.2, @Make(%i32) [template] -// CHECK:STDOUT: %Wrap.4: type = class_type @Wrap, @Wrap(%empty_tuple.type) [template] +// CHECK:STDOUT: %Make.specific_fn.2: = specific_function %Make.2, @Make(%i32) [template] +// CHECK:STDOUT: %Wrap.3: type = class_type @Wrap, @Wrap(%empty_tuple.type) [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Wrap(%empty_tuple.type) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.13: = specific_function %Make.3, @Make(%empty_tuple.type) [template] -// CHECK:STDOUT: %Wrap.5: type = class_type @Wrap, @Wrap(%C) [template] +// CHECK:STDOUT: %Make.specific_fn.3: = specific_function %Make.3, @Make(%empty_tuple.type) [template] +// CHECK:STDOUT: %Wrap.4: type = class_type @Wrap, @Wrap(%C) [template] // CHECK:STDOUT: %Make.type.4: type = fn_type @Make, @Wrap(%C) [template] // CHECK:STDOUT: %Make.4: %Make.type.4 = struct_value () [template] -// CHECK:STDOUT: %.16: = specific_function %Make.4, @Make(%C) [template] +// CHECK:STDOUT: %Make.specific_fn.4: = specific_function %Make.4, @Make(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,7 +76,7 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [template = constants.%Wrap.1] { +// CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [template = constants.%Wrap.generic] { // CHECK:STDOUT: %T.patt.loc11_12.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_12.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_12.1, runtime_param [symbolic = %T.patt.loc11_12.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -104,29 +104,29 @@ fn G() { // CHECK:STDOUT: %return.param: ref @Make.%T (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Wrap.2 +// CHECK:STDOUT: .Self = constants.%Wrap.1 // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15_21.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_26: Core.IntLiteral = int_value 100 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_21.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_21.3: type = converted %int.make_type_signed, %.loc15_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_29: type = array_type %.loc15_26, %i32 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_18: %.8 = field_decl arr, element0 [template] -// CHECK:STDOUT: %.loc15_32: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100] +// CHECK:STDOUT: %.loc15_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_21.2: type = converted %int.make_type_signed, %.loc15_21.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %.loc15_18: %C.elem = field_decl arr, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.arr.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .arr = %.loc15_18 -// CHECK:STDOUT: complete_type_witness = %.loc15_32 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make(@Wrap.%T.loc11_12.1: type) { @@ -135,14 +135,14 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Wrap(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Make.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc12_27.3: = specific_function %Make, @Make(%T) [symbolic = %.loc12_27.3 (constants.%.3)] +// CHECK:STDOUT: %Make.specific_fn.loc12_27.2: = specific_function %Make, @Make(%T) [symbolic = %Make.specific_fn.loc12_27.2 (constants.%Make.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.%T (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_27.1: @Make.%Make.type (%Make.type.1) = specific_constant @Wrap.%Make.decl, @Wrap(constants.%T) [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %Make.ref: @Make.%Make.type (%Make.type.1) = name_ref Make, %.loc12_27.1 [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc12_27.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc12_27.3 (constants.%.3)] -// CHECK:STDOUT: %Make.call: init @Make.%T (%T) = call %.loc12_27.2() +// CHECK:STDOUT: %.loc12_27: @Make.%Make.type (%Make.type.1) = specific_constant @Wrap.%Make.decl, @Wrap(constants.%T) [symbolic = %Make (constants.%Make.1)] +// CHECK:STDOUT: %Make.ref: @Make.%Make.type (%Make.type.1) = name_ref Make, %.loc12_27 [symbolic = %Make (constants.%Make.1)] +// CHECK:STDOUT: %Make.specific_fn.loc12_27.1: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc12_27.2 (constants.%Make.specific_fn.1)] +// CHECK:STDOUT: %Make.call: init @Make.%T (%T) = call %Make.specific_fn.loc12_27.1() // CHECK:STDOUT: %.loc12_33.1: @Make.%T (%T) = value_of_initializer %Make.call // CHECK:STDOUT: %.loc12_33.2: @Make.%T (%T) = converted %Make.call, %.loc12_33.1 // CHECK:STDOUT: return %.loc12_33.2 @@ -151,47 +151,47 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_10.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc18_10: init type = call constants.%Int(%.loc18_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.2: type = value_of_initializer %int.make_type_signed.loc18_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.3: type = converted %int.make_type_signed.loc18_10, %.loc18_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_10: init type = call constants.%Int(%int_32.loc18_10) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_signed.loc18_10 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_signed.loc18_10, %.loc18_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] -// CHECK:STDOUT: %.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%.loc18_21) [template = constants.%i32] +// CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] +// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] // CHECK:STDOUT: %.loc18_24.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] // CHECK:STDOUT: %.loc18_24.2: type = converted %int.make_type_signed.loc18_21, %.loc18_24.1 [template = constants.%i32] -// CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.3] -// CHECK:STDOUT: %.loc18_25.1: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2] -// CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18_25.1 [template = constants.%Make.2] -// CHECK:STDOUT: %.loc18_25.2: = specific_function %Make.ref.loc18, @Make(constants.%i32) [template = constants.%.12] -// CHECK:STDOUT: %Make.call.loc18: init %i32 = call %.loc18_25.2() +// CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.2] +// CHECK:STDOUT: %.loc18_25: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2] +// CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18_25 [template = constants.%Make.2] +// CHECK:STDOUT: %Make.specific_fn.loc18: = specific_function %Make.ref.loc18, @Make(constants.%i32) [template = constants.%Make.specific_fn.2] +// CHECK:STDOUT: %Make.call.loc18: init %i32 = call %Make.specific_fn.loc18() // CHECK:STDOUT: assign %a.var, %Make.call.loc18 // CHECK:STDOUT: %.loc19_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc19_11.2: type = converted %.loc19_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] +// CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] // CHECK:STDOUT: %.loc19_21: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc19_22: type = converted %.loc19_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%empty_tuple.type) [template = constants.%Wrap.4] -// CHECK:STDOUT: %.loc19_23.1: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%empty_tuple.type) [template = constants.%Make.3] -// CHECK:STDOUT: %Make.ref.loc19: %Make.type.3 = name_ref Make, %.loc19_23.1 [template = constants.%Make.3] -// CHECK:STDOUT: %.loc19_23.2: = specific_function %Make.ref.loc19, @Make(constants.%empty_tuple.type) [template = constants.%.13] -// CHECK:STDOUT: %Make.call.loc19: init %empty_tuple.type = call %.loc19_23.2() +// CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%empty_tuple.type) [template = constants.%Wrap.3] +// CHECK:STDOUT: %.loc19_23: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%empty_tuple.type) [template = constants.%Make.3] +// CHECK:STDOUT: %Make.ref.loc19: %Make.type.3 = name_ref Make, %.loc19_23 [template = constants.%Make.3] +// CHECK:STDOUT: %Make.specific_fn.loc19: = specific_function %Make.ref.loc19, @Make(constants.%empty_tuple.type) [template = constants.%Make.specific_fn.3] +// CHECK:STDOUT: %Make.call.loc19: init %empty_tuple.type = call %Make.specific_fn.loc19() // CHECK:STDOUT: assign %b.var, %Make.call.loc19 // CHECK:STDOUT: %C.ref.loc20_10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %Wrap.ref.loc20: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] +// CHECK:STDOUT: %Wrap.ref.loc20: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] // CHECK:STDOUT: %C.ref.loc20_19: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.5] -// CHECK:STDOUT: %.loc20_21.1: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4] -// CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21.1 [template = constants.%Make.4] -// CHECK:STDOUT: %.loc20_21.2: = specific_function %Make.ref.loc20, @Make(constants.%C) [template = constants.%.16] +// CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.4] +// CHECK:STDOUT: %.loc20_21: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4] +// CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21 [template = constants.%Make.4] +// CHECK:STDOUT: %Make.specific_fn.loc20: = specific_function %Make.ref.loc20, @Make(constants.%C) [template = constants.%Make.specific_fn.4] // CHECK:STDOUT: %.loc20_7: ref %C = splice_block %c.var {} -// CHECK:STDOUT: %Make.call.loc20: init %C = call %.loc20_21.2() to %.loc20_7 +// CHECK:STDOUT: %Make.call.loc20: init %C = call %Make.specific_fn.loc20() to %.loc20_7 // CHECK:STDOUT: assign %c.var, %Make.call.loc20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -211,7 +211,7 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.1 // CHECK:STDOUT: %Make => constants.%Make.1 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.3 +// CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(%T.loc11_12.2) { @@ -243,7 +243,7 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.12 +// CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%empty_tuple.type) { @@ -261,7 +261,7 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.13 +// CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%C) { @@ -279,6 +279,6 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.4 // CHECK:STDOUT: %Make => constants.%Make.4 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.16 +// CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 789849559ae43..a8808511e5649 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -57,21 +57,21 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [template] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: = specific_function %Defined, @Defined(%i32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -111,10 +111,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_signed.loc8, %.loc8_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_21.2: type = converted %int.make_type_signed.loc8, %.loc8_21.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -136,19 +136,19 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallDefined() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl [template = constants.%Defined] -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_23.3: type = converted %int.make_type_signed.loc9, %.loc9_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.2: = bound_method %.loc9_18, %.loc9_20.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_20.3: = specific_function %.loc9_20.2, @Convert.7(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_20.3(%.loc9_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc9_20.5: %i32 = converted %.loc9_18, %.loc9_20.4 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.30] -// CHECK:STDOUT: %Defined.call: init %i32 = call %.loc9_10(%.loc9_20.5) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_signed.loc9, %.loc9_23.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_0, %.loc9_20.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%Defined.specific_fn] +// CHECK:STDOUT: %Defined.call: init %i32 = call %Defined.specific_fn(%.loc9_20.2) // CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc9_27.2: %i32 = converted %Defined.call, %.loc9_27.1 // CHECK:STDOUT: return %.loc9_27.2 @@ -173,21 +173,21 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [template] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: = specific_function %Defined, @Defined(%i32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -227,10 +227,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_21.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_21.3: type = converted %int.make_type_signed.loc6, %.loc6_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_21.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_21.2: type = converted %int.make_type_signed.loc6, %.loc6_21.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -269,19 +269,19 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallDefined() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl.loc4 [template = constants.%Defined] -// CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_23.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_23.3: type = converted %int.make_type_signed.loc7, %.loc7_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_20.2: = bound_method %.loc7_18, %.loc7_20.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_20.3: = specific_function %.loc7_20.2, @Convert.7(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_20.3(%.loc7_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc7_20.5: %i32 = converted %.loc7_18, %.loc7_20.4 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.30] -// CHECK:STDOUT: %Defined.call: init %i32 = call %.loc7_10(%.loc7_20.5) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_23.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_23.2: type = converted %int.make_type_signed.loc7, %.loc7_23.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc7_20.2: %i32 = converted %int_0, %.loc7_20.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%Defined.specific_fn] +// CHECK:STDOUT: %Defined.call: init %i32 = call %Defined.specific_fn(%.loc7_20.2) // CHECK:STDOUT: %.loc7_27.1: %i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc7_27.2: %i32 = converted %Defined.call, %.loc7_27.1 // CHECK:STDOUT: return %.loc7_27.2 @@ -306,21 +306,21 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Undefined.type: type = fn_type @Undefined [template] // CHECK:STDOUT: %Undefined: %Undefined.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %CallUndefined.type: type = fn_type @CallUndefined [template] // CHECK:STDOUT: %CallUndefined: %CallUndefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: = specific_function %Undefined, @Undefined(%i32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Undefined.specific_fn: = specific_function %Undefined, @Undefined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -360,10 +360,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.3: type = converted %int.make_type_signed.loc6, %.loc6_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed.loc6, %.loc6_23.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -379,19 +379,19 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallUndefined() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Undefined.ref: %Undefined.type = name_ref Undefined, file.%Undefined.decl [template = constants.%Undefined] -// CHECK:STDOUT: %.loc13_20: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_25.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_25.3: type = converted %int.make_type_signed.loc13, %.loc13_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_22.2: = bound_method %.loc13_20, %.loc13_22.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_22.3: = specific_function %.loc13_22.2, @Convert.7(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_22.3(%.loc13_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_22.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc13_22.5: %i32 = converted %.loc13_20, %.loc13_22.4 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_10: = specific_function %Undefined.ref, @Undefined(constants.%i32) [template = constants.%.30] -// CHECK:STDOUT: %Undefined.call: init %i32 = call %.loc13_10(%.loc13_22.5) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_25.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_25.2: type = converted %int.make_type_signed.loc13, %.loc13_25.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_22.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_22.2: %i32 = converted %int_0, %.loc13_22.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Undefined.specific_fn: = specific_function %Undefined.ref, @Undefined(constants.%i32) [template = constants.%Undefined.specific_fn] +// CHECK:STDOUT: %Undefined.call: init %i32 = call %Undefined.specific_fn(%.loc13_22.2) // CHECK:STDOUT: %.loc13_29.1: %i32 = value_of_initializer %Undefined.call // CHECK:STDOUT: %.loc13_29.2: %i32 = converted %Undefined.call, %.loc13_29.1 // CHECK:STDOUT: return %.loc13_29.2 diff --git a/toolchain/check/testdata/global/class_obj.carbon b/toolchain/check/testdata/global/class_obj.carbon index bd47e30661e14..b1c7d97179e00 100644 --- a/toolchain/check/testdata/global/class_obj.carbon +++ b/toolchain/check/testdata/global/class_obj.carbon @@ -15,9 +15,9 @@ var a: A = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %A = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %A.val: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,18 +41,18 @@ var a: A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc12_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_13.2: init %A = class_init (), file.%a.var [template = constants.%A.val] +// CHECK:STDOUT: %.loc12_14: init %A = converted %.loc12_13.1, %.loc12_13.2 [template = constants.%A.val] // 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 f8191618964df..d18f717e54077 100644 --- a/toolchain/check/testdata/global/class_with_fun.carbon +++ b/toolchain/check/testdata/global/class_with_fun.carbon @@ -19,11 +19,11 @@ var a: A = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ret_a.type: type = fn_type @ret_a [template] // CHECK:STDOUT: %ret_a: %ret_a.type = struct_value () [template] -// CHECK:STDOUT: %struct: %A = struct_value () [template] +// CHECK:STDOUT: %A.val: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,26 +56,26 @@ var a: A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ret_a() -> %return: %A { // CHECK:STDOUT: !entry: -// 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: %.loc13_11.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_11.2: init %A = class_init (), %return [template = constants.%A.val] +// CHECK:STDOUT: %.loc13_12: init %A = converted %.loc13_11.1, %.loc13_11.2 [template = constants.%A.val] // CHECK:STDOUT: return %.loc13_12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc16_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc16_13.2: init %A = class_init (), file.%a.var [template = constants.%A.val] +// CHECK:STDOUT: %.loc16_14: init %A = converted %.loc16_13.1, %.loc16_13.2 [template = constants.%A.val] // 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 925db58cb0d3a..bf132c4ba1302 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -12,10 +12,10 @@ var a: i32; // CHECK:STDOUT: --- decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -32,10 +32,10 @@ var a: i32; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed, %.loc10_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index bb5a8d2b2e4e6..6e80bf31bdf51 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -12,18 +12,18 @@ var a: i32 = 0; // CHECK:STDOUT: --- simple_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,23 +41,23 @@ var a: i32 = 0; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed, %.loc10_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_15.2: = bound_method %.loc10_14, %.loc10_15.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_15.3: = specific_function %.loc10_15.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_15.3(%.loc10_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_15.4: init %i32 = converted %.loc10_14, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%a.var, %.loc10_15.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%a.var, %.loc10 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index ea8e6f1cb5c9b..1d3c00e08bdcf 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -17,20 +17,20 @@ var a: i32 = test_a(); // CHECK:STDOUT: --- simple_with_fun.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %test_a.type: type = fn_type @test_a [template] // CHECK:STDOUT: %test_a: %test_a.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,31 +53,31 @@ var a: i32 = test_a(); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_signed, %.loc11_16.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @test_a() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc12_11.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.2: %i32 = converted %int_0, %.loc12_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc12_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 1e3f3ee8b7f72..469b2a595dc8e 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -44,26 +44,26 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %If1.type: type = fn_type @If1 [template] // CHECK:STDOUT: %If1: %If1.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] // CHECK:STDOUT: %If2: %If2.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] // CHECK:STDOUT: %If3: %If3.type = struct_value () [template] // CHECK:STDOUT: } @@ -95,10 +95,10 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [template = bool] -// CHECK:STDOUT: %.loc11_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_signed, %.loc11_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_signed, %.loc11_20.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -113,10 +113,10 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type, %.loc22_11.1 [template = bool] -// CHECK:STDOUT: %.loc22_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.3: type = converted %int.make_type_signed, %.loc22_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_signed, %.loc22_20.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -131,10 +131,10 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type, %.loc33_11.1 [template = bool] -// CHECK:STDOUT: %.loc33_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc33_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc33_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc33_20.3: type = converted %int.make_type_signed, %.loc33_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc33_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc33_20.2: type = converted %int.make_type_signed, %.loc33_20.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -148,14 +148,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc13_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.2: %i32 = converted %int_1, %.loc13_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc13_13.2 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: br !if.done @@ -172,14 +172,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc25_12: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc25_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_13.2: = bound_method %.loc25_12, %.loc25_13.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc25_13.3: = specific_function %.loc25_13.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc25_13.3(%.loc25_12) [template = constants.%.33] -// CHECK:STDOUT: %.loc25_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc25_13.5: %i32 = converted %.loc25_12, %.loc25_13.4 [template = constants.%.33] -// CHECK:STDOUT: return %.loc25_13.5 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_13.2: %i32 = converted %int_2, %.loc25_13.1 [template = constants.%int_2.2] +// CHECK:STDOUT: return %.loc25_13.2 // CHECK:STDOUT: // CHECK:STDOUT: !if.done: // CHECK:STDOUT: } @@ -190,14 +190,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc35_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_13.2: = bound_method %.loc35_12, %.loc35_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc35_13.3: = specific_function %.loc35_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_13.3(%.loc35_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc35_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc35_13.5: %i32 = converted %.loc35_12, %.loc35_13.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc35_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc35_13.2: %i32 = converted %int_1, %.loc35_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc35_13.2 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 77503f69e92bb..1c9d0ceaa6d8f 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -24,20 +24,20 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %VarScope.type: type = fn_type @VarScope [template] // CHECK:STDOUT: %VarScope: %VarScope.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,10 +65,10 @@ fn VarScope(b: bool) -> i32 { // 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] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11, %.loc11_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11, %.loc11_25.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -82,19 +82,19 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.3: type = converted %int.make_type_signed.loc13, %.loc13_12.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed.loc13, %.loc13_12.1 [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_19.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_19.2: = bound_method %.loc13_18, %.loc13_19.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_19.3(%.loc13_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_19.4: init %i32 = converted %.loc13_18, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %n.var, %.loc13_19.4 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc13_19: init %i32 = converted %int_2, %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: assign %n.var, %.loc13_19 // CHECK:STDOUT: %n.ref.loc14: ref %i32 = name_ref n, %n // CHECK:STDOUT: %.loc14: %i32 = bind_value %n.ref.loc14 // CHECK:STDOUT: return %.loc14 diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index 5e2b80244347f..0a400763e9a55 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -22,24 +22,24 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] // CHECK:STDOUT: %If: %If.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,10 +67,10 @@ fn If(b: bool) -> i32 { // 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] -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -84,23 +84,23 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc13_13.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1, %impl.elem0.loc13 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc13_13.2: %i32 = converted %int_1, %.loc13_13.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc13_13.2 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc15_12: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_13.2: = bound_method %.loc15_12, %.loc15_13.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_13.3: = specific_function %.loc15_13.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_13.3(%.loc15_12) [template = constants.%.33] -// CHECK:STDOUT: %.loc15_13.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_13.5: %i32 = converted %.loc15_12, %.loc15_13.4 [template = constants.%.33] -// CHECK:STDOUT: return %.loc15_13.5 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_2, %impl.elem0.loc15 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_13.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_13.2: %i32 = converted %int_2, %.loc15_13.1 [template = constants.%int_2.2] +// CHECK:STDOUT: return %.loc15_13.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index d6e0ffc7f6e23..9651880486a3c 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -18,24 +18,24 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.32) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,18 +67,18 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // 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] -// CHECK:STDOUT: %.loc11_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%.loc11_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.3: type = converted %int.make_type_signed.loc11_18, %.loc11_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_26: init type = call constants.%Int(%.loc11_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.2: type = value_of_initializer %int.make_type_signed.loc11_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.3: type = converted %int.make_type_signed.loc11_26, %.loc11_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%.loc11_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.2: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.3: type = converted %int.make_type_signed.loc11_34, %.loc11_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%int_32.loc11_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_26: init type = call constants.%Int(%int_32.loc11_26) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_signed.loc11_26 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_signed.loc11_26, %.loc11_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%int_32.loc11_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_signed.loc11_34, %.loc11_34.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param1 @@ -92,51 +92,51 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool, %n.param_patt: %i32, %m.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.3: type = converted %int.make_type_signed.loc12, %.loc12_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17: type = array_type %.loc12_16, %i32 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_22: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%.loc12_22) -// CHECK:STDOUT: %.loc12_24.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_24.3: = bound_method %.loc12_22, %.loc12_24.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_24.4: = specific_function %.loc12_24.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_24.4(%.loc12_22) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_24.5: init %i32 = converted %.loc12_22, %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc12_24.6: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_24.7: ref %i32 = array_index %x.var, %.loc12_24.6 -// CHECK:STDOUT: %.loc12_24.8: init %i32 = initialize_from %.loc12_24.5 to %.loc12_24.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_24.9: init %.3 = array_init (%.loc12_24.8) to %x.var [template = constants.%array] -// CHECK:STDOUT: %.loc12_25: init %.3 = converted %.loc12_24.1, %.loc12_24.9 [template = constants.%array] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed.loc12, %.loc12_11.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %x.var: ref %array_type = var x +// CHECK:STDOUT: %x: ref %array_type = bind_name x, %x.var +// CHECK:STDOUT: %int_0.loc12_22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%int_0.loc12_22) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.loc12_22, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0.loc12_22) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_24.2: init %i32 = converted %int_0.loc12_22, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %int_0.loc12_24: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc12_24.3: ref %i32 = array_index %x.var, %int_0.loc12_24 +// CHECK:STDOUT: %.loc12_24.4: init %i32 = initialize_from %.loc12_24.2 to %.loc12_24.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_24.5: init %array_type = array_init (%.loc12_24.4) to %x.var [template = constants.%array] +// CHECK:STDOUT: %.loc12_25: init %array_type = converted %.loc12_24.1, %.loc12_24.5 [template = constants.%array] // CHECK:STDOUT: assign %x.var, %.loc12_25 // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %x.ref.loc13_20: ref %.3 = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_20: ref %array_type = name_ref x, %x // CHECK:STDOUT: %m.ref: %i32 = name_ref m, %m -// CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%.loc13_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: type = converted %int.make_type_signed.loc13_23, %.loc13_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.4: ref %i32 = array_index %x.ref.loc13_20, %m.ref -// CHECK:STDOUT: %.loc13_23.5: %i32 = bind_value %.loc13_23.4 -// CHECK:STDOUT: br !if.expr.result(%.loc13_23.5) +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.3: ref %i32 = array_index %x.ref.loc13_20, %m.ref +// CHECK:STDOUT: %.loc13_23.4: %i32 = bind_value %.loc13_23.3 +// CHECK:STDOUT: br !if.expr.result(%.loc13_23.4) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %x.ref.loc13_30: ref %.3 = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_30: ref %array_type = name_ref x, %x // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13_33: init type = call constants.%Int(%.loc13_33.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.2: type = value_of_initializer %int.make_type_signed.loc13_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.3: type = converted %int.make_type_signed.loc13_33, %.loc13_33.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.4: ref %i32 = array_index %x.ref.loc13_30, %n.ref -// CHECK:STDOUT: %.loc13_33.5: %i32 = bind_value %.loc13_33.4 -// CHECK:STDOUT: br !if.expr.result(%.loc13_33.5) +// CHECK:STDOUT: %int_32.loc13_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_33: init type = call constants.%Int(%int_32.loc13_33) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.1: type = value_of_initializer %int.make_type_signed.loc13_33 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.2: type = converted %int.make_type_signed.loc13_33, %.loc13_33.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.3: ref %i32 = array_index %x.ref.loc13_30, %n.ref +// CHECK:STDOUT: %.loc13_33.4: %i32 = bind_value %.loc13_33.3 +// CHECK:STDOUT: br !if.expr.result(%.loc13_33.4) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc13_10: %i32 = block_arg !if.expr.result diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index a87fd9f2da399..bf544fbb551ea 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -34,35 +34,35 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: --- constant_condition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.34: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.35: bool = bool_literal false [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %.36: type = ptr_type %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [template] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [template] // CHECK:STDOUT: } @@ -91,10 +91,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -102,10 +102,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.3: type = converted %int.make_type_signed, %.loc12_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed, %.loc12_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -113,10 +113,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed, %.loc14_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -124,10 +124,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_11.3: type = converted %int.make_type_signed, %.loc18_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_signed, %.loc18_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -135,10 +135,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_18.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_18.3: type = converted %int.make_type_signed.loc22, %.loc22_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_18.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_18.2: type = converted %int.make_type_signed.loc22, %.loc22_18.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -148,10 +148,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%.loc28_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_34.2: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_34.3: type = converted %int.make_type_signed.loc28, %.loc28_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] +// CHECK:STDOUT: %.loc28_34.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] +// CHECK:STDOUT: %.loc28_34.2: type = converted %int.make_type_signed.loc28, %.loc28_34.1 [template = constants.%i32] // CHECK:STDOUT: %t.param: type = value_param runtime_param0 // CHECK:STDOUT: %t: type = bind_name t, %t.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -161,32 +161,32 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc11_25.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_1, %.loc11_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc11_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.33] -// CHECK:STDOUT: return %.loc12_25.5 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_25.2: %i32 = converted %int_2, %.loc12_25.1 [template = constants.%int_2.2] +// CHECK:STDOUT: return %.loc12_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_13: bool = bool_literal true [template = constants.%.34] -// CHECK:STDOUT: if %.loc15_13 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] @@ -209,8 +209,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal false [template = constants.%.35] -// CHECK:STDOUT: if %.loc19_13 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] @@ -233,62 +233,62 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_13: bool = bool_literal true [template = constants.%.34] -// CHECK:STDOUT: if %.loc23_13 br !if.expr.then.loc23 else br !if.expr.else.loc23 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then.loc23 else br !if.expr.else.loc23 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc23: -// CHECK:STDOUT: %.loc23_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_23: init type = call constants.%Int(%.loc23_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_23.2: type = value_of_initializer %int.make_type_signed.loc23_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_23.3: type = converted %int.make_type_signed.loc23_23, %.loc23_23.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_23.3) +// CHECK:STDOUT: %int_32.loc23_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_23: init type = call constants.%Int(%int_32.loc23_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_23.1: type = value_of_initializer %int.make_type_signed.loc23_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_23.2: type = converted %int.make_type_signed.loc23_23, %.loc23_23.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc23: -// CHECK:STDOUT: %.loc23_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_32: init type = call constants.%Int(%.loc23_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_32: init type = call constants.%Int(%int_32.loc23_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_signed.loc23_32 [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_signed.loc23_32, %.loc23_35.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.3: type = ptr_type %i32 [template = constants.%.36] -// CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_35.3) +// CHECK:STDOUT: %ptr.loc23: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc23(%ptr.loc23) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc23: // CHECK:STDOUT: %.loc23_10: type = block_arg !if.expr.result.loc23 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc23_39: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_40.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_40.2: = bound_method %.loc23_39, %.loc23_40.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc23_40.3: = specific_function %.loc23_40.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_40.3(%.loc23_39) [template = constants.%.29] -// CHECK:STDOUT: %.loc23_40.4: init %i32 = converted %.loc23_39, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %v.var, %.loc23_40.4 -// CHECK:STDOUT: %.loc24_13: bool = bool_literal false [template = constants.%.35] -// CHECK:STDOUT: if %.loc24_13 br !if.expr.then.loc24 else br !if.expr.else.loc24 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc23_40: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %v.var, %.loc23_40 +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false br !if.expr.then.loc24 else br !if.expr.else.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc24: -// CHECK:STDOUT: %.loc24_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc24_24: init type = call constants.%Int(%.loc24_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_24.2: type = value_of_initializer %int.make_type_signed.loc24_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_24.3: type = converted %int.make_type_signed.loc24_24, %.loc24_24.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_24.3) +// CHECK:STDOUT: %int_32.loc24_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc24_24: init type = call constants.%Int(%int_32.loc24_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %int.make_type_signed.loc24_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc24_24.2: type = converted %int.make_type_signed.loc24_24, %.loc24_24.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc24: -// CHECK:STDOUT: %.loc24_33: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc24_33: init type = call constants.%Int(%.loc24_33) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc24_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc24_33: init type = call constants.%Int(%int_32.loc24_33) [template = constants.%i32] // CHECK:STDOUT: %.loc24_36.1: type = value_of_initializer %int.make_type_signed.loc24_33 [template = constants.%i32] // CHECK:STDOUT: %.loc24_36.2: type = converted %int.make_type_signed.loc24_33, %.loc24_36.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_36.3: type = ptr_type %i32 [template = constants.%.36] -// CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_36.3) +// CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc24(%ptr.loc24) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc24: -// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%.36] -// CHECK:STDOUT: %w.var: ref %.36 = var w -// CHECK:STDOUT: %w: ref %.36 = bind_name w, %w.var +// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%ptr] +// CHECK:STDOUT: %w.var: ref %ptr = var w +// CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %.loc24_40: %.36 = addr_of %v.ref -// CHECK:STDOUT: assign %w.var, %.loc24_40 -// CHECK:STDOUT: %w.ref: ref %.36 = name_ref w, %w -// CHECK:STDOUT: %.loc25_11: %.36 = bind_value %w.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %v.ref +// CHECK:STDOUT: assign %w.var, %addr +// CHECK:STDOUT: %w.ref: ref %ptr = name_ref w, %w +// CHECK:STDOUT: %.loc25_11: %ptr = 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 @@ -296,15 +296,15 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param_patt: type) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc29_13: bool = bool_literal true [template = constants.%.34] -// CHECK:STDOUT: if %.loc29_13 br !if.expr.then.loc29 else br !if.expr.else.loc29 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then.loc29 else br !if.expr.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc29: -// CHECK:STDOUT: %.loc29_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%.loc29_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_23.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_23.3: type = converted %int.make_type_signed.loc29, %.loc29_23.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc29(%.loc29_23.3) +// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_23.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_23.2: type = converted %int.make_type_signed.loc29, %.loc29_23.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc29(%.loc29_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc29: // CHECK:STDOUT: %t.ref.loc29: type = name_ref t, %t @@ -314,37 +314,37 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc29_10: type = block_arg !if.expr.result.loc29 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc29_36: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc29_37.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_37.2: = bound_method %.loc29_36, %.loc29_37.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc29_37.3: = specific_function %.loc29_37.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc29_37.3(%.loc29_36) [template = constants.%.29] -// CHECK:STDOUT: %.loc29_37.4: init %i32 = converted %.loc29_36, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %v.var, %.loc29_37.4 -// CHECK:STDOUT: %.loc30_13: bool = bool_literal false [template = constants.%.35] -// CHECK:STDOUT: if %.loc30_13 br !if.expr.then.loc30 else br !if.expr.else.loc30 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc29_37: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %v.var, %.loc29_37 +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false br !if.expr.then.loc30 else br !if.expr.else.loc30 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc30: // CHECK:STDOUT: %t.ref.loc30: type = name_ref t, %t // CHECK:STDOUT: br !if.expr.result.loc30(%t.ref.loc30) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc30: -// CHECK:STDOUT: %.loc30_31: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_31) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] // CHECK:STDOUT: %.loc30_34.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_34.2: type = converted %int.make_type_signed.loc30, %.loc30_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_34.3: type = ptr_type %i32 [template = constants.%.36] -// CHECK:STDOUT: br !if.expr.result.loc30(%.loc30_34.3) +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc30(%ptr) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc30: -// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%.36] -// CHECK:STDOUT: %w.var: ref %.36 = var w -// CHECK:STDOUT: %w: ref %.36 = bind_name w, %w.var +// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%ptr] +// CHECK:STDOUT: %w.var: ref %ptr = var w +// CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %.loc30_38: %.36 = addr_of %v.ref -// CHECK:STDOUT: assign %w.var, %.loc30_38 -// CHECK:STDOUT: %w.ref: ref %.36 = name_ref w, %w -// CHECK:STDOUT: %.loc31_11: %.36 = bind_value %w.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %v.ref +// CHECK:STDOUT: assign %w.var, %addr +// CHECK:STDOUT: %w.ref: ref %ptr = name_ref w, %w +// CHECK:STDOUT: %.loc31_11: %ptr = 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 ee6813717031f..e7d6500bc3a3b 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -18,26 +18,26 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: --- control_flow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -66,10 +66,10 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -77,10 +77,10 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.3: type = converted %int.make_type_signed, %.loc12_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed, %.loc12_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -93,10 +93,10 @@ fn F(b: bool) -> i32 { // 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] -// CHECK:STDOUT: %.loc14_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.3: type = converted %int.make_type_signed, %.loc14_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_18.2: type = converted %int.make_type_signed, %.loc14_18.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -106,26 +106,26 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc11_25.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_1, %.loc11_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc11_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.33] -// CHECK:STDOUT: return %.loc12_25.5 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_25.2: %i32 = converted %int_2, %.loc12_25.1 [template = constants.%int_2.2] +// CHECK:STDOUT: return %.loc12_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { 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 af880b6182da2..1e3cfbea4f9a6 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -40,11 +40,11 @@ class C { // CHECK:STDOUT: --- fail_not_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -65,16 +65,16 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.3: type = converted %int.make_type_signed, %.loc23_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed, %.loc23_8.1 [template = constants.%i32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc37: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc37 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -84,7 +84,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc23 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index d6dfcbfd21d6a..a4ad6f02e4589 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -46,11 +46,11 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] // CHECK:STDOUT: %ConditionIsNonConstant: %ConditionIsNonConstant.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,15 +86,15 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %.loc12_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%.loc12_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.2: type = value_of_initializer %int.make_type_signed.loc12_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.3: type = converted %int.make_type_signed.loc12_20, %.loc12_20.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%.loc12_20.3) +// CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed.loc12_20 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed.loc12_20, %.loc12_20.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result(%.loc12_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%.loc12_29) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%int_32.loc12_29) [template = constants.%i32] // CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_signed.loc12_29 [template = constants.%i32] // CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_signed.loc12_29, %.loc12_24.1 [template = constants.%i32] // CHECK:STDOUT: br !if.expr.result(%.loc12_24.2) @@ -103,7 +103,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc12_10: type = block_arg !if.expr.result // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_35: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -113,13 +113,13 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [template] // CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: bool = bool_literal false [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -147,16 +147,16 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @ChosenBranchIsNonConstant(%t.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc9_13 br !if.expr.then.loc9 else br !if.expr.else.loc9 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: // CHECK:STDOUT: %t.ref.loc9: type = name_ref t, %t // CHECK:STDOUT: br !if.expr.result.loc9(%t.ref.loc9) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc9: -// CHECK:STDOUT: %.loc9_30: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_30) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] // CHECK:STDOUT: %.loc9_25.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] // CHECK:STDOUT: %.loc9_25.2: type = converted %int.make_type_signed.loc9, %.loc9_25.1 [template = constants.%i32] // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_25.2) @@ -165,17 +165,17 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var -// CHECK:STDOUT: %.loc9_36: Core.IntLiteral = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %.loc13_13: bool = bool_literal false [template = constants.%.4] -// CHECK:STDOUT: if %.loc13_13 br !if.expr.then.loc13 else br !if.expr.else.loc13 +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: -// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_24.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_24.3: type = converted %int.make_type_signed.loc13, %.loc13_24.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc13(%.loc13_24.3) +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_24.2: type = converted %int.make_type_signed.loc13, %.loc13_24.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc13(%.loc13_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc13: // CHECK:STDOUT: %t.ref.loc13: type = name_ref t, %t @@ -185,7 +185,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc13_10: type = block_arg !if.expr.result.loc13 // CHECK:STDOUT: %w.var: ref = var w // CHECK:STDOUT: %w: ref = bind_name w, %w.var -// CHECK:STDOUT: %.loc13_37: Core.IntLiteral = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %w.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 393e75082064b..025a9e8f18139 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -17,32 +17,32 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 4 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,10 +80,10 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] // CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] -// CHECK:STDOUT: %.loc11_36.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_36.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_36.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_36.3: type = converted %int.make_type_signed.loc11, %.loc11_36.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_36.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_36.2: type = converted %int.make_type_signed.loc11, %.loc11_36.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: bool = value_param runtime_param0 // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 @@ -105,28 +105,28 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.expr.then.loc12_20 else br !if.expr.else.loc12_20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_20: -// CHECK:STDOUT: %.loc12_30: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_25: init type = call constants.%Int(%.loc12_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = value_of_initializer %int.make_type_signed.loc12_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.3: type = converted %int.make_type_signed.loc12_25, %.loc12_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.4: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.5: = bound_method %.loc12_30, %.loc12_25.4 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_25.6: = specific_function %.loc12_25.5, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %.loc12_25.6(%.loc12_30) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.7: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.8: %i32 = converted %.loc12_30, %.loc12_25.7 [template = constants.%.29] -// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_25.8) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc12_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_25: init type = call constants.%Int(%int_32.loc12_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_signed.loc12_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12_25, %.loc12_25.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_25: = bound_method %int_1, %impl.elem0.loc12_25 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_25: = specific_function %Convert.bound.loc12_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %Convert.specific_fn.loc12_25(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_25.3: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_25.4: %i32 = converted %int_1, %.loc12_25.3 [template = constants.%int_1.2] +// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_25.4) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: -// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_37, %.loc12_32.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_32.3: = specific_function %.loc12_32.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.3(%.loc12_37) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_32.4: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_32.5: %i32 = converted %.loc12_37, %.loc12_32.4 [template = constants.%.33] -// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_32.5) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_2, %impl.elem0.loc12_32 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_32.1: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_32.2: %i32 = converted %int_2, %.loc12_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_32.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_20: // CHECK:STDOUT: %.loc12_20: %i32 = block_arg !if.expr.result.loc12_20 @@ -137,28 +137,28 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: if %c.ref br !if.expr.then.loc12_44 else br !if.expr.else.loc12_44 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_44: -// CHECK:STDOUT: %.loc12_54: Core.IntLiteral = int_value 3 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_49.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_49: init type = call constants.%Int(%.loc12_49.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_49.2: type = value_of_initializer %int.make_type_signed.loc12_49 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_49.3: type = converted %int.make_type_signed.loc12_49, %.loc12_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_49.4: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_49.5: = bound_method %.loc12_54, %.loc12_49.4 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_49.6: = specific_function %.loc12_49.5, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %.loc12_49.6(%.loc12_54) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.7: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_49.8: %i32 = converted %.loc12_54, %.loc12_49.7 [template = constants.%.37] -// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_49.8) +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_32.loc12_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_49: init type = call constants.%Int(%int_32.loc12_49) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_49.1: type = value_of_initializer %int.make_type_signed.loc12_49 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_49.2: type = converted %int.make_type_signed.loc12_49, %.loc12_49.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12_49: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_49: = bound_method %int_3, %impl.elem0.loc12_49 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_49: = specific_function %Convert.bound.loc12_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %Convert.specific_fn.loc12_49(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_49.3: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_49.4: %i32 = converted %int_3, %.loc12_49.3 [template = constants.%int_3.2] +// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_49.4) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: -// CHECK:STDOUT: %.loc12_61: Core.IntLiteral = int_value 4 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_56.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_56.2: = bound_method %.loc12_61, %.loc12_56.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_56.3: = specific_function %.loc12_56.2, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %.loc12_56.3(%.loc12_61) [template = constants.%.41] -// CHECK:STDOUT: %.loc12_56.4: %i32 = value_of_initializer %int.convert_checked.loc12_56 [template = constants.%.41] -// CHECK:STDOUT: %.loc12_56.5: %i32 = converted %.loc12_61, %.loc12_56.4 [template = constants.%.41] -// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_56.5) +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc12_56: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_56: = bound_method %int_4, %impl.elem0.loc12_56 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc12_56: = specific_function %Convert.bound.loc12_56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %Convert.specific_fn.loc12_56(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc12_56.1: %i32 = value_of_initializer %int.convert_checked.loc12_56 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc12_56.2: %i32 = converted %int_4, %.loc12_56.1 [template = constants.%int_4.2] +// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_56.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_44: // CHECK:STDOUT: %.loc12_44: %i32 = block_arg !if.expr.result.loc12_44 diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 80a2cd0948d3f..fee0c4d19a68b 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -18,32 +18,32 @@ fn F(cond: bool) { // CHECK:STDOUT: --- struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,20 +64,20 @@ fn F(cond: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %s.patt: %.2 = binding_pattern s -// CHECK:STDOUT: %s.param_patt: %.2 = value_param_pattern %s.patt, runtime_param0 +// CHECK:STDOUT: %s.patt: %struct_type.a.b.1 = binding_pattern s +// CHECK:STDOUT: %s.param_patt: %struct_type.a.b.1 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed.loc11_14, %.loc11_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%.loc11_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.2: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.3: type = converted %int.make_type_signed.loc11_23, %.loc11_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %s.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %s: %.2 = bind_name s, %s.param +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_14, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %s.param: %struct_type.a.b.1 = value_param runtime_param0 +// CHECK:STDOUT: %s: %struct_type.a.b.1 = bind_name s, %s.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %cond.patt: bool = binding_pattern cond @@ -91,67 +91,67 @@ fn F(cond: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%s.param_patt: %.2); +// CHECK:STDOUT: fn @G(%s.param_patt: %struct_type.a.b.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%cond.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%.loc14_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_signed.loc14_15, %.loc14_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%.loc14_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_24, %.loc14_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_37: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_45: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.1: %.6 = struct_literal (%.loc14_37, %.loc14_45) -// CHECK:STDOUT: %.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_46.3: = bound_method %.loc14_37, %.loc14_46.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_46.4: = specific_function %.loc14_46.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %.loc14_46.4(%.loc14_37) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_46.5: init %i32 = converted %.loc14_37, %int.convert_checked.loc14_46.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_46.6: ref %i32 = struct_access %a.var, element0 -// CHECK:STDOUT: %.loc14_46.7: init %i32 = initialize_from %.loc14_46.5 to %.loc14_46.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_46.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_46.9: = bound_method %.loc14_45, %.loc14_46.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_46.10: = specific_function %.loc14_46.9, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %.loc14_46.10(%.loc14_45) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_46.11: init %i32 = converted %.loc14_45, %int.convert_checked.loc14_46.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_46.12: ref %i32 = struct_access %a.var, element1 -// CHECK:STDOUT: %.loc14_46.13: init %i32 = initialize_from %.loc14_46.11 to %.loc14_46.12 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_46.14: init %.2 = struct_init (%.loc14_46.7, %.loc14_46.13) to %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_47: init %.2 = converted %.loc14_46.1, %.loc14_46.14 [template = constants.%struct] +// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%int_32.loc14_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_signed.loc14_15, %.loc14_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%int_32.loc14_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_signed.loc14_24, %.loc14_24.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %a.var: ref %struct_type.a.b.1 = var a +// CHECK:STDOUT: %a: ref %struct_type.a.b.1 = bind_name a, %a.var +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc14_46.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc14_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_46.1: = bound_method %int_1, %impl.elem0.loc14_46.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_46.1: = specific_function %Convert.bound.loc14_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %Convert.specific_fn.loc14_46.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_46.2: init %i32 = converted %int_1, %int.convert_checked.loc14_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_46.3: ref %i32 = struct_access %a.var, element0 +// CHECK:STDOUT: %.loc14_46.4: init %i32 = initialize_from %.loc14_46.2 to %.loc14_46.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_46.2: = bound_method %int_2, %impl.elem0.loc14_46.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_46.2: = specific_function %Convert.bound.loc14_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %Convert.specific_fn.loc14_46.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_46.5: init %i32 = converted %int_2, %int.convert_checked.loc14_46.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_46.6: ref %i32 = struct_access %a.var, element1 +// CHECK:STDOUT: %.loc14_46.7: init %i32 = initialize_from %.loc14_46.5 to %.loc14_46.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_46.8: init %struct_type.a.b.1 = struct_init (%.loc14_46.4, %.loc14_46.7) to %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_47: init %struct_type.a.b.1 = converted %.loc14_46.1, %.loc14_46.8 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc14_47 // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %cond.ref: bool = name_ref cond, %cond // CHECK:STDOUT: if %cond.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %a.ref.loc15_18: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_18: ref %struct_type.a.b.1 = name_ref a, %a // CHECK:STDOUT: %.loc15_18.1: ref %i32 = struct_access %a.ref.loc15_18, element0 // CHECK:STDOUT: %.loc15_18.2: %i32 = bind_value %.loc15_18.1 // CHECK:STDOUT: %.loc15_18.3: ref %i32 = struct_access %a.ref.loc15_18, element1 // CHECK:STDOUT: %.loc15_18.4: %i32 = bind_value %.loc15_18.3 -// CHECK:STDOUT: %struct.loc15_18: %.2 = struct_value (%.loc15_18.2, %.loc15_18.4) -// CHECK:STDOUT: %.loc15_18.5: %.2 = converted %a.ref.loc15_18, %struct.loc15_18 +// CHECK:STDOUT: %struct.loc15_18: %struct_type.a.b.1 = struct_value (%.loc15_18.2, %.loc15_18.4) +// CHECK:STDOUT: %.loc15_18.5: %struct_type.a.b.1 = converted %a.ref.loc15_18, %struct.loc15_18 // CHECK:STDOUT: br !if.expr.result(%.loc15_18.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %a.ref.loc15_25: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_25: ref %struct_type.a.b.1 = name_ref a, %a // CHECK:STDOUT: %.loc15_25.1: ref %i32 = struct_access %a.ref.loc15_25, element0 // CHECK:STDOUT: %.loc15_25.2: %i32 = bind_value %.loc15_25.1 // CHECK:STDOUT: %.loc15_25.3: ref %i32 = struct_access %a.ref.loc15_25, element1 // CHECK:STDOUT: %.loc15_25.4: %i32 = bind_value %.loc15_25.3 -// CHECK:STDOUT: %struct.loc15_25: %.2 = struct_value (%.loc15_25.2, %.loc15_25.4) -// CHECK:STDOUT: %.loc15_20: %.2 = converted %a.ref.loc15_25, %struct.loc15_25 +// CHECK:STDOUT: %struct.loc15_25: %struct_type.a.b.1 = struct_value (%.loc15_25.2, %.loc15_25.4) +// CHECK:STDOUT: %.loc15_20: %struct_type.a.b.1 = converted %a.ref.loc15_25, %struct.loc15_25 // CHECK:STDOUT: br !if.expr.result(%.loc15_20) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc15_5: %.2 = block_arg !if.expr.result +// CHECK:STDOUT: %.loc15_5: %struct_type.a.b.1 = block_arg !if.expr.result // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc15_5) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 8363d6d15a9ac..99273abeec6ba 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -42,28 +42,28 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] -// CHECK:STDOUT: %.3: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Simple.%G.decl [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.6 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: %Simple.type = facet_value %i32, %i32 [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] // CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %i32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] // CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] @@ -90,20 +90,20 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc16_6.1: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_6.3: type = converted %int.make_type_signed, %.loc16_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_signed, %.loc16_6.1 [template = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCall.decl: %NonInstanceCall.type = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_23.1: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.3: type = converted %int.make_type_signed, %.loc21_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_signed, %.loc21_23.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -111,81 +111,81 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_20.1: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_20.3: type = converted %int.make_type_signed, %.loc25_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc25_20.2: type = converted %int.make_type_signed, %.loc25_20.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_31: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc29_31) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_signed, %.loc29_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_34.3: type = ptr_type %i32 [template = constants.%.9] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %ptr = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc33_28: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc33_28) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_signed, %.loc33_31.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_31.3: type = ptr_type %i32 [template = constants.%.9] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %self.patt: @G.1.%.loc13_14.1 (%.3) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%.loc13_14.1 (%.3) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %.loc13_14.1 (constants.%.3)] -// CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref, %.loc13_14.2 [symbolic = %.loc13_14.1 (constants.%.3)] -// CHECK:STDOUT: %self.param: @G.1.%.loc13_14.1 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%.loc13_14.1 (%.3) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc13: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 -// CHECK:STDOUT: .G = %.loc13 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .G = %assoc1 // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc16_6.3 as %Simple.ref { +// CHECK:STDOUT: impl @impl: %.loc16_6.2 as %Simple.ref { // 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: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_14.1: Core.IntLiteral = int_value 32 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_14.3: type = converted %int.make_type_signed, %.loc18_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_14.2: type = converted %int.make_type_signed, %.loc18_14.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl, %G.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.loc16_20 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { @@ -195,9 +195,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.1: type = facet_access_type %Self [symbolic = %.loc13_14.1 (constants.%.3)] +// CHECK:STDOUT: %Self.as_type.loc13_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%.loc13_14.1 (%.3)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(); @@ -208,9 +208,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc22() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -218,34 +218,34 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] -// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.8, element1 [template = constants.%G.2] -// CHECK:STDOUT: %.loc26_4.2: = bound_method %n.ref, %.loc26_4.1 -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc26_4.2(%n.ref) +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc1 [template = constants.%assoc1] +// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%G.2] +// CHECK:STDOUT: %G.bound: = bound_method %n.ref, %impl.elem1 +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %.9) { +// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %ptr) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_4.1: ref %i32 = deref %p.ref -// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc30_4.2() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.loc30: ref %i32 = deref %p.ref +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %.9) { +// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %ptr) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc1 [template = constants.%assoc1] // CHECK:STDOUT: %.loc34_4.1: ref %i32 = deref %p.ref -// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.8, element1 [template = constants.%G.2] -// CHECK:STDOUT: %.loc34_4.3: = bound_method %.loc34_4.1, %.loc34_4.2 -// CHECK:STDOUT: %.loc34_4.4: %i32 = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc34_4.3(%.loc34_4.4) +// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%G.2] +// CHECK:STDOUT: %G.bound: = bound_method %.loc34_4.1, %impl.elem1 +// CHECK:STDOUT: %.loc34_4.2: %i32 = bind_value %.loc34_4.1 +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%.loc34_4.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -253,13 +253,13 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc13_14.1 => constants.%.3 +// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%.7) { -// CHECK:STDOUT: %Self => constants.%.7 -// CHECK:STDOUT: %.loc13_14.1 => constants.%i32 +// CHECK:STDOUT: specific @G.1(constants.%Simple.facet) { +// CHECK:STDOUT: %Self => constants.%Simple.facet +// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 9f145ed6517a3..74eef971916a3 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -17,10 +17,10 @@ impl i32 as I; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -39,10 +39,10 @@ impl i32 as I; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc13_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.3: type = converted %int.make_type_signed, %.loc13_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed, %.loc13_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -55,5 +55,5 @@ impl i32 as I; // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc13_6.3 as %I.ref; +// CHECK:STDOUT: impl @impl: %.loc13_6.2 as %I.ref; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 9a073a44a6cc6..41161997c5b6c 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -19,11 +19,11 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [template] // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -42,10 +42,10 @@ impl i32 as Empty { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc14_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_6.3: type = converted %int.make_type_signed, %.loc14_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_6.2: type = converted %int.make_type_signed, %.loc14_6.1 [template = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -58,10 +58,10 @@ impl i32 as Empty { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc14_6.3 as %Empty.ref { -// CHECK:STDOUT: %.loc14_19: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: impl @impl: %.loc14_6.2 as %Empty.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc14_19 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 7b57ff749ac9c..e7d9e6834bdc0 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -31,15 +31,15 @@ fn G(c: C) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %HasF.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -74,21 +74,21 @@ fn G(c: C) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -96,12 +96,12 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.%HasF.ref -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { @@ -117,17 +117,17 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() +// CHECK:STDOUT: %F.ref.loc22: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc22: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %impl.elem0.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() +// CHECK:STDOUT: %F.ref.loc23: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc23: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %impl.elem0.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index eca53af2adbc8..7bb14123e07ff 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -53,43 +53,43 @@ class X(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.1: type = generic_interface_type @HasF [template] -// CHECK:STDOUT: %HasF: %HasF.type.1 = struct_value () [template] +// CHECK:STDOUT: %HasF.generic: %HasF.type.1 = struct_value () [template] // CHECK:STDOUT: %HasF.type.2: type = facet_type <@HasF, @HasF(%T)> [symbolic] // CHECK:STDOUT: %Self.1: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Param, %i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%Param)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @HasF(%Param) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %HasF.type.3, %F.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %HasF.type.3, %F.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: %HasF.type.2 = facet_value %C, %C [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.11: type = struct_type {} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] -// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.15: type = struct_type {.x: Core.IntLiteral} [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.3) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.39: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.40: = bound_method %.14, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.3) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Param = struct_value (%.42) [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -112,7 +112,7 @@ class X(U:! type) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF] { +// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -140,8 +140,8 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @HasF(%T.loc4_16.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @HasF.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_14.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_14.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_14.3: @HasF.%.loc5_14.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_14.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_14.2: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @HasF.%HasF.type (%HasF.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] @@ -153,11 +153,11 @@ class X(U:! type) { // CHECK:STDOUT: %return.param: ref @F.1.%T (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_14.1: @HasF.%.loc5_14.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_14.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc5_14.1 +// CHECK:STDOUT: .F = %assoc0.loc5_14.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -171,40 +171,40 @@ class X(U:! type) { // CHECK:STDOUT: %return.param: ref %Param = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Param = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc13 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param { -// CHECK:STDOUT: %.loc9_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.3: type = converted %int.make_type_signed, %.loc9_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8: %.4 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed, %.loc9_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8: %Param.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Param // CHECK:STDOUT: .x = %.loc9_8 -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] +// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF.generic] // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%Param)> [template = constants.%HasF.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.11 [template = constants.%.12] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.1.%HasF.type -// CHECK:STDOUT: complete_type_witness = %.loc18 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%T.loc4_16.1: type, @HasF.%Self.1: @HasF.%HasF.type (%HasF.type.2)) { @@ -215,51 +215,51 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %Param { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_20: Core.IntLiteral = int_value 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc15_21.1: %.15 = struct_literal (%.loc15_20) -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.39, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_20, %.loc15_21.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.3) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_21.4(%.loc15_20) [template = constants.%.42] -// CHECK:STDOUT: %.loc15_21.5: init %i32 = converted %.loc15_20, %int.convert_checked [template = constants.%.42] -// CHECK:STDOUT: %.loc15_21.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc15_21.7: init %i32 = initialize_from %.loc15_21.5 to %.loc15_21.6 [template = constants.%.42] -// CHECK:STDOUT: %.loc15_21.8: init %Param = class_init (%.loc15_21.7), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc15_22: init %Param = converted %.loc15_21.1, %.loc15_21.8 [template = constants.%struct] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc15_21.1: %struct_type.x.2 = struct_literal (%int_2) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_21.2: init %i32 = converted %int_2, %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_21.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc15_21.4: init %i32 = initialize_from %.loc15_21.2 to %.loc15_21.3 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_21.5: init %Param = class_init (%.loc15_21.4), %return [template = constants.%Param.val] +// CHECK:STDOUT: %.loc15_22: init %Param = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%Param.val] // CHECK:STDOUT: return %.loc15_22 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.3: type = converted %int.make_type_signed.loc21, %.loc21_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc21_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] -// CHECK:STDOUT: %F.ref.loc21: %.7 = name_ref F, %.loc21_17.1 [template = constants.%.8] -// CHECK:STDOUT: %.loc21_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc21_17: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref.loc21: %F.assoc_type.2 = name_ref F, %.loc21_17 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0.loc21: %F.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc21: init %Param = call %.loc21_17.2() to %.loc21_20.1 +// CHECK:STDOUT: %F.call.loc21: init %Param = call %impl.elem0.loc21() to %.loc21_20.1 // CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %F.call.loc21 -// CHECK:STDOUT: %x.ref.loc21: %.4 = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %x.ref.loc21: %Param.elem = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] // CHECK:STDOUT: %.loc21_21.1: ref %i32 = class_element_access %.loc21_20.2, element0 // CHECK:STDOUT: %.loc21_21.2: %i32 = bind_value %.loc21_21.1 // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc21_21.2 -// CHECK:STDOUT: %.loc22_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.3: type = converted %int.make_type_signed.loc22, %.loc22_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_10.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_signed.loc22, %.loc22_10.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc22_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] -// CHECK:STDOUT: %F.ref.loc22: %.7 = name_ref F, %.loc22_17.1 [template = constants.%.8] -// CHECK:STDOUT: %.loc22_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc22_17: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref.loc22: %F.assoc_type.2 = name_ref F, %.loc22_17 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0.loc22: %F.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc22: init %Param = call %.loc22_17.2() to %.loc22_20.1 +// CHECK:STDOUT: %F.call.loc22: init %Param = call %impl.elem0.loc22() to %.loc22_20.1 // CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %F.call.loc22 -// CHECK:STDOUT: %x.ref.loc22: %.4 = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %x.ref.loc22: %Param.elem = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] // CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_20.2, element0 // CHECK:STDOUT: %.loc22_21.2: %i32 = bind_value %.loc22_21.1 // CHECK:STDOUT: assign %b.var, %.loc22_21.2 @@ -289,11 +289,11 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2 => constants.%Self.1 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc5_14.2 => constants.%.7 -// CHECK:STDOUT: %.loc5_14.3 => constants.%.8 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_14.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Param, constants.%.9) { +// CHECK:STDOUT: specific @F.1(constants.%Param, constants.%HasF.facet) { // CHECK:STDOUT: %T => constants.%Param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -303,30 +303,30 @@ class X(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %X.type: type = generic_class_type @X [template] -// CHECK:STDOUT: %X.1: %X.type = struct_value () [template] -// CHECK:STDOUT: %X.2: type = class_type @X, @X(%U) [symbolic] +// CHECK:STDOUT: %X.generic: %X.type = struct_value () [template] +// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.3, %F.type.2 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.2 [symbolic] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%U) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: %I.type.2 = facet_value %X.2, %X.2 [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [symbolic] -// CHECK:STDOUT: %.8: type = struct_type {} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %I.facet: %I.type.2 = facet_value %X, %X [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.3) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -343,14 +343,14 @@ class X(U:! type) { // CHECK:STDOUT: .X = %X.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [template = constants.%X.1] { +// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [template = constants.%X.generic] { // CHECK:STDOUT: %U.patt.loc8_9.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_9.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc8_9.1, runtime_param [symbolic = %U.patt.loc8_9.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -368,66 +368,66 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T.loc4_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_25.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc5_25.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_25.3: @I.%.loc5_25.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.3)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_25.2: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.1)] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc5_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc5_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %t.patt: @F.1.%T (%T) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.1.%T (%T) = value_param_pattern %t.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.2: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.3: type = facet_access_type %Self.ref [symbolic = %.loc5_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_14.4: type = converted %Self.ref, %.loc5_14.3 [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @F.1.%.loc5_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc5_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %t.param: @F.1.%T (%T) = value_param runtime_param1 // CHECK:STDOUT: %t: @F.1.%T (%T) = bind_name t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_25.1: @I.%.loc5_25.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.3)] +// CHECK:STDOUT: %assoc0.loc5_25.1: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc5_25.1 +// CHECK:STDOUT: .F = %assoc0.loc5_25.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(@X.%U.loc8_9.1: type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X.2)] +// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X)] // CHECK:STDOUT: %I.type.loc9_21.2: type = facet_type <@I, @I(%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%U) [symbolic = %F.type (constants.%F.type.3)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.3) = struct_value () [symbolic = %F (constants.%F.3)] -// CHECK:STDOUT: %.loc9_23.2: = interface_witness (%F) [symbolic = %.loc9_23.2 (constants.%.7)] +// CHECK:STDOUT: %interface.loc9_23.2: = interface_witness (%F) [symbolic = %interface.loc9_23.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %I.type.loc9_21.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.3) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.3)] { -// CHECK:STDOUT: %self.patt: @F.2.%X (%X.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.2.%X (%X.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.2.%X (%X) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.2.%X (%X) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %t.patt: @F.2.%U (%U) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.2.%U (%U) = value_param_pattern %t.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10: type = specific_constant constants.%X.2, @X(constants.%U) [symbolic = %X (constants.%X.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10 [symbolic = %X (constants.%X.2)] +// CHECK:STDOUT: %.loc10: type = specific_constant constants.%X, @X(constants.%U) [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10 [symbolic = %X (constants.%X)] // CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %self.param: @F.2.%X (%X.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.2.%X (%X.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.2.%X (%X) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.2.%X (%X) = bind_name self, %self.param // CHECK:STDOUT: %t.param: @F.2.%U (%U) = value_param runtime_param1 // CHECK:STDOUT: %t: @F.2.%U (%U) = bind_name t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_23.1: = interface_witness (%F.decl) [symbolic = %.loc9_23.2 (constants.%.7)] +// CHECK:STDOUT: %interface.loc9_23.1: = interface_witness (%F.decl) [symbolic = %interface.loc9_23.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc9_23.1 +// CHECK:STDOUT: witness = %interface.loc9_23.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -440,18 +440,18 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X.2 [symbolic = %X (constants.%X.2)] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %I.type.loc9_21.1: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.3)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9: type = specific_constant @impl.%I.type.loc9_21.1, @impl(constants.%U) [symbolic = %I.type (constants.%I.type.3)] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%X.2 +// CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: extend %.loc9 -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -459,18 +459,18 @@ class X(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.1: type = facet_access_type %Self [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc5_14.1 (%.1)](%t.param_patt: @F.1.%T (%T)); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type)](%t.param_patt: @F.1.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@X.%U.loc8_9.1: type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X.2)] +// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.2.%X (%X.2)](%t.param_patt: @F.2.%U (%U)) { +// CHECK:STDOUT: fn[%self.param_patt: @F.2.%X (%X)](%t.param_patt: @F.2.%U (%U)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -490,7 +490,7 @@ class X(U:! type) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc5_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%T.loc4_13.2) { @@ -515,8 +515,8 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc5_25.2 => constants.%.4 -// CHECK:STDOUT: %.loc5_25.3 => constants.%.5 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_25.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(@impl.%U) { @@ -531,13 +531,13 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%U) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %X => constants.%X.2 +// CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: %I.type.loc9_21.2 => constants.%I.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc9_23.2 => constants.%.7 +// CHECK:STDOUT: %interface.loc9_23.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(@F.2.%U) { @@ -547,19 +547,19 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%U) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %X => constants.%X.2 +// CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%U, constants.%.6) { +// CHECK:STDOUT: specific @F.1(constants.%U, constants.%I.facet) { // CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.3 -// CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %.loc5_14.1 => constants.%X.2 +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %X => constants.%X.2 +// CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: %I.type.loc9_21.2 => constants.%I.type.3 // 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 2b528ab5302fe..8cea59c234464 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -28,18 +28,18 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%G.decl [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %Simple.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, %i32 [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -61,20 +61,20 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_20.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.3: type = converted %int.make_type_signed, %.loc22_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_signed, %.loc22_20.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -83,24 +83,24 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = 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.patt: @G.1.%.loc12_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @G.1.%.loc12_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%.loc12_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc12: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %G.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .G = %.loc12 +// CHECK:STDOUT: .G = %assoc0 // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc15_6.3 as %Simple.ref { +// CHECK:STDOUT: impl @impl: %.loc15_6.2 as %Simple.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %self.patt: = binding_pattern self // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, runtime_param0 @@ -109,18 +109,18 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.param: = value_param runtime_param0 // CHECK:STDOUT: %self: = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_20: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.loc15_20 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%.loc12_14.1 (%.1)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2[%self.param_patt: ](); @@ -129,19 +129,19 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.2 = name_ref G, @Simple.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_4.1: %G.type.1 = interface_witness_access , element0 [template = ] -// CHECK:STDOUT: %.loc23_4.2: = bound_method %n.ref, %.loc23_4.1 +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %G.type.1 = interface_witness_access , element0 [template = ] +// CHECK:STDOUT: %G.bound: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%.5) { -// CHECK:STDOUT: %Self => constants.%.5 -// CHECK:STDOUT: %.loc12_14.1 => constants.%i32 +// CHECK:STDOUT: specific @G.1(constants.%Simple.facet) { +// CHECK:STDOUT: %Self => constants.%Simple.facet +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%i32 // CHECK:STDOUT: } // 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 a795c9effd4e0..ef38d9997ca73 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -27,20 +27,20 @@ class C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.1: type = generic_interface_type @GenericInterface [template] -// CHECK:STDOUT: %GenericInterface: %GenericInterface.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.1 = struct_value () [template] // CHECK:STDOUT: %GenericInterface.type.2: type = facet_type <@GenericInterface, @GenericInterface(%T)> [symbolic] // CHECK:STDOUT: %Self: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @GenericInterface(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %GenericInterface.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @GenericInterface.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %GenericInterface.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @GenericInterface.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: %GenericInterface.type.2 = facet_value %C, %C [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %GenericInterface.facet: %GenericInterface.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.1 = interface_decl @GenericInterface [template = constants.%GenericInterface] { +// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.1 = interface_decl @GenericInterface [template = constants.%GenericInterface.generic] { // CHECK:STDOUT: %T.patt.loc11_28.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_28.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_28.1, runtime_param [symbolic = %T.patt.loc11_28.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -76,8 +76,8 @@ class C { // CHECK:STDOUT: %Self.2: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @GenericInterface(%T.loc11_28.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @GenericInterface.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc12_13.2: type = assoc_entity_type @GenericInterface.%GenericInterface.type (%GenericInterface.type.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %.loc12_13.2 (constants.%.1)] -// CHECK:STDOUT: %.loc12_13.3: @GenericInterface.%.loc12_13.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @GenericInterface.%GenericInterface.type (%GenericInterface.type.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type)] +// CHECK:STDOUT: %assoc0.loc12_13.2: @GenericInterface.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -89,11 +89,11 @@ class C { // CHECK:STDOUT: %x.param: @F.1.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.1.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_13.1: @GenericInterface.%.loc12_13.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc12_13.1: @GenericInterface.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc12_13.1 +// CHECK:STDOUT: .F = %assoc0.loc12_13.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -106,7 +106,7 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc19_23.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc19_56.2: = interface_witness (%F) [symbolic = %interface.loc19_56.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19_54.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -117,11 +117,11 @@ class C { // CHECK:STDOUT: %x.param: @F.2.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_56.1: = interface_witness (%F.decl) [symbolic = %.loc19_56.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc19_56.1: = interface_witness (%F.decl) [symbolic = %interface.loc19_56.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc19_56.1 +// CHECK:STDOUT: witness = %interface.loc19_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -131,19 +131,19 @@ class C { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_23.1, runtime_param [symbolic = %T.patt.loc19_23.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] +// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_23.1 [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: %GenericInterface.type.loc19_54.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc19_54.2 (constants.%GenericInterface.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_23.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: type = specific_constant @impl.%GenericInterface.type.loc19_54.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.2] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@GenericInterface.%T.loc11_28.1: type, @GenericInterface.%Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.2)) { @@ -172,8 +172,8 @@ class C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc12_13.2 => constants.%.1 -// CHECK:STDOUT: %.loc12_13.3 => constants.%.2 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type +// CHECK:STDOUT: %assoc0.loc12_13.2 => constants.%assoc0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) { @@ -198,14 +198,14 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc19_56.2 => constants.%.4 +// CHECK:STDOUT: %interface.loc19_56.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) { +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%GenericInterface.facet) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // 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 81f18d2365f4b..a8b085e0931e2 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -20,11 +20,11 @@ extend impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,10 +43,10 @@ extend impl i32 as I {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc16_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = converted %int.make_type_signed, %.loc16_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -59,10 +59,10 @@ extend impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc16_13.3 as %I.ref { -// CHECK:STDOUT: %.loc16_22: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: impl @impl: %.loc16_13.2 as %I.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc16_22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: 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 6a4872e4bae54..482e58d07fff2 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -45,13 +45,13 @@ class E { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %E: type = class_type @E [template] // CHECK:STDOUT: } @@ -87,36 +87,36 @@ class E { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc18_15.3 as %I.ref { -// CHECK:STDOUT: %.loc18_24: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: impl @impl.1: %.loc18_15.2 as %I.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc18_24 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D.ref as %I.ref; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %Self.ref as %I.ref { -// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc39 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc18_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.3: type = converted %int.make_type_signed, %.loc18_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_signed, %.loc18_15.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -124,12 +124,12 @@ class E { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc30: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: extend @impl.2.%I.ref -// CHECK:STDOUT: complete_type_witness = %.loc30 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { @@ -137,11 +137,11 @@ class E { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc40: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E // CHECK:STDOUT: extend @impl.3.%I.ref -// CHECK:STDOUT: complete_type_witness = %.loc40 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index 0898cb98b5d58..6267201553d56 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -19,12 +19,12 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,14 +51,14 @@ class C { // CHECK:STDOUT: %.loc15_18.2: type = converted @impl.%int.make_type_signed, %.loc15_18.1 [template = constants.%i32] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc16 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: 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 0ed43a4da1d2d..f9107f478480d 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -27,8 +27,8 @@ interface I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C.1: type = class_type @C [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%Self) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,13 +73,13 @@ interface I { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: type = specific_constant @impl.%I.ref, @impl(constants.%Self) [template = constants.%I.type] -// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 // CHECK:STDOUT: extend %.loc19 // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index d07de12820e7a..b316c14142a51 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -50,8 +50,8 @@ fn F(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -92,13 +92,13 @@ fn F(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.%I.ref // CHECK:STDOUT: has_error -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param_patt: %C) { diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index ce64d658823af..60604e2c5f136 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -26,11 +26,11 @@ impl as Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,21 +56,21 @@ impl as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { 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 fe39c10513035..b9d7591b7ce17 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -20,8 +20,8 @@ impl bool as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -52,11 +52,11 @@ impl bool as I {} // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc11 +// CHECK:STDOUT: .T = %assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 60289bc373ed7..af6d29d9c9dfc 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -220,11 +220,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_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] @@ -235,84 +235,84 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %I.type = facet_value %FExtraParam, %FExtraParam [template] +// CHECK:STDOUT: %I.facet.1: %I.type = facet_value %FExtraParam, %FExtraParam [template] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.4: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: %I.type = facet_value %FExtraImplicitParam, %FExtraImplicitParam [template] +// CHECK:STDOUT: %I.facet.2: %I.type = facet_value %FExtraImplicitParam, %FExtraImplicitParam [template] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.5: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: %I.type = facet_value %FExtraReturnType, %FExtraReturnType [template] +// CHECK:STDOUT: %I.facet.3: %I.type = facet_value %FExtraReturnType, %FExtraReturnType [template] // CHECK:STDOUT: %J.type: type = facet_type <@J> [template] // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.6: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %J.type, %F.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %J.type, %F.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @J.%F.decl [template] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.7: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.10: %J.type = facet_value %FMissingParam, %FMissingParam [template] +// CHECK:STDOUT: %J.facet.1: %J.type = facet_value %FMissingParam, %FMissingParam [template] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [template] // CHECK:STDOUT: %F.type.7: type = fn_type @F.7 [template] // CHECK:STDOUT: %F.8: %F.type.7 = struct_value () [template] -// CHECK:STDOUT: %.11: %J.type = facet_value %FMissingImplicitParam, %FMissingImplicitParam [template] +// CHECK:STDOUT: %J.facet.2: %J.type = facet_value %FMissingImplicitParam, %FMissingImplicitParam [template] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [template] // CHECK:STDOUT: %F.type.8: type = fn_type @F.8 [template] // CHECK:STDOUT: %F.9: %F.type.8 = struct_value () [template] -// CHECK:STDOUT: %.12: %J.type = facet_value %FMissingReturnType, %FMissingReturnType [template] +// CHECK:STDOUT: %J.facet.3: %J.type = facet_value %FMissingReturnType, %FMissingReturnType [template] // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [template] // CHECK:STDOUT: %F.type.9: type = fn_type @F.9 [template] // CHECK:STDOUT: %F.10: %F.type.9 = struct_value () [template] -// CHECK:STDOUT: %.13: %J.type = facet_value %FDifferentParamType, %FDifferentParamType [template] +// CHECK:STDOUT: %J.facet.4: %J.type = facet_value %FDifferentParamType, %FDifferentParamType [template] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [template] // CHECK:STDOUT: %F.type.10: type = fn_type @F.10 [template] // CHECK:STDOUT: %F.11: %F.type.10 = struct_value () [template] -// CHECK:STDOUT: %.14: %J.type = facet_value %FDifferentImplicitParamType, %FDifferentImplicitParamType [template] +// CHECK:STDOUT: %J.facet.5: %J.type = facet_value %FDifferentImplicitParamType, %FDifferentImplicitParamType [template] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [template] // CHECK:STDOUT: %F.type.11: type = fn_type @F.11 [template] // CHECK:STDOUT: %F.12: %F.type.11 = struct_value () [template] -// CHECK:STDOUT: %.15: %J.type = facet_value %FDifferentReturnType, %FDifferentReturnType [template] +// CHECK:STDOUT: %J.facet.6: %J.type = facet_value %FDifferentReturnType, %FDifferentReturnType [template] // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [template] // CHECK:STDOUT: %F.type.12: type = fn_type @F.12 [template] // CHECK:STDOUT: %F.13: %F.type.12 = struct_value () [template] -// CHECK:STDOUT: %.16: %J.type = facet_value %FDifferentParamName, %FDifferentParamName [template] +// CHECK:STDOUT: %J.facet.7: %J.type = facet_value %FDifferentParamName, %FDifferentParamName [template] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [template] // CHECK:STDOUT: %Self.3: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.17: type = facet_access_type %Self.3 [symbolic] -// CHECK:STDOUT: %.18: type = ptr_type %.17 [symbolic] -// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %ptr.1: type = ptr_type %Self.as_type [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] -// CHECK:STDOUT: %.20: type = struct_type {.x: %.17, .y: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.18, %.20) [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.22: type = array_type %.21, %.17 [symbolic] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%ptr.1, %struct_type.x.y.1) [symbolic] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %array_type.1: type = array_type %int_4, %Self.as_type [symbolic] // CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] // CHECK:STDOUT: %F.14: %F.type.13 = struct_value () [template] -// CHECK:STDOUT: %.23: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] -// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.3: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] +// CHECK:STDOUT: %assoc0.3: %F.assoc_type.3 = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] -// CHECK:STDOUT: %.25: type = ptr_type %SelfNestedBadParam [template] -// CHECK:STDOUT: %.26: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.25, %.26) [template] -// CHECK:STDOUT: %.27: type = array_type %.21, %SelfNestedBadParam [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %SelfNestedBadParam [template] +// CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: %i32, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%ptr.2, %struct_type.x.y.2) [template] +// CHECK:STDOUT: %array_type.2: type = array_type %int_4, %SelfNestedBadParam [template] // CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] // CHECK:STDOUT: %F.15: %F.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: %SelfNested.type = facet_value %SelfNestedBadParam, %SelfNestedBadParam [template] -// CHECK:STDOUT: %.29: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.25, %.29) [template] +// CHECK:STDOUT: %SelfNested.facet.1: %SelfNested.type = facet_value %SelfNestedBadParam, %SelfNestedBadParam [template] +// CHECK:STDOUT: %struct_type.x.y.3: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%ptr.2, %struct_type.x.y.3) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.30: type = ptr_type %SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.31: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.30, %.31) [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %struct_type.x.y.4: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%ptr.3, %struct_type.x.y.4) [template] // CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] // CHECK:STDOUT: %F.16: %F.type.15 = struct_value () [template] -// CHECK:STDOUT: %.32: %SelfNested.type = facet_value %SelfNestedBadReturnType, %SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.33: type = array_type %.21, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %SelfNested.facet.2: %SelfNested.type = facet_value %SelfNestedBadReturnType, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %array_type.3: type = array_type %int_4, %SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -372,11 +372,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type.1 = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc11 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -406,11 +406,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93: %.8 = assoc_entity element0, %F.decl [template = constants.%.9] +// CHECK:STDOUT: %assoc0: %F.assoc_type.2 = assoc_entity element0, %F.decl [template = constants.%assoc0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc93 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -419,65 +419,65 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.decl: %F.type.13 = fn_decl @F.13 [template = constants.%F.14] { // CHECK:STDOUT: %x.patt: @F.13.%tuple.type (%tuple.type.2) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.13.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.13.%.loc188_52.1 (%.22) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.13.%.loc188_52.1 (%.22) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.13.%array_type.loc188_52.1 (%array_type.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.13.%array_type.loc188_52.1 (%array_type.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.3: type = facet_access_type %Self.ref.loc188_12 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_16.4: type = converted %Self.ref.loc188_12, %.loc188_16.3 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_16.5: type = ptr_type %.17 [symbolic = %.loc188_16.2 (constants.%.18)] +// CHECK:STDOUT: %Self.as_type.loc188_16.2: type = facet_access_type %Self.ref.loc188_12 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc188_16: type = converted %Self.ref.loc188_12, %Self.as_type.loc188_16.2 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %ptr.loc188_16.2: type = ptr_type %Self.as_type [symbolic = %ptr.loc188_16.1 (constants.%ptr.1)] // CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_24.1: type = facet_access_type %Self.ref.loc188_24 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_34.1: Core.IntLiteral = int_value 32 [template = constants.%.19] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc188_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc188_34.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc188_34.3: type = converted %int.make_type_signed, %.loc188_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc188_37.2: type = struct_type {.x: %.17, .y: %i32} [symbolic = %.loc188_37.1 (constants.%.20)] -// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%.loc188_16.5, %.loc188_37.2) +// CHECK:STDOUT: %Self.as_type.loc188_24: type = facet_access_type %Self.ref.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc188_24: type = converted %Self.ref.loc188_24, %Self.as_type.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc188_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc188_34.2: type = converted %int.make_type_signed, %.loc188_34.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.x.y.loc188_37.2: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%ptr.loc188_16.2, %struct_type.x.y.loc188_37.2) // CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %Self.ref.loc188_45: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_51: Core.IntLiteral = int_value 4 [template = constants.%.21] -// CHECK:STDOUT: %.loc188_45.1: type = facet_access_type %Self.ref.loc188_45 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_52.2: type = array_type %.loc188_51, %.17 [symbolic = %.loc188_52.1 (constants.%.22)] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %Self.as_type.loc188_45: type = facet_access_type %Self.ref.loc188_45 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc188_45: type = converted %Self.ref.loc188_45, %Self.as_type.loc188_45 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %array_type.loc188_52.2: type = array_type %int_4, %Self.as_type [symbolic = %array_type.loc188_52.1 (constants.%array_type.1)] // CHECK:STDOUT: %x.param: @F.13.%tuple.type (%tuple.type.2) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.13.%tuple.type (%tuple.type.2) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.13.%.loc188_52.1 (%.22) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.13.%.loc188_52.1 (%.22) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.13.%array_type.loc188_52.1 (%array_type.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.13.%array_type.loc188_52.1 (%array_type.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188: %.23 = assoc_entity element0, %F.decl [template = constants.%.24] +// CHECK:STDOUT: %assoc0: %F.assoc_type.3 = assoc_entity element0, %F.decl [template = constants.%assoc0.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc188 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %I.ref { -// CHECK:STDOUT: %.loc21: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc21 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %I.ref { // CHECK:STDOUT: %F.decl: type = class_decl @F.16 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc25: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc25 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %Self.ref as %I.ref { // 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: %.loc41: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F -// CHECK:STDOUT: witness = %.loc41 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %Self.ref as %I.ref { @@ -491,11 +491,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc54: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc54 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: %Self.ref as %I.ref { @@ -507,11 +507,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %self.param: %FExtraImplicitParam = value_param runtime_param0 // CHECK:STDOUT: %self: %FExtraImplicitParam = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc67: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc67 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6: %Self.ref as %I.ref { @@ -525,11 +525,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc81: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc81 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7: %Self.ref as %J.ref { @@ -550,11 +550,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc96: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc96 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.8: %Self.ref as %J.ref { @@ -575,11 +575,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc109: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc109 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.9: %Self.ref as %J.ref { @@ -600,11 +600,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc122: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc122 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.10: %Self.ref as %J.ref { @@ -630,11 +630,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc135: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc135 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.11: %Self.ref as %J.ref { @@ -660,11 +660,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc148: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc148 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.12: %Self.ref as %J.ref { @@ -690,11 +690,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param runtime_param2 // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc161: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc161 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.13: %Self.ref as %J.ref { @@ -722,78 +722,78 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc175: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc175 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.14 = fn_decl @F.14 [template = constants.%F.15] { // CHECK:STDOUT: %x.patt: %tuple.type.3 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.27 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.27 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %array_type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %array_type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.25] -// CHECK:STDOUT: %.loc200_40.1: Core.IntLiteral = int_value 32 [template = constants.%.19] -// CHECK:STDOUT: %int.make_type_signed.loc200_40: init type = call constants.%Int(%.loc200_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc200_40.2: type = value_of_initializer %int.make_type_signed.loc200_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_40.3: type = converted %int.make_type_signed.loc200_40, %.loc200_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.1: Core.IntLiteral = int_value 32 [template = constants.%.19] -// CHECK:STDOUT: %int.make_type_signed.loc200_49: init type = call constants.%Int(%.loc200_49.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.2: type = value_of_initializer %int.make_type_signed.loc200_49 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.3: type = converted %int.make_type_signed.loc200_49, %.loc200_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: %i32, .y: %i32} [template = constants.%.26] -// CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%.loc200_32, %.loc200_52) +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc200_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc200_40: init type = call constants.%Int(%int_32.loc200_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc200_40.1: type = value_of_initializer %int.make_type_signed.loc200_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc200_40.2: type = converted %int.make_type_signed.loc200_40, %.loc200_40.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc200_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc200_49: init type = call constants.%Int(%int_32.loc200_49) [template = constants.%i32] +// CHECK:STDOUT: %.loc200_49.1: type = value_of_initializer %int.make_type_signed.loc200_49 [template = constants.%i32] +// CHECK:STDOUT: %.loc200_49.2: type = converted %int.make_type_signed.loc200_49, %.loc200_49.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template = constants.%struct_type.x.y.2] +// CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_80: Core.IntLiteral = int_value 4 [template = constants.%.21] -// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.27] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam [template = constants.%array_type.2] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.27 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.27 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %array_type.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %array_type.2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc192: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc192 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.15 = fn_decl @F.15 [template = constants.%F.16] { // CHECK:STDOUT: %x.patt: %tuple.type.5 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.5 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.27 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.27 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %array_type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %array_type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.30] +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType [template = constants.%ptr.3] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_74.1: Core.IntLiteral = int_value 32 [template = constants.%.19] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc212_74.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc212_74.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc212_74.3: type = converted %int.make_type_signed, %.loc212_74.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%.31] -// CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%.loc212_37, %.loc212_77) +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc212_74.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc212_74.2: type = converted %int.make_type_signed, %.loc212_74.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%struct_type.x.y.4] +// CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc212_105: Core.IntLiteral = int_value 4 [template = constants.%.21] -// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.27] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam [template = constants.%array_type.2] // CHECK:STDOUT: %x.param: %tuple.type.5 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.5 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.27 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.27 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %array_type.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %array_type.2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc205: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc205 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NoF { @@ -801,11 +801,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [template = constants.%NoF] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NoF -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FNotFunction { @@ -813,11 +813,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [template = constants.%FNotFunction] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FNotFunction -// CHECK:STDOUT: complete_type_witness = %.loc35 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @F.16; @@ -827,11 +827,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [template = constants.%FAlias] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc51: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FAlias -// CHECK:STDOUT: complete_type_witness = %.loc51 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FExtraParam { @@ -839,11 +839,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [template = constants.%FExtraParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc64: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraParam -// CHECK:STDOUT: complete_type_witness = %.loc64 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FExtraImplicitParam { @@ -851,11 +851,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc77: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam -// CHECK:STDOUT: complete_type_witness = %.loc77 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FExtraReturnType { @@ -863,11 +863,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [template = constants.%FExtraReturnType] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc91: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraReturnType -// CHECK:STDOUT: complete_type_witness = %.loc91 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FMissingParam { @@ -875,11 +875,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [template = constants.%FMissingParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc106: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingParam -// CHECK:STDOUT: complete_type_witness = %.loc106 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FMissingImplicitParam { @@ -887,11 +887,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [template = constants.%FMissingImplicitParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc119: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam -// CHECK:STDOUT: complete_type_witness = %.loc119 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FMissingReturnType { @@ -899,11 +899,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [template = constants.%FMissingReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc132: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingReturnType -// CHECK:STDOUT: complete_type_witness = %.loc132 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FDifferentParamType { @@ -911,11 +911,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc145: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamType -// CHECK:STDOUT: complete_type_witness = %.loc145 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FDifferentImplicitParamType { @@ -923,11 +923,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc158: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType -// CHECK:STDOUT: complete_type_witness = %.loc158 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FDifferentReturnType { @@ -935,11 +935,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc171: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentReturnType -// CHECK:STDOUT: complete_type_witness = %.loc171 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FDifferentParamName { @@ -947,11 +947,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [template = constants.%FDifferentParamName] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc185: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamName -// CHECK:STDOUT: complete_type_witness = %.loc185 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SelfNestedBadParam { @@ -959,11 +959,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc202: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam -// CHECK:STDOUT: complete_type_witness = %.loc202 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SelfNestedBadReturnType { @@ -971,11 +971,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc214: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType -// CHECK:STDOUT: complete_type_witness = %.loc214 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -1012,67 +1012,67 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.1: type = facet_access_type %Self [symbolic = %.loc188_16.1 (constants.%.17)] -// CHECK:STDOUT: %.loc188_16.2: type = ptr_type @F.13.%.loc188_16.1 (%.17) [symbolic = %.loc188_16.2 (constants.%.18)] -// CHECK:STDOUT: %.loc188_37.1: type = struct_type {.x: @F.13.%.loc188_16.1 (%.17), .y: %i32} [symbolic = %.loc188_37.1 (constants.%.20)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.13.%.loc188_16.2 (%.18), @F.13.%.loc188_37.1 (%.20)) [symbolic = %tuple.type (constants.%tuple.type.2)] -// CHECK:STDOUT: %.loc188_52.1: type = array_type constants.%.21, @F.13.%.loc188_16.1 (%.17) [symbolic = %.loc188_52.1 (constants.%.22)] +// CHECK:STDOUT: %Self.as_type.loc188_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %ptr.loc188_16.1: type = ptr_type @F.13.%Self.as_type.loc188_16.1 (%Self.as_type) [symbolic = %ptr.loc188_16.1 (constants.%ptr.1)] +// CHECK:STDOUT: %struct_type.x.y.loc188_37.1: type = struct_type {.x: @F.13.%Self.as_type.loc188_16.1 (%Self.as_type), .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.13.%ptr.loc188_16.1 (%ptr.1), @F.13.%struct_type.x.y.loc188_37.1 (%struct_type.x.y.1)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %array_type.loc188_52.1: type = array_type constants.%int_4, @F.13.%Self.as_type.loc188_16.1 (%Self.as_type) [symbolic = %array_type.loc188_52.1 (constants.%array_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param_patt: @F.13.%tuple.type (%tuple.type.2)) -> @F.13.%.loc188_52.1 (%.22); +// CHECK:STDOUT: fn(%x.param_patt: @F.13.%tuple.type (%tuple.type.2)) -> @F.13.%array_type.loc188_52.1 (%array_type.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.14(%x.param_patt: %tuple.type.3) -> %.27; +// CHECK:STDOUT: fn @F.14(%x.param_patt: %tuple.type.3) -> %array_type.2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(%x.param_patt: %tuple.type.5) -> %.27; +// CHECK:STDOUT: fn @F.15(%x.param_patt: %tuple.type.5) -> %array_type.2; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.6) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.5(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.10) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.11) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.12) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.3) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.13) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.14) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.5) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.15) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.6) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%.16) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.7) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.loc188_16.1 => constants.%.17 -// CHECK:STDOUT: %.loc188_16.2 => constants.%.18 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.20 +// CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%Self.as_type +// CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.1 +// CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.1 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.22 +// CHECK:STDOUT: %array_type.loc188_52.1 => constants.%array_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%.28) { -// CHECK:STDOUT: %Self => constants.%.28 -// CHECK:STDOUT: %.loc188_16.1 => constants.%SelfNestedBadParam -// CHECK:STDOUT: %.loc188_16.2 => constants.%.25 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.29 +// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.1) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.1 +// CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadParam +// CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.2 +// CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.3 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.27 +// CHECK:STDOUT: %array_type.loc188_52.1 => constants.%array_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%.32) { -// CHECK:STDOUT: %Self => constants.%.32 -// CHECK:STDOUT: %.loc188_16.1 => constants.%SelfNestedBadReturnType -// CHECK:STDOUT: %.loc188_16.2 => constants.%.30 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.31 +// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.2) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.2 +// CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadReturnType +// CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.3 +// CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.4 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.5 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.33 +// CHECK:STDOUT: %array_type.loc188_52.1 => constants.%array_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index 33b66ebe53a1a..7b0df3d6dc76e 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -46,11 +46,11 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: --- fail_impl_as_false.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,17 +67,17 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11: type = converted @impl.9.%.loc11_13, [template = ] +// CHECK:STDOUT: %.loc11: type = converted @impl.9.%false, [template = ] // CHECK:STDOUT: impl_decl @impl.9 [template] {} { -// CHECK:STDOUT: %.loc11_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_6.3: type = converted %int.make_type_signed, %.loc11_6.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_6.2: type = converted %int.make_type_signed, %.loc11_6.1 [template = constants.%i32] +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9: %.loc11_6.3 as { +// CHECK:STDOUT: impl @impl.9: %.loc11_6.2 as { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } @@ -117,7 +117,7 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: --- fail_impl_as_type_where.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] @@ -138,10 +138,10 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc10_6.1: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc10_6.1) [template = f64] -// CHECK:STDOUT: %.loc10_6.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc10_6.3: type = converted %float.make_type, %.loc10_6.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc10_6.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc10_6.2: type = converted %float.make_type, %.loc10_6.1 [template = f64] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %.loc10_18: type = where_expr %.Self [template = constants.%type_where] { @@ -150,7 +150,7 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc10_6.3 as %.loc10_18 { +// CHECK:STDOUT: impl @impl: %.loc10_6.2 as %.loc10_18 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index b9c1821bb308c..275fdefcece7a 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -25,10 +25,10 @@ impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,17 +47,17 @@ impl i32 as I {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc13_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.3: type = converted %int.make_type_signed.loc13, %.loc13_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed.loc13, %.loc13_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc21_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_6.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_6.3: type = converted %int.make_type_signed.loc21, %.loc21_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_6.2: type = converted %int.make_type_signed.loc21, %.loc21_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -70,7 +70,7 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc13_6.3 as %I.ref.loc13 { +// CHECK:STDOUT: impl @impl: %.loc13_6.2 as %I.ref.loc13 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = .inst+25.loc13_15 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 61f8b3733ecc6..becddd56aede7 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -32,26 +32,26 @@ impl i32 as I { // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %X.patt: %T = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T, %X) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T, %X) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%I.type, %Self) [symbolic] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%I.type, %Self) [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(type, %i32) [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(type, %i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: %I.type = facet_value %i32, %i32 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%I.type, %.6) [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%I.type, %I.facet) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,7 +69,7 @@ impl i32 as I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc11_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_9.1, runtime_param [symbolic = %T.patt.loc11_9.2 (constants.%T.patt)] // CHECK:STDOUT: %X.patt.loc11_19.1: @C.%T.loc11_9.2 (%T) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] @@ -83,10 +83,10 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc17_6.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_6.3: type = converted %int.make_type_signed, %.loc17_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_6.2: type = converted %int.make_type_signed, %.loc17_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -94,40 +94,40 @@ impl i32 as I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %c.patt: @F.1.%C.loc14_17.1 (%C.3) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_17.1 (%C.3) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @F.1.%C.loc14_17.1 (%C.2) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_17.1 (%C.2) = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %C.loc14_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_17.1 (constants.%C.3)] -// CHECK:STDOUT: %c.param: @F.1.%C.loc14_17.1 (%C.3) = value_param runtime_param0 -// CHECK:STDOUT: %c: @F.1.%C.loc14_17.1 (%C.3) = bind_name c, %c.param +// CHECK:STDOUT: %C.loc14_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_17.1 (constants.%C.2)] +// CHECK:STDOUT: %c.param: @F.1.%C.loc14_17.1 (%C.2) = value_param runtime_param0 +// CHECK:STDOUT: %c: @F.1.%C.loc14_17.1 (%C.2) = bind_name c, %c.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc17_6.3 as %I.ref { +// CHECK:STDOUT: impl @impl: %.loc17_6.2 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %c.patt: %C.4 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %C.4 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %C.3 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %C.3 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc24: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24) [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.4] -// CHECK:STDOUT: %c.param: %C.4 = value_param runtime_param0 -// CHECK:STDOUT: %c: %C.4 = bind_name c, %c.param +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.3] +// CHECK:STDOUT: %c.param: %C.3 = value_param runtime_param0 +// CHECK:STDOUT: %c: %C.3 = bind_name c, %c.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17_15: = interface_witness () [template = ] +// CHECK:STDOUT: %interface: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc17_15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc11_9.1: type, %X.loc11_19.1: @C.%T.loc11_9.2 (%T)) { @@ -139,22 +139,22 @@ impl i32 as I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %C.loc14_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc14_17.1 (constants.%C.3)] +// CHECK:STDOUT: %C.loc14_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc14_17.1 (constants.%C.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc14_17.1 (%C.3)); +// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc14_17.1 (%C.2)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.4); +// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.3); // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T, constants.%X) { // CHECK:STDOUT: %T.loc11_9.2 => constants.%T @@ -179,7 +179,7 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.3 +// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(type, constants.%i32) { @@ -189,15 +189,15 @@ impl i32 as I { // CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.6) { -// CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.5 +// CHECK:STDOUT: specific @F.1(constants.%I.facet) { +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, constants.%.6) { +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet) { // CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type // CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type -// CHECK:STDOUT: %X.loc11_19.2 => constants.%.6 -// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%.6 +// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%I.facet // CHECK:STDOUT: } // 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 a48499d37ef30..64a039c1256fe 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -20,13 +20,13 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type.1: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self [symbolic] -// CHECK:STDOUT: %.4: type = interface_witness_access %.3, element0 [symbolic] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] // CHECK:STDOUT: %I.type.2: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,14 +52,14 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type.1] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc11 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_22.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc16_22.2: type = interface_witness_access %.loc16_22.1, element0 [symbolic = constants.%.4] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %bool.make_type.loc16_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %bool.make_type.loc16_27 [template = bool] // CHECK:STDOUT: %.loc16_27.2: type = converted %bool.make_type.loc16_27, %.loc16_27.1 [template = bool] // CHECK:STDOUT: %.loc16_16: type = where_expr %.Self [template = constants.%I.type.2] { -// CHECK:STDOUT: requirement_rewrite %.loc16_22.2, %.loc16_27.2 +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_27.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -67,11 +67,11 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc11 +// CHECK:STDOUT: .T = %assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 3055680f08fa7..5b32ce087ff76 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -28,16 +28,16 @@ class C { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %Simple.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,21 +61,21 @@ class C { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -83,11 +83,11 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc22 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { @@ -100,14 +100,14 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_19.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc19_19.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: %.loc19_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), %c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc19_20 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 7db8e3e446d8c..5dcd4322390e5 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -23,14 +23,14 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: %Simple.type = facet_value %T, %T [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,11 +61,11 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -76,15 +76,15 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc15_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc15_36.2: = interface_witness (%F) [symbolic = %.loc15_36.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc15_36.2: = interface_witness (%F) [symbolic = %interface.loc15_36.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc15_36.1: = interface_witness (%F.decl) [symbolic = %.loc15_36.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc15_36.1: = interface_witness (%F.decl) [symbolic = %interface.loc15_36.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc15_36.1 +// CHECK:STDOUT: witness = %interface.loc15_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -111,12 +111,12 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc15_36.2 => constants.%.4 +// CHECK:STDOUT: %interface.loc15_36.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc15_14.2) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index 3d4491aae5160..ac3586b59830e 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -33,15 +33,15 @@ fn G(c: C) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,33 +80,33 @@ fn G(c: C) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc19 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %G: %.1 = bind_alias G, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %G: %F.assoc_type = bind_alias G, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .G = %G -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { @@ -122,17 +122,17 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %.1 = name_ref G, @C.%G [template = constants.%.2] -// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %.loc24() +// CHECK:STDOUT: %G.ref.loc24: %F.assoc_type = name_ref G, @C.%G [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc24: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %.1 = name_ref G, @C.%G [template = constants.%.2] -// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %.loc25() +// CHECK:STDOUT: %G.ref.loc25: %F.assoc_type = name_ref G, @C.%G [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc25: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // 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 fb25ae355a1aa..d6622d412adec 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 @@ -35,11 +35,11 @@ fn F(c: C) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -74,24 +74,24 @@ fn F(c: C) { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %F: %.1 = bind_alias F, @I.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %F: %F.assoc_type = bind_alias F, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -102,9 +102,9 @@ fn F(c: C) { // CHECK:STDOUT: fn @F.2(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc24: %.1 = name_ref F, @C.%F [template = constants.%.2] +// CHECK:STDOUT: %F.ref.loc24: %F.assoc_type = name_ref F, @C.%F [template = constants.%assoc0] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc28: %.1 = name_ref F, @C.%F [template = constants.%.2] +// CHECK:STDOUT: %F.ref.loc28: %F.assoc_type = name_ref F, @C.%F [template = constants.%assoc0] // 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 cfafb5193b1b3..9c7bb2a8cc202 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -35,21 +35,21 @@ impl C as I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: %I.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,10 +74,10 @@ impl C as I { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed, %.loc19_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed, %.loc19_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -90,11 +90,11 @@ impl C as I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,11 +102,11 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc27 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -114,12 +114,12 @@ impl C as I { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.1.%I.ref -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -130,7 +130,7 @@ impl C as I { // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -141,5 +141,5 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index ab437f67fbf98..e16e3cfa1d9d9 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -129,21 +129,21 @@ fn G(x: A) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: %HasF.type = facet_value %T, %T [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.5) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.7: = specific_function %F.3, @F.2(%.5) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.3, @F.2(%empty_struct_type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -171,24 +171,24 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,15 +199,15 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc8_34.2: = interface_witness (%F) [symbolic = %interface.loc8_34.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc8_34.1: = interface_witness (%F.decl) [symbolic = %interface.loc8_34.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc8_34.1 +// CHECK:STDOUT: witness = %interface.loc8_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,14 +225,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { +// CHECK:STDOUT: fn @G(%x.param_patt: %empty_struct_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_4.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.5) [template = constants.%.7] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,29 +245,29 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.4 +// CHECK:STDOUT: %interface.loc8_34.2 => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.5) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.5 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.5 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.6 +// CHECK:STDOUT: %interface.loc8_34.2 => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.5) { +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -276,24 +276,24 @@ fn G(x: A) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: %HasF.type = facet_value %T, %T [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.6) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %struct: %.6 = struct_value () [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -321,46 +321,46 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.6 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.6 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.6 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_17.1: %.6 = struct_literal () -// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%.6 [template = constants.%.6] -// CHECK:STDOUT: %x.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.6 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc12_17.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc5_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc5_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.1.%.loc5_14.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%.loc5_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.2: type = facet_access_type %Self.ref.loc5_14 [symbolic = %.loc5_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref.loc5_14, %.loc5_14.2 [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_14: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_25.1: type = facet_access_type %Self.ref.loc5_25 [symbolic = %.loc5_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %.loc5_25.1 [symbolic = %.loc5_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.1.%.loc5_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc5_14.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.1.%.loc5_14.1 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.1.%.loc5_14.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc5_25: type = facet_access_type %Self.ref.loc5_25 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_25: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -371,7 +371,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.5)] +// CHECK:STDOUT: %interface.loc8_34.2: = interface_witness (%F) [symbolic = %interface.loc8_34.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -387,19 +387,19 @@ fn G(x: A) { // CHECK:STDOUT: %return.param: ref @F.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.5)] +// CHECK:STDOUT: %interface.loc8_34.1: = interface_witness (%F.decl) [symbolic = %interface.loc8_34.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc8_34.1 +// CHECK:STDOUT: witness = %interface.loc8_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.1: type = facet_access_type %Self [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc5_14.1 (%.1)]() -> @F.1.%.loc5_14.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type)]() -> @F.1.%Self.as_type.loc5_14.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@impl.%T.loc8_14.1: type) { @@ -414,25 +414,25 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.6) -> %.6 { +// CHECK:STDOUT: fn @G(%x.param_patt: %empty_struct_type) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.6 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_11.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc13_11.2: = bound_method %x.ref, %.loc13_11.1 -// CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.6) -// CHECK:STDOUT: %F.call: init %.6 = call %.loc13_11.3(%x.ref) -// CHECK:STDOUT: %.loc13_21.1: ref %.6 = temporary_storage -// CHECK:STDOUT: %.loc13_21.2: ref %.6 = temporary %.loc13_21.1, %F.call -// CHECK:STDOUT: %struct: %.6 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc13_22: %.6 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.bound: = bound_method %x.ref, %impl.elem0 +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.bound, @F.2(constants.%empty_struct_type) +// CHECK:STDOUT: %F.call: init %empty_struct_type = call %F.specific_fn(%x.ref) +// CHECK:STDOUT: %.loc13_21.1: ref %empty_struct_type = temporary_storage +// CHECK:STDOUT: %.loc13_21.2: ref %empty_struct_type = temporary %.loc13_21.1, %F.call +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc13_22: %empty_struct_type = converted %F.call, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc13_22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc5_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { @@ -442,16 +442,16 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 +// CHECK:STDOUT: %interface.loc8_34.2 => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.4) { -// CHECK:STDOUT: %Self => constants.%.4 -// CHECK:STDOUT: %.loc5_14.1 => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) { +// CHECK:STDOUT: %Self => constants.%HasF.facet +// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { @@ -459,18 +459,18 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.6) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.6 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.7 +// CHECK:STDOUT: %interface.loc8_34.2 => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.6) { -// CHECK:STDOUT: %T => constants.%.6 +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { +// CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -483,26 +483,26 @@ fn G(x: A) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: %HasF.type = facet_value %C.2, %C.2 [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.3) [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C.1, %C.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%empty_struct_type) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.3) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.9: = specific_function %F.3, @F.2(%.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.3, @F.2(%empty_struct_type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -521,7 +521,7 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%HasF.type] {} {} -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_9.1, runtime_param [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -532,54 +532,54 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc10_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_14.1, runtime_param [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.1 [symbolic = %T.loc10_14.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C.1)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %C.3 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %C.3 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_12: %.3 = struct_literal () -// CHECK:STDOUT: %.loc14_13: type = converted %.loc14_12, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] -// CHECK:STDOUT: %x.param: %C.3 = value_param runtime_param0 -// CHECK:STDOUT: %x: %C.3 = bind_name x, %x.param +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %.loc14_12: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_13: type = converted %.loc14_12, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [template = constants.%C.2] +// CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(%T.loc10_14.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.6)] +// CHECK:STDOUT: %interface.loc10_37.2: = interface_witness (%F) [symbolic = %interface.loc10_37.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_27.1 as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.6)] +// CHECK:STDOUT: %interface.loc10_37.1: = interface_witness (%F.decl) [symbolic = %interface.loc10_37.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc10_37.1 +// CHECK:STDOUT: witness = %interface.loc10_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -590,11 +590,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -612,14 +612,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %C.3) { +// CHECK:STDOUT: fn @G(%x.param_patt: %C.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %C.3 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %C.2 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_4.1: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc15_4.2: = specific_function %.loc15_4.1, @F.2(constants.%.3) [template = constants.%.9] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_4.2() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -638,43 +638,43 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.6 +// CHECK:STDOUT: %interface.loc10_37.2 => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.3) { -// CHECK:STDOUT: %T.loc8_9.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%.3 +// CHECK:STDOUT: specific @C(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc8_9.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.3) { -// CHECK:STDOUT: %T.loc10_14.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%.3 -// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.3 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc10_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.8 +// CHECK:STDOUT: %interface.loc10_37.2 => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.3) { +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -685,29 +685,29 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.1: type = generic_interface_type @HasF [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %HasF: %HasF.type.1 = struct_value () [template] +// CHECK:STDOUT: %HasF.generic: %HasF.type.1 = struct_value () [template] // CHECK:STDOUT: %HasF.type.2: type = facet_type <@HasF, @HasF(%T)> [symbolic] // CHECK:STDOUT: %Self: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @HasF.%F.decl [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: %HasF.type.2 = facet_value %.3, %.3 [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %HasF.facet: %HasF.type.2 = facet_value %empty_struct_type, %empty_struct_type [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%.3)> [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%.3) [template] +// CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%empty_struct_type)> [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%empty_struct_type) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @HasF.%F.decl [template] -// CHECK:STDOUT: %F.type.4: type = fn_type @F.2, @impl(%.3) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.type.4: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.4) [template] -// CHECK:STDOUT: %.9: = specific_function %F.4, @F.2(%.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.4) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.4, @F.2(%empty_struct_type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -724,7 +724,7 @@ fn G(x: A) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF] { +// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -735,22 +735,22 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_25.1: %.3 = struct_literal () -// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] +// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.2 (constants.%HasF.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.3 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.3 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.3 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.3 = bind_name x, %x.param +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -763,17 +763,17 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @HasF(%T.loc4_16.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @HasF.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_9.2: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @HasF.%HasF.type (%HasF.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @HasF.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @HasF.%F (constants.%F.1)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_9.1: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc5_9.1 +// CHECK:STDOUT: .F = %assoc0.loc5_9.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -786,15 +786,15 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.5)] +// CHECK:STDOUT: %interface.loc8_38.2: = interface_witness (%F) [symbolic = %interface.loc8_38.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.5)] +// CHECK:STDOUT: %interface.loc8_38.1: = interface_witness (%F.decl) [symbolic = %interface.loc8_38.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc8_38.1 +// CHECK:STDOUT: witness = %interface.loc8_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -812,18 +812,18 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.3) { +// CHECK:STDOUT: fn @G(%x.param_patt: %empty_struct_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.3 = name_ref x, %x -// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] -// CHECK:STDOUT: %.loc13_12: %.3 = struct_literal () -// CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%.3)> [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc13_14: %.6 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.3) [template = constants.%.7] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc13_14 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_4.1: %F.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%F.4] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.3) [template = constants.%.9] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() +// CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x +// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF.generic] +// CHECK:STDOUT: %.loc13_12: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [template = constants.%HasF.type.3] +// CHECK:STDOUT: %.loc13_14: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_9.1, @HasF(constants.%empty_struct_type) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc13_14 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %F.type.3 = interface_witness_access constants.%interface.2, element0 [template = constants.%F.4] +// CHECK:STDOUT: %F.specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -836,8 +836,8 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.1 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.2 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.1 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) {} @@ -860,12 +860,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.5 +// CHECK:STDOUT: %interface.loc8_38.2 => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.4) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T @@ -873,31 +873,31 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(constants.%.3) { -// CHECK:STDOUT: %T.loc4_16.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%.3 +// CHECK:STDOUT: specific @HasF(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc4_16.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.6 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.7 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.3) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.3 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%empty_struct_type // CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.8 +// CHECK:STDOUT: %interface.loc8_38.2 => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.3) { +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -908,17 +908,17 @@ fn G(x: A) { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T, %U) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: %HasF.type = facet_value %T, %T [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -952,24 +952,24 @@ fn G(x: A) { // CHECK:STDOUT: %U.loc9_24.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc9_24.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param +// CHECK:STDOUT: %.loc13_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -982,15 +982,15 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc9_14.2, %U.loc9_24.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc9_44.2: = interface_witness (%F) [symbolic = %.loc9_44.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc9_44.2: = interface_witness (%F) [symbolic = %interface.loc9_44.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc9_44.1: = interface_witness (%F.decl) [symbolic = %.loc9_44.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc9_44.1: = interface_witness (%F.decl) [symbolic = %interface.loc9_44.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc9_44.1 +// CHECK:STDOUT: witness = %interface.loc9_44.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1008,11 +1008,11 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { +// CHECK:STDOUT: fn @G(%x.param_patt: %empty_struct_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1027,12 +1027,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc9_44.2 => constants.%.4 +// CHECK:STDOUT: %interface.loc9_44.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%U) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc9_14.2, %U.loc9_24.2) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T @@ -1047,28 +1047,28 @@ fn G(x: A) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.1: type = generic_interface_type @HasF [template] -// CHECK:STDOUT: %HasF: %HasF.type.1 = struct_value () [template] +// CHECK:STDOUT: %HasF.generic: %HasF.type.1 = struct_value () [template] // CHECK:STDOUT: %HasF.type.2: type = facet_type <@HasF, @HasF(%T)> [symbolic] // CHECK:STDOUT: %Self: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: %HasF.type.2 = facet_value %T, %T [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %HasF.facet: %HasF.type.2 = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%B)> [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%B) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1087,7 +1087,7 @@ fn G(x: A) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF] { +// CHECK:STDOUT: %HasF.decl: %HasF.type.1 = interface_decl @HasF [template = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -1099,7 +1099,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] -// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] +// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF.generic] // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.2 (constants.%HasF.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param @@ -1126,17 +1126,17 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @HasF(%T.loc4_16.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @HasF.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_9.2: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @HasF.%HasF.type (%HasF.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @HasF.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @HasF.%F (constants.%F.1)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_9.1: @HasF.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc5_9.1 +// CHECK:STDOUT: .F = %assoc0.loc5_9.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1149,32 +1149,32 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc8_37.2: = interface_witness (%F) [symbolic = %interface.loc8_37.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.4)] +// CHECK:STDOUT: %interface.loc8_37.1: = interface_witness (%F.decl) [symbolic = %interface.loc8_37.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc8_37.1 +// CHECK:STDOUT: witness = %interface.loc8_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%T.loc4_16.1: type, @HasF.%Self.1: @HasF.%HasF.type (%HasF.type.2)) { @@ -1194,11 +1194,11 @@ fn G(x: A) { // CHECK:STDOUT: fn @G(%x.param_patt: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %A = name_ref x, %x -// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] +// CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc21: %.8 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%B) [template = constants.%.9] -// CHECK:STDOUT: %F.ref: %.8 = name_ref F, %.loc21 [template = constants.%.9] +// CHECK:STDOUT: %.loc21: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_9.1, @HasF(constants.%B) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc21 [template = constants.%assoc0.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1211,8 +1211,8 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.1 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.2 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.1 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) {} @@ -1235,12 +1235,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_37.2 => constants.%.4 +// CHECK:STDOUT: %interface.loc8_37.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T @@ -1257,7 +1257,7 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.8 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.9 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.2 // 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 b39f4d2deec72..9f02d677e9956 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -30,21 +30,21 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %I.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.7: type = struct_type {} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: } @@ -75,10 +75,10 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc11 [template = constants.%C] -// CHECK:STDOUT: %.loc23_15.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_15.3: type = converted %int.make_type_signed, %.loc23_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_15.2: type = converted %int.make_type_signed, %.loc23_15.1 [template = constants.%i32] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -89,28 +89,28 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc14_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc14_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %.loc14_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc14_14.3: type = converted %Self.ref, %.loc14_14.2 [symbolic = %.loc14_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed, %.loc14_25.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param: @F.1.%.loc14_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc14_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc14_14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_signed, %.loc14_25.1 [template = constants.%i32] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -122,20 +122,20 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc19_27.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_27.3: type = converted %int.make_type_signed, %.loc19_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_signed, %.loc19_27.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -143,19 +143,19 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.%I.ref -// CHECK:STDOUT: complete_type_witness = %.loc21 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc14_14.1: type = facet_access_type %Self [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc14_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc14_14.1 (%.1)]() -> %i32; +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type)]() -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %C]() -> %i32; @@ -163,10 +163,10 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: fn @F.3(%c.param_patt: %C) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc24_11.2: = bound_method %c.ref, %.loc24_11.1 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc24_11.2(%c.ref) +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.bound: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%c.ref) // CHECK:STDOUT: %.loc24_15.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc24_15.2: %i32 = converted %F.call, %.loc24_15.1 // CHECK:STDOUT: return %.loc24_15.2 @@ -174,11 +174,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc14_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc14_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) { -// CHECK:STDOUT: %Self => constants.%.5 -// CHECK:STDOUT: %.loc14_14.1 => constants.%C +// CHECK:STDOUT: specific @F.1(constants.%I.facet) { +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self.as_type.loc14_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index 23de831898e07..d2c5aaca94fe5 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -38,69 +38,69 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %A.1: %A.type = struct_value () [template] -// CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic] -// CHECK:STDOUT: %.1: type = unbound_element_type %A.2, %T [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] +// CHECK:STDOUT: %A.1: type = class_type @A, @A(%T) [symbolic] +// CHECK:STDOUT: %A.elem.1: type = unbound_element_type %A.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.n.1: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n.1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.4: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 0 [symbolic] -// CHECK:STDOUT: %A.3: type = class_type @A, @A(%V) [symbolic] +// CHECK:STDOUT: %A.2: type = class_type @A, @A(%V) [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%V)> [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%V) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%V) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @I.%F.decl [symbolic] -// CHECK:STDOUT: %.9: %I.type.2 = facet_value %A.3, %A.3 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.11: type = unbound_element_type %A.3, %V [symbolic] -// CHECK:STDOUT: %.12: type = struct_type {.n: %V} [symbolic] -// CHECK:STDOUT: %.13: = complete_type_witness %.12 [symbolic] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %I.facet: %I.type.2 = facet_value %A.2, %A.2 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %A.elem.2: type = unbound_element_type %A.2, %V [symbolic] +// CHECK:STDOUT: %struct_type.n.2: type = struct_type {.n: %V} [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n.2 [symbolic] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: type = symbolic_binding_pattern W, 0 [symbolic] -// CHECK:STDOUT: %A.4: type = class_type @A, @A(%W) [symbolic] +// CHECK:STDOUT: %A.3: type = class_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %TestGeneric.type: type = fn_type @TestGeneric [template] // CHECK:STDOUT: %TestGeneric: %TestGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.15: type = unbound_element_type %A.4, %W [symbolic] -// CHECK:STDOUT: %.16: type = struct_type {.n: %W} [symbolic] -// CHECK:STDOUT: %.17: = complete_type_witness %.16 [symbolic] +// CHECK:STDOUT: %A.elem.3: type = unbound_element_type %A.3, %W [symbolic] +// CHECK:STDOUT: %struct_type.n.3: type = struct_type {.n: %W} [symbolic] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n.3 [symbolic] // CHECK:STDOUT: %I.type.4: type = facet_type <@I, @I(%W)> [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @I(%W) [symbolic] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.19: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] -// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.3: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] +// CHECK:STDOUT: %assoc0.3: %F.assoc_type.3 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.2, @impl(%W) [symbolic] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [symbolic] -// CHECK:STDOUT: %.21: = interface_witness (%F.5) [symbolic] -// CHECK:STDOUT: %.22: type = struct_type {} [template] -// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.22) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.5) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %A.4: type = class_type @A, @A(%empty_struct_type) [template] // CHECK:STDOUT: %TestSpecific.type: type = fn_type @TestSpecific [template] // CHECK:STDOUT: %TestSpecific: %TestSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.23: type = unbound_element_type %A.5, %.22 [template] -// CHECK:STDOUT: %.24: type = struct_type {.n: %.22} [template] -// CHECK:STDOUT: %.25: = complete_type_witness %.24 [template] -// CHECK:STDOUT: %I.type.5: type = facet_type <@I, @I(%.22)> [template] -// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%.22) [template] +// CHECK:STDOUT: %A.elem.4: type = unbound_element_type %A.4, %empty_struct_type [template] +// CHECK:STDOUT: %struct_type.n.4: type = struct_type {.n: %empty_struct_type} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.n.4 [template] +// CHECK:STDOUT: %I.type.5: type = facet_type <@I, @I(%empty_struct_type)> [template] +// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%empty_struct_type) [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.28: type = assoc_entity_type %I.type.5, %F.type.6 [template] -// CHECK:STDOUT: %.29: %.28 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%.22) [template] +// CHECK:STDOUT: %F.assoc_type.4: type = assoc_entity_type %I.type.5, %F.type.6 [template] +// CHECK:STDOUT: %assoc0.4: %F.assoc_type.4 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.7: %F.type.7 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%F.7) [template] -// CHECK:STDOUT: %struct: %.22 = struct_value () [template] +// CHECK:STDOUT: %interface.3: = interface_witness (%F.7) [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,14 +110,14 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: .TestGeneric = %TestGeneric.decl // CHECK:STDOUT: .TestSpecific = %TestSpecific.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { +// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc2_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc2_9.1, runtime_param [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc2_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc2_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %U.patt.loc6_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_13.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc6_13.1, runtime_param [symbolic = %U.patt.loc6_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -128,10 +128,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %V.patt.loc10_14.1: type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.param_patt: type = value_param_pattern %V.patt.loc10_14.1, runtime_param [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] // CHECK:STDOUT: %V.ref.loc10_26: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)] -// CHECK:STDOUT: %A.loc10_27.1: type = class_type @A, @A(constants.%V) [symbolic = %A.loc10_27.2 (constants.%A.3)] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %A.loc10_27.1: type = class_type @A, @A(constants.%V) [symbolic = %A.loc10_27.2 (constants.%A.2)] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %V.ref.loc10_34: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)] // CHECK:STDOUT: %I.type.loc10_35.1: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.3)] // CHECK:STDOUT: %V.param: type = value_param runtime_param @@ -140,38 +140,38 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %TestGeneric.decl: %TestGeneric.type = fn_decl @TestGeneric [template = constants.%TestGeneric] { // CHECK:STDOUT: %W.patt.loc16_16.1: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: type = value_param_pattern %W.patt.loc16_16.1, runtime_param [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] -// CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc16_32.2 (%A.4) = binding_pattern a -// CHECK:STDOUT: %a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.4) = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc16_32.2 (%A.3) = binding_pattern a +// CHECK:STDOUT: %a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.3) = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @TestGeneric.%W.loc16_16.2 (%W) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @TestGeneric.%W.loc16_16.2 (%W) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] // CHECK:STDOUT: %W.ref.loc16_31: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] -// CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.4)] +// CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.3)] // CHECK:STDOUT: %W.ref.loc16_38: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %W.param: type = value_param runtime_param // CHECK:STDOUT: %W.loc16_16.1: type = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc16_16.2 (constants.%W)] -// CHECK:STDOUT: %a.param: @TestGeneric.%A.loc16_32.2 (%A.4) = value_param runtime_param0 -// CHECK:STDOUT: %a: @TestGeneric.%A.loc16_32.2 (%A.4) = bind_name a, %a.param +// CHECK:STDOUT: %a.param: @TestGeneric.%A.loc16_32.2 (%A.3) = value_param runtime_param0 +// CHECK:STDOUT: %a: @TestGeneric.%A.loc16_32.2 (%A.3) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @TestGeneric.%W.loc16_16.2 (%W) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @TestGeneric.%W.loc16_16.2 (%W) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestSpecific.decl: %TestSpecific.type = fn_decl @TestSpecific [template = constants.%TestSpecific] { -// CHECK:STDOUT: %a.patt: %A.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %A.5 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %a.patt: %A.4 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %A.4 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] -// CHECK:STDOUT: %.loc20_23: %.22 = struct_literal () -// CHECK:STDOUT: %.loc20_24: type = converted %.loc20_23, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.22) [template = constants.%A.5] -// CHECK:STDOUT: %.loc20_31.1: %.22 = struct_literal () -// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %a.param: %A.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %A.5 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] +// CHECK:STDOUT: %.loc20_23: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc20_24: type = converted %.loc20_23, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%empty_struct_type) [template = constants.%A.4] +// CHECK:STDOUT: %.loc20_31.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %a.param: %A.4 = value_param runtime_param0 +// CHECK:STDOUT: %a: %A.4 = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -184,32 +184,32 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%U.loc6_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc7_26.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc7_26.2 (constants.%.5)] -// CHECK:STDOUT: %.loc7_26.3: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc7_26.2: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_26.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.1)] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc7_14.1 (%.4) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc7_14.1 (%.4) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.1.%U (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%U (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14.2: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc7_14.3: type = facet_access_type %Self.ref [symbolic = %.loc7_14.1 (constants.%.4)] -// CHECK:STDOUT: %.loc7_14.4: type = converted %Self.ref, %.loc7_14.3 [symbolic = %.loc7_14.1 (constants.%.4)] +// CHECK:STDOUT: %.loc7_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %U.ref: type = name_ref U, @I.%U.loc6_13.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %self.param: @F.1.%.loc7_14.1 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc7_14.1 (%.4) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.1.%U (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%U (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_26.1: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] +// CHECK:STDOUT: %assoc0.loc7_26.1: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_26.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc7_26.1 +// CHECK:STDOUT: .F = %assoc0.loc7_26.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -217,33 +217,33 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: generic impl @impl(%V.loc10_14.1: type) { // CHECK:STDOUT: %V.loc10_14.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc10_14.2 (constants.%V)] // CHECK:STDOUT: %V.patt.loc10_14.2: type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %A.loc10_27.2: type = class_type @A, @A(%V.loc10_14.2) [symbolic = %A.loc10_27.2 (constants.%A.3)] +// CHECK:STDOUT: %A.loc10_27.2: type = class_type @A, @A(%V.loc10_14.2) [symbolic = %A.loc10_27.2 (constants.%A.2)] // CHECK:STDOUT: %I.type.loc10_35.2: type = facet_type <@I, @I(%V.loc10_14.2)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.10)] +// CHECK:STDOUT: %interface.loc10_37.2: = interface_witness (%F) [symbolic = %interface.loc10_37.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %A.loc10_27.1 as %I.type.loc10_35.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { -// CHECK:STDOUT: %self.patt: @F.2.%A (%A.3) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.2.%A (%A.3) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.2.%A (%A.2) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.2.%A (%A.2) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.2.%V (%V) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.2.%V (%V) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.3)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.2)] // CHECK:STDOUT: %V.ref: type = name_ref V, @impl.%V.loc10_14.1 [symbolic = %V (constants.%V)] -// CHECK:STDOUT: %self.param: @F.2.%A (%A.3) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.2.%A (%A.3) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.2.%A (%A.2) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.2.%A (%A.2) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.2.%V (%V) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%V (%V) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.10)] +// CHECK:STDOUT: %interface.loc10_37.1: = interface_witness (%F.decl) [symbolic = %interface.loc10_37.2 (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc10_37.1 +// CHECK:STDOUT: witness = %interface.loc10_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -252,20 +252,20 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T.patt.loc2_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A: type = class_type @A, @A(%T.loc2_9.2) [symbolic = %A (constants.%A.2)] -// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @A.%A (%A.2), @A.%T.loc2_9.2 (%T) [symbolic = %.loc3_8.2 (constants.%.1)] -// CHECK:STDOUT: %.loc4_1.2: type = struct_type {.n: @A.%T.loc2_9.2 (%T)} [symbolic = %.loc4_1.2 (constants.%.2)] -// CHECK:STDOUT: %.loc4_1.3: = complete_type_witness @A.%.loc4_1.2 (%.2) [symbolic = %.loc4_1.3 (constants.%.3)] +// CHECK:STDOUT: %A: type = class_type @A, @A(%T.loc2_9.2) [symbolic = %A (constants.%A.1)] +// CHECK:STDOUT: %A.elem: type = unbound_element_type @A.%A (%A.1), @A.%T.loc2_9.2 (%T) [symbolic = %A.elem (constants.%A.elem.1)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @A.%T.loc2_9.2 (%T)} [symbolic = %struct_type.n (constants.%struct_type.n.1)] +// CHECK:STDOUT: %complete_type.loc4_1.2: = complete_type_witness @A.%struct_type.n (%struct_type.n.1) [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_9.1 [symbolic = %T.loc2_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc3_8.1: @A.%.loc3_8.2 (%.1) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc4_1.1: = complete_type_witness %.2 [symbolic = %.loc4_1.3 (constants.%.3)] +// CHECK:STDOUT: %.loc3: @A.%A.elem (%A.elem.1) = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type.loc4_1.1: = complete_type_witness %struct_type.n.1 [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%A.2 -// CHECK:STDOUT: .n = %.loc3_8.1 -// CHECK:STDOUT: complete_type_witness = %.loc4_1.1 +// CHECK:STDOUT: .Self = constants.%A.1 +// CHECK:STDOUT: .n = %.loc3 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc4_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,22 +273,22 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc7_14.1: type = facet_access_type %Self [symbolic = %.loc7_14.1 (constants.%.4)] +// CHECK:STDOUT: %Self.as_type.loc7_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc7_14.1 (%.4)]() -> @F.1.%U (%U); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type)]() -> @F.1.%U (%U); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@impl.%V.loc10_14.1: type) { // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic = %V (constants.%V)] -// CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.3)] +// CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.loc12_16.3 (constants.%.11)] +// CHECK:STDOUT: %A.elem: type = unbound_element_type @F.2.%A (%A.2), @F.2.%V (%V) [symbolic = %A.elem (constants.%A.elem.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.2.%A (%A.3)]() -> @F.2.%V (%V) { +// CHECK:STDOUT: fn[%self.param_patt: @F.2.%A (%A.2)]() -> @F.2.%V (%V) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @F.2.%A (%A.3) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @F.2.%.loc12_16.3 (%.11) = name_ref n, @A.%.loc3_8.1 [template = @A.%.loc3_8.1] +// CHECK:STDOUT: %self.ref: @F.2.%A (%A.2) = name_ref self, %self +// CHECK:STDOUT: %n.ref: @F.2.%A.elem (%A.elem.2) = name_ref n, @A.%.loc3 [template = @A.%.loc3] // CHECK:STDOUT: %.loc12_16.1: ref @F.2.%V (%V) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_16.2: @F.2.%V (%V) = bind_value %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -298,51 +298,51 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: generic fn @TestGeneric(%W.loc16_16.1: type) { // CHECK:STDOUT: %W.loc16_16.2: type = bind_symbolic_name W, 0 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %W.patt.loc16_16.2: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] -// CHECK:STDOUT: %A.loc16_32.2: type = class_type @A, @A(%W.loc16_16.2) [symbolic = %A.loc16_32.2 (constants.%A.4)] +// CHECK:STDOUT: %A.loc16_32.2: type = class_type @A, @A(%W.loc16_16.2) [symbolic = %A.loc16_32.2 (constants.%A.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc17_16.2: type = facet_type <@I, @I(%W.loc16_16.2)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.4)] // CHECK:STDOUT: %F.type.loc17_17: type = fn_type @F.1, @I(%W.loc16_16.2) [symbolic = %F.type.loc17_17 (constants.%F.type.4)] -// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_16.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.19)] -// CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.19) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.20)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @TestGeneric.%I.type.loc17_16.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %F.assoc_type (constants.%F.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @TestGeneric.%F.assoc_type (%F.assoc_type.3) = assoc_entity element0, @I.%F.decl [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %F.type.loc17_11: type = fn_type @F.2, @impl(%W.loc16_16.2) [symbolic = %F.type.loc17_11 (constants.%F.type.5)] // CHECK:STDOUT: %F: @TestGeneric.%F.type.loc17_11 (%F.type.5) = struct_value () [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%W.param_patt: type](%a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.4)) -> @TestGeneric.%W.loc16_16.2 (%W) { +// CHECK:STDOUT: fn[%W.param_patt: type](%a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.3)) -> @TestGeneric.%W.loc16_16.2 (%W) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @TestGeneric.%A.loc16_32.2 (%A.4) = name_ref a, %a -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %a.ref: @TestGeneric.%A.loc16_32.2 (%A.3) = name_ref a, %a +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %W.ref.loc17: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %I.type.loc17_16.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.4)] -// CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.19) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.20)] -// CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.19) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.20)] -// CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.21, element0 [symbolic = %F (constants.%F.5)] -// CHECK:STDOUT: %.loc17_11.2: = bound_method %a.ref, %.loc17_11.1 -// CHECK:STDOUT: %.loc17_11.3: = specific_function %.loc17_11.2, @F.2(constants.%W) -// CHECK:STDOUT: %F.call: init @TestGeneric.%W.loc16_16.2 (%W) = call %.loc17_11.3(%a.ref) +// CHECK:STDOUT: %.loc17_17: @TestGeneric.%F.assoc_type (%F.assoc_type.3) = specific_constant @I.%assoc0.loc7_26.1, @I(constants.%W) [symbolic = %assoc0 (constants.%assoc0.3)] +// CHECK:STDOUT: %F.ref: @TestGeneric.%F.assoc_type (%F.assoc_type.3) = name_ref F, %.loc17_17 [symbolic = %assoc0 (constants.%assoc0.3)] +// CHECK:STDOUT: %impl.elem0: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%interface.2, element0 [symbolic = %F (constants.%F.5)] +// CHECK:STDOUT: %F.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.bound, @F.2(constants.%W) +// CHECK:STDOUT: %F.call: init @TestGeneric.%W.loc16_16.2 (%W) = call %F.specific_fn(%a.ref) // CHECK:STDOUT: %.loc17_22.1: @TestGeneric.%W.loc16_16.2 (%W) = value_of_initializer %F.call // CHECK:STDOUT: %.loc17_22.2: @TestGeneric.%W.loc16_16.2 (%W) = converted %F.call, %.loc17_22.1 // CHECK:STDOUT: return %.loc17_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.5) -> %.22 { +// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.4) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %A.5 = name_ref a, %a -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] -// CHECK:STDOUT: %.loc21_16: %.22 = struct_literal () -// CHECK:STDOUT: %.loc21_17: type = converted %.loc21_16, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%.22)> [template = constants.%I.type.5] -// CHECK:STDOUT: %.loc21_18: %.28 = specific_constant @I.%.loc7_26.1, @I(constants.%.22) [template = constants.%.29] -// CHECK:STDOUT: %F.ref: %.28 = name_ref F, %.loc21_18 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_11.1: %F.type.6 = interface_witness_access constants.%.30, element0 [template = constants.%F.7] -// CHECK:STDOUT: %.loc21_11.2: = bound_method %a.ref, %.loc21_11.1 -// CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.22) -// CHECK:STDOUT: %F.call: init %.22 = call %.loc21_11.3(%a.ref) -// CHECK:STDOUT: %.loc21_22.1: ref %.22 = temporary_storage -// CHECK:STDOUT: %.loc21_22.2: ref %.22 = temporary %.loc21_22.1, %F.call -// CHECK:STDOUT: %struct: %.22 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc21_23: %.22 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %a.ref: %A.4 = name_ref a, %a +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] +// CHECK:STDOUT: %.loc21_16: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc21_17: type = converted %.loc21_16, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [template = constants.%I.type.5] +// CHECK:STDOUT: %.loc21_18: %F.assoc_type.4 = specific_constant @I.%assoc0.loc7_26.1, @I(constants.%empty_struct_type) [template = constants.%assoc0.4] +// CHECK:STDOUT: %F.ref: %F.assoc_type.4 = name_ref F, %.loc21_18 [template = constants.%assoc0.4] +// CHECK:STDOUT: %impl.elem0: %F.type.6 = interface_witness_access constants.%interface.3, element0 [template = constants.%F.7] +// CHECK:STDOUT: %F.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.bound, @F.2(constants.%empty_struct_type) +// CHECK:STDOUT: %F.call: init %empty_struct_type = call %F.specific_fn(%a.ref) +// CHECK:STDOUT: %.loc21_22.1: ref %empty_struct_type = temporary_storage +// CHECK:STDOUT: %.loc21_22.2: ref %empty_struct_type = temporary %.loc21_22.1, %F.call +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc21_23: %empty_struct_type = converted %F.call, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc21_23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -370,7 +370,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc7_14.1 => constants.%.4 +// CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%U.loc6_13.2) { @@ -383,10 +383,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%V // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A => constants.%A.3 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.11 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.12 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.13 +// CHECK:STDOUT: %A => constants.%A.2 +// CHECK:STDOUT: %A.elem => constants.%A.elem.2 +// CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.2 +// CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%V) { @@ -398,8 +398,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.7 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.8 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@impl.%V.loc10_14.2) { @@ -415,13 +415,13 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(constants.%V) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%V -// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.2 // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.10 +// CHECK:STDOUT: %interface.loc10_37.2 => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@F.2.%V) { @@ -431,20 +431,20 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%V) { // CHECK:STDOUT: %V => constants.%V -// CHECK:STDOUT: %A => constants.%A.3 +// CHECK:STDOUT: %A => constants.%A.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%V, constants.%.9) { +// CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet) { // CHECK:STDOUT: %U => constants.%V // CHECK:STDOUT: %I.type => constants.%I.type.3 -// CHECK:STDOUT: %Self => constants.%.9 -// CHECK:STDOUT: %.loc7_14.1 => constants.%A.3 +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%A.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%V.loc10_14.2) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%V -// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.2 // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -453,10 +453,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%W // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A => constants.%A.4 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.15 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.16 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.17 +// CHECK:STDOUT: %A => constants.%A.3 +// CHECK:STDOUT: %A.elem => constants.%A.elem.3 +// CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.3 +// CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@TestGeneric.%W.loc16_16.2) { @@ -467,7 +467,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @TestGeneric(constants.%W) { // CHECK:STDOUT: %W.loc16_16.2 => constants.%W // CHECK:STDOUT: %W.patt.loc16_16.2 => constants.%W -// CHECK:STDOUT: %A.loc16_32.2 => constants.%A.4 +// CHECK:STDOUT: %A.loc16_32.2 => constants.%A.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%W) { @@ -479,28 +479,28 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.19 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.20 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.3 +// CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%W) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%W // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%W -// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.4 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.5 // CHECK:STDOUT: %F => constants.%F.5 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.21 +// CHECK:STDOUT: %interface.loc10_37.2 => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%W) { // CHECK:STDOUT: %V => constants.%W -// CHECK:STDOUT: %A => constants.%A.4 +// CHECK:STDOUT: %A => constants.%A.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.15 +// CHECK:STDOUT: %A.elem => constants.%A.elem.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@TestGeneric.%W.loc16_16.2) { @@ -511,51 +511,51 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(@TestGeneric.%W.loc16_16.2) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%W // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%W -// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.4 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%.22) { -// CHECK:STDOUT: %T.loc2_9.2 => constants.%.22 -// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%.22 +// CHECK:STDOUT: specific @A(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc2_9.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A => constants.%A.5 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.23 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.24 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.25 +// CHECK:STDOUT: %A => constants.%A.4 +// CHECK:STDOUT: %A.elem => constants.%A.elem.4 +// CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.4 +// CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.22) { -// CHECK:STDOUT: %U.loc6_13.2 => constants.%.22 -// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%.22 +// CHECK:STDOUT: specific @I(constants.%empty_struct_type) { +// CHECK:STDOUT: %U.loc6_13.2 => constants.%empty_struct_type +// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.5 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.6 // CHECK:STDOUT: %F => constants.%F.6 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.28 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.29 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.4 +// CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.22) { -// CHECK:STDOUT: %V.loc10_14.2 => constants.%.22 -// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.22 -// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.5 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %V.loc10_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%empty_struct_type +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.4 // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.7 // CHECK:STDOUT: %F => constants.%F.7 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.30 +// CHECK:STDOUT: %interface.loc10_37.2 => constants.%interface.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.22) { -// CHECK:STDOUT: %V => constants.%.22 -// CHECK:STDOUT: %A => constants.%A.5 +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { +// CHECK:STDOUT: %V => constants.%empty_struct_type +// CHECK:STDOUT: %A => constants.%A.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.23 +// CHECK:STDOUT: %A.elem => constants.%A.elem.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index a619be3311e2d..5a872f5741ad8 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -196,15 +196,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -223,29 +223,29 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc11: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc11 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { @@ -260,7 +260,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- package_b.carbon // CHECK:STDOUT: @@ -269,28 +269,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.1: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasG.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, @HasG.%G.decl [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %HasG.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %HasG.facet.1: %HasG.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%G.2) [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self.2: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: %HasF.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.1) [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.1) [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G.3 [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: %HasG.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.10: = interface_witness (%G.3) [template] +// CHECK:STDOUT: %HasG.facet.2: %HasG.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.3: = interface_witness (%G.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -300,7 +300,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageA//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageA//default, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageA//default, inst+1, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageA//default, inst+3, unloaded @@ -336,11 +336,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasG { // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} -// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %G.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .G = %.loc7 +// CHECK:STDOUT: .G = %assoc0 // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -353,37 +353,37 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%G.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%G.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.loc13 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %D.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.3 = fn_decl @G.3 [template = constants.%G.3] {} {} -// CHECK:STDOUT: %.loc23: = interface_witness (%G.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%G.decl) [template = constants.%interface.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.loc23 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -419,31 +419,31 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%.5) {} +// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.7) {} +// CHECK:STDOUT: specific @F.2(constants.%HasF.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%.9) {} +// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.2) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_cf.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %TestCF.type: type = fn_type @TestCF [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestCF: %TestCF.type = struct_value () [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -453,15 +453,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageA//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageA//default, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageA//default, inst+1, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageA//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref PackageA//default, inst+10, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %F.assoc_type = import_ref PackageA//default, inst+10, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref PackageA//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.10: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.11: = import_ref PackageA//default, inst+24, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.11: = import_ref PackageA//default, inst+24, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -504,9 +504,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageA.ref.loc7: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.4 [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc7: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc7() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -523,21 +523,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %TestDF.type: type = fn_type @TestDF [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestDF: %TestDF.type = struct_value () [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self.1: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -550,13 +550,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageB//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageB//default, inst+14, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageB//default, inst+17, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageB//default, inst+17, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageB//default, inst+15, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageA//default, inst+1, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageA//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref PackageA//default, inst+10, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %F.assoc_type = import_ref PackageA//default, inst+10, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref PackageA//default, inst+5, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref PackageA//default, inst+15, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.9: = import_ref PackageA//default, inst+15, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.10 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.12: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] @@ -569,7 +569,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.19 = import_ref PackageB//default, inst+32, unloaded // CHECK:STDOUT: %import_ref.20: type = import_ref PackageB//default, inst+35, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+44, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.22: = import_ref PackageB//default, inst+53, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.22: = import_ref PackageB//default, inst+53, loaded [template = constants.%interface] // CHECK:STDOUT: %import_ref.23: type = import_ref PackageB//default, inst+56, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.24: type = import_ref PackageB//default, inst+57, loaded [template = constants.%HasG.type] // CHECK:STDOUT: %import_ref.25 = import_ref PackageB//default, inst+63, unloaded @@ -645,9 +645,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.4 [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc8: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc8() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -664,21 +664,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %TestCG.type: type = fn_type @TestCG [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestCG: %TestCG.type = struct_value () [template] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [template] // CHECK:STDOUT: %Self.1: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%G.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -691,11 +691,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageB//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageA//default, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageA//default, inst+15, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageB//default, inst+3, loaded [template = constants.%HasG.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageB//default, inst+5, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref PackageB//default, inst+12, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %G.assoc_type = import_ref PackageB//default, inst+12, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref PackageB//default, inst+7, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref PackageA//default, inst+3, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref PackageA//default, inst+10, unloaded @@ -705,8 +705,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.14 = import_ref PackageA//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.15: type = import_ref PackageB//default, inst+25, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.16: type = import_ref PackageB//default, inst+26, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.17: = import_ref PackageB//default, inst+32, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.18: = import_ref PackageB//default, inst+17, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.17: = import_ref PackageB//default, inst+32, loaded [template = constants.%interface] +// CHECK:STDOUT: %import_ref.18: = import_ref PackageB//default, inst+17, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.19 = import_ref PackageB//default, inst+15, unloaded // CHECK:STDOUT: %import_ref.20: type = import_ref PackageB//default, inst+35, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+44, loaded [template = constants.%HasF.type] @@ -786,9 +786,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%import_ref.4 [template = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, imports.%import_ref.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc8: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc8() +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %G.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -805,21 +805,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %TestDG.type: type = fn_type @TestDG [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestDG: %TestDG.type = struct_value () [template] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [template] // CHECK:STDOUT: %Self.1: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%G.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -829,13 +829,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageB//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageB//default, inst+14, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageB//default, inst+17, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageB//default, inst+17, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageB//default, inst+15, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageB//default, inst+3, loaded [template = constants.%HasG.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageB//default, inst+5, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref PackageB//default, inst+12, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %G.assoc_type = import_ref PackageB//default, inst+12, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref PackageB//default, inst+7, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref PackageB//default, inst+23, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.9: = import_ref PackageB//default, inst+23, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.10 = import_ref PackageB//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref PackageB//default, inst+25, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.12: type = import_ref PackageB//default, inst+26, loaded [template = constants.%HasG.type] @@ -848,7 +848,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.19 = import_ref PackageB//default, inst+53, unloaded // CHECK:STDOUT: %import_ref.20: type = import_ref PackageB//default, inst+56, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+57, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.22: = import_ref PackageB//default, inst+63, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.22: = import_ref PackageB//default, inst+63, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -914,9 +914,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageB.ref.loc7: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%import_ref.4 [template = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, imports.%import_ref.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc7: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc7() +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %G.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -937,12 +937,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %H.type.1: type = fn_type @H.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %H.1: %H.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Z.type, %H.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Z.%H.decl [template] +// CHECK:STDOUT: %H.assoc_type: type = assoc_entity_type %Z.type, %H.type.1 [template] +// CHECK:STDOUT: %assoc0: %H.assoc_type = assoc_entity element0, @Z.%H.decl [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] // CHECK:STDOUT: %H.2: %H.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %Z.type = facet_value %empty_tuple.type, %empty_tuple.type [template] -// CHECK:STDOUT: %.4: = interface_witness (%H.2) [template] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, %empty_tuple.type [template] +// CHECK:STDOUT: %interface: = interface_witness (%H.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -960,21 +960,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %H.decl: %H.type.1 = fn_decl @H.1 [template = constants.%H.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %H.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %H.assoc_type = assoc_entity element0, %H.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .H = %.loc5 +// CHECK:STDOUT: .H = %assoc0 // CHECK:STDOUT: witness = (%H.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %Z.ref { // CHECK:STDOUT: %H.decl: %H.type.2 = fn_decl @H.2 [template = constants.%H.2] {} {} -// CHECK:STDOUT: %.loc8_14: = interface_witness (%H.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%H.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .H = %H.decl -// CHECK:STDOUT: witness = %.loc8_14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @H.1(@Z.%Self: %Z.type) { @@ -989,7 +989,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @H.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @H.1(constants.%.3) {} +// CHECK:STDOUT: specific @H.1(constants.%Z.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- import_associated_interface.carbon // CHECK:STDOUT: @@ -1000,11 +1000,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [template] // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %H.type.1: type = fn_type @H.1 [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Z.type, %H.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %H.assoc_type: type = assoc_entity_type %Z.type, %H.type.1 [template] +// CHECK:STDOUT: %assoc0: %H.assoc_type = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] // CHECK:STDOUT: %H.2: %H.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%H.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%H.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1014,11 +1014,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref PackageAssociatedInterface//default, inst+1, loaded [template = constants.%Z.type] // CHECK:STDOUT: %import_ref.2 = import_ref PackageAssociatedInterface//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.1 = import_ref PackageAssociatedInterface//default, inst+10, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: %H.assoc_type = import_ref PackageAssociatedInterface//default, inst+10, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.4 = import_ref PackageAssociatedInterface//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref PackageAssociatedInterface//default, inst+13, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.7: type = import_ref PackageAssociatedInterface//default, inst+14, loaded [template = constants.%Z.type] -// CHECK:STDOUT: %import_ref.8: = import_ref PackageAssociatedInterface//default, inst+20, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.8: = import_ref PackageAssociatedInterface//default, inst+20, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1044,12 +1044,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @J() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_4: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %PackageAssociatedInterface.ref: = name_ref PackageAssociatedInterface, imports.%PackageAssociatedInterface [template = imports.%PackageAssociatedInterface] // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%import_ref.1 [template = constants.%Z.type] -// CHECK:STDOUT: %H.ref: %.1 = name_ref H, imports.%import_ref.3 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_5: %H.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%H.2] -// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %.loc7_5() +// CHECK:STDOUT: %H.ref: %H.assoc_type = name_ref H, imports.%import_ref.3 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %H.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%H.2] +// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1070,16 +1070,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %X.patt: %T = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [template] -// CHECK:STDOUT: %AnyParam.1: %AnyParam.type = struct_value () [template] -// CHECK:STDOUT: %AnyParam.2: type = class_type @AnyParam, @AnyParam(%T, %X) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [template] +// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(%T, %X) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [template] // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type: type = fn_type @K [template] // CHECK:STDOUT: %K: %K.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Y.type, %K.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Y.%K.decl [template] +// CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type %Y.type, %K.type [template] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @Y.%K.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1087,7 +1087,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .AnyParam = %AnyParam.decl // CHECK:STDOUT: .Y = %Y.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %AnyParam.decl: %AnyParam.type = class_decl @AnyParam [template = constants.%AnyParam.1] { +// CHECK:STDOUT: %AnyParam.decl: %AnyParam.type = class_decl @AnyParam [template = constants.%AnyParam.generic] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %X.patt.loc4_26.1: @AnyParam.%T.loc4_16.2 (%T) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)] @@ -1105,11 +1105,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Y { // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [template = constants.%K] {} {} -// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %K.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, %K.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .K = %.loc7 +// CHECK:STDOUT: .K = %assoc0 // CHECK:STDOUT: witness = (%K.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1122,11 +1122,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%AnyParam.2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: .Self = constants.%AnyParam +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1155,32 +1155,32 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.1: type = generic_interface_type @GenericInterface [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %GenericInterface: %GenericInterface.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.1 = struct_value () [template] // CHECK:STDOUT: %GenericInterface.type.2: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic] // CHECK:STDOUT: %Self.1: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [template] -// CHECK:STDOUT: %AnyParam.1: %AnyParam.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %X.1: %T = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %X.2: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %X.patt.2: %T = symbolic_binding_pattern X, 1 [symbolic] -// CHECK:STDOUT: %AnyParam.3: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.1, %GenericInterface) [template] +// CHECK:STDOUT: %AnyParam.2: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.1, %GenericInterface.generic) [template] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [template] // CHECK:STDOUT: %Self.2: %Y.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type.1: type = fn_type @K.1 [template] // CHECK:STDOUT: %K.1: %K.type.1 = struct_value () [template] // CHECK:STDOUT: %K.type.2: type = fn_type @K.2 [template] // CHECK:STDOUT: %K.2: %K.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %Y.type = facet_value %AnyParam.3, %AnyParam.3 [template] -// CHECK:STDOUT: %.4: = interface_witness (%K.1) [template] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.2, %AnyParam.2 [template] +// CHECK:STDOUT: %interface: = interface_witness (%K.1) [template] // CHECK:STDOUT: %L.type: type = fn_type @L [template] // CHECK:STDOUT: %L: %L.type = struct_value () [template] -// CHECK:STDOUT: %struct: %AnyParam.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Y.type, %K.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %AnyParam.val: %AnyParam.2 = struct_value () [template] +// CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type %Y.type, %K.type.2 [template] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1189,12 +1189,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .Y = %import_ref.4 // CHECK:STDOUT: import PackageHasParam//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %AnyParam.type = import_ref PackageHasParam//default, inst+14, loaded [template = constants.%AnyParam.1] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageHasParam//default, inst+24, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.1: %AnyParam.type = import_ref PackageHasParam//default, inst+14, loaded [template = constants.%AnyParam.generic] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageHasParam//default, inst+24, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageHasParam//default, inst+22, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref PackageHasParam//default, inst+26, loaded [template = constants.%Y.type] // CHECK:STDOUT: %import_ref.5 = import_ref PackageHasParam//default, inst+28, unloaded -// CHECK:STDOUT: %import_ref.6: %.6 = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.6: %K.assoc_type = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7: %K.type.2 = import_ref PackageHasParam//default, inst+30, loaded [template = constants.%K.2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1205,7 +1205,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .L = %L.decl // CHECK:STDOUT: } // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam -// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.1 = interface_decl @GenericInterface [template = constants.%GenericInterface] { +// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.1 = interface_decl @GenericInterface [template = constants.%GenericInterface.generic] { // CHECK:STDOUT: %U.patt.loc6_28.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_28.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc6_28.1, runtime_param [symbolic = %U.patt.loc6_28.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -1214,9 +1214,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %PackageHasParam.ref.loc8_6: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] -// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.1] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] -// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface) [template = constants.%AnyParam.3] +// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.generic] +// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface.generic] +// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) [template = constants.%AnyParam.2] // CHECK:STDOUT: %PackageHasParam.ref.loc8_52: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.4 [template = constants.%Y.type] // CHECK:STDOUT: } @@ -1249,11 +1249,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %AnyParam as %Y.ref { // CHECK:STDOUT: %K.decl: %K.type.1 = fn_decl @K.1 [template = constants.%K.1] {} {} -// CHECK:STDOUT: %.loc8: = interface_witness (%K.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%K.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: witness = %.loc8 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @AnyParam(constants.%T: type, constants.%X.2: @AnyParam.%T (%T)) { @@ -1285,21 +1285,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: fn @L() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %PackageHasParam.ref.loc13: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] -// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.1] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] -// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface) [template = constants.%AnyParam.3] -// CHECK:STDOUT: %obj.var: ref %AnyParam.3 = var obj -// CHECK:STDOUT: %obj: ref %AnyParam.3 = bind_name obj, %obj.var -// CHECK:STDOUT: %.loc13_58.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_58.2: init %AnyParam.3 = class_init (), %obj.var [template = constants.%struct] -// CHECK:STDOUT: %.loc13_59: init %AnyParam.3 = converted %.loc13_58.1, %.loc13_58.2 [template = constants.%struct] +// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.generic] +// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface.generic] +// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) [template = constants.%AnyParam.2] +// CHECK:STDOUT: %obj.var: ref %AnyParam.2 = var obj +// CHECK:STDOUT: %obj: ref %AnyParam.2 = bind_name obj, %obj.var +// CHECK:STDOUT: %.loc13_58.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_58.2: init %AnyParam.2 = class_init (), %obj.var [template = constants.%AnyParam.val] +// CHECK:STDOUT: %.loc13_59: init %AnyParam.2 = converted %.loc13_58.1, %.loc13_58.2 [template = constants.%AnyParam.val] // CHECK:STDOUT: assign %obj.var, %.loc13_59 -// CHECK:STDOUT: %obj.ref: ref %AnyParam.3 = name_ref obj, %obj +// CHECK:STDOUT: %obj.ref: ref %AnyParam.2 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.4 [template = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %.6 = name_ref K, imports.%import_ref.6 [template = constants.%.7] -// CHECK:STDOUT: %.loc14: %K.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%K.1] -// CHECK:STDOUT: %K.call: init %empty_tuple.type = call %.loc14() +// CHECK:STDOUT: %K.ref: %K.assoc_type = name_ref K, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %K.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%K.1] +// CHECK:STDOUT: %K.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1327,18 +1327,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %X.patt => constants.%X.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface) { +// CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) { // CHECK:STDOUT: %T => constants.%GenericInterface.type.1 // CHECK:STDOUT: %T.patt => constants.%GenericInterface.type.1 -// CHECK:STDOUT: %X => constants.%GenericInterface -// CHECK:STDOUT: %X.patt => constants.%GenericInterface +// CHECK:STDOUT: %X => constants.%GenericInterface.generic +// CHECK:STDOUT: %X.patt => constants.%GenericInterface.generic // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @K.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @K.2(constants.%.3) {} +// CHECK:STDOUT: specific @K.2(constants.%Y.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_generic_interface_as_param.carbon // CHECK:STDOUT: @@ -1347,30 +1347,30 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %M: %M.type = struct_value () [template] // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [template] -// CHECK:STDOUT: %AnyParam.1: %AnyParam.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %X.1: %T = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %X.2: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %X.patt.2: %T = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %GenericInterface.type.1: type = generic_interface_type @GenericInterface [template] -// CHECK:STDOUT: %GenericInterface: %GenericInterface.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.1 = struct_value () [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.2: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Self.2: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %AnyParam.3: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.1, %GenericInterface) [template] -// CHECK:STDOUT: %struct: %AnyParam.3 = struct_value () [template] +// CHECK:STDOUT: %AnyParam.2: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.1, %GenericInterface.generic) [template] +// CHECK:STDOUT: %AnyParam.val: %AnyParam.2 = struct_value () [template] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [template] // CHECK:STDOUT: %Self.3: %Y.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type.1: type = fn_type @K.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Y.type, %K.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type %Y.type, %K.type.1 [template] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: %K.type.2: type = fn_type @K.2 [template] // CHECK:STDOUT: %K.2: %K.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%K.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%K.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1383,18 +1383,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .GenericInterface = %import_ref.4 // CHECK:STDOUT: import PackageGenericInterface//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %AnyParam.type = import_ref PackageHasParam//default, inst+14, loaded [template = constants.%AnyParam.1] -// CHECK:STDOUT: %import_ref.2: = import_ref PackageHasParam//default, inst+24, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.1: %AnyParam.type = import_ref PackageHasParam//default, inst+14, loaded [template = constants.%AnyParam.generic] +// CHECK:STDOUT: %import_ref.2: = import_ref PackageHasParam//default, inst+24, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageHasParam//default, inst+22, unloaded -// CHECK:STDOUT: %import_ref.4: %GenericInterface.type.1 = import_ref PackageGenericInterface//default, inst+9, loaded [template = constants.%GenericInterface] +// CHECK:STDOUT: %import_ref.4: %GenericInterface.type.1 = import_ref PackageGenericInterface//default, inst+9, loaded [template = constants.%GenericInterface.generic] // CHECK:STDOUT: %import_ref.5 = import_ref PackageGenericInterface//default, inst+16, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref PackageHasParam//default, inst+26, loaded [template = constants.%Y.type] // CHECK:STDOUT: %import_ref.7 = import_ref PackageHasParam//default, inst+28, unloaded -// CHECK:STDOUT: %import_ref.8: %.4 = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.8: %K.assoc_type = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.9 = import_ref PackageHasParam//default, inst+30, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref PackageGenericInterface//default, inst+46, loaded [template = constants.%AnyParam.3] +// CHECK:STDOUT: %import_ref.11: type = import_ref PackageGenericInterface//default, inst+46, loaded [template = constants.%AnyParam.2] // CHECK:STDOUT: %import_ref.12: type = import_ref PackageGenericInterface//default, inst+56, loaded [template = constants.%Y.type] -// CHECK:STDOUT: %import_ref.13: = import_ref PackageGenericInterface//default, inst+65, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.13: = import_ref PackageGenericInterface//default, inst+65, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1453,22 +1453,22 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: fn @M() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %PackageHasParam.ref.loc8: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] -// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.1] +// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.generic] // CHECK:STDOUT: %PackageGenericInterface.ref: = name_ref PackageGenericInterface, imports.%PackageGenericInterface [template = imports.%PackageGenericInterface] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, imports.%import_ref.4 [template = constants.%GenericInterface] -// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface) [template = constants.%AnyParam.3] -// CHECK:STDOUT: %obj.var: ref %AnyParam.3 = var obj -// CHECK:STDOUT: %obj: ref %AnyParam.3 = bind_name obj, %obj.var -// CHECK:STDOUT: %.loc9_50.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_50.2: init %AnyParam.3 = class_init (), %obj.var [template = constants.%struct] -// CHECK:STDOUT: %.loc9_51: init %AnyParam.3 = converted %.loc9_50.1, %.loc9_50.2 [template = constants.%struct] +// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, imports.%import_ref.4 [template = constants.%GenericInterface.generic] +// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) [template = constants.%AnyParam.2] +// CHECK:STDOUT: %obj.var: ref %AnyParam.2 = var obj +// CHECK:STDOUT: %obj: ref %AnyParam.2 = bind_name obj, %obj.var +// CHECK:STDOUT: %.loc9_50.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc9_50.2: init %AnyParam.2 = class_init (), %obj.var [template = constants.%AnyParam.val] +// CHECK:STDOUT: %.loc9_51: init %AnyParam.2 = converted %.loc9_50.1, %.loc9_50.2 [template = constants.%AnyParam.val] // CHECK:STDOUT: assign %obj.var, %.loc9_51 -// CHECK:STDOUT: %obj.ref: ref %AnyParam.3 = name_ref obj, %obj +// CHECK:STDOUT: %obj.ref: ref %AnyParam.2 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc10: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.6 [template = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %.4 = name_ref K, imports.%import_ref.8 [template = constants.%.5] -// CHECK:STDOUT: %.loc10: %K.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%K.2] -// CHECK:STDOUT: %K.call: init %empty_tuple.type = call %.loc10() +// CHECK:STDOUT: %K.ref: %K.assoc_type = name_ref K, imports.%import_ref.8 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %K.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%K.2] +// CHECK:STDOUT: %K.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1504,11 +1504,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U.patt => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface) { +// CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) { // CHECK:STDOUT: %T => constants.%GenericInterface.type.1 // CHECK:STDOUT: %T.patt => constants.%GenericInterface.type.1 -// CHECK:STDOUT: %X => constants.%GenericInterface -// CHECK:STDOUT: %X.patt => constants.%GenericInterface +// CHECK:STDOUT: %X => constants.%GenericInterface.generic +// CHECK:STDOUT: %X.patt => constants.%GenericInterface.generic // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1537,23 +1537,23 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.9: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type, type, type, type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.type.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple.type.2) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %I.type = facet_value %C.3, %C.3 [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.2, %C.2 [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1577,7 +1577,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Extra6.decl: type = interface_decl @Extra6 [template = constants.%Extra6.type] {} {} // CHECK:STDOUT: %Extra7.decl: type = interface_decl @Extra7 [template = constants.%Extra7.type] {} {} // CHECK:STDOUT: %Extra8.decl: type = interface_decl @Extra8 [template = constants.%Extra8.type] {} {} -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc13_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_9.1, runtime_param [symbolic = %T.patt.loc13_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -1586,7 +1586,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %Extra1.ref: type = name_ref Extra1, file.%Extra1.decl [template = constants.%Extra1.type] // CHECK:STDOUT: %Extra2.ref: type = name_ref Extra2, file.%Extra2.decl [template = constants.%Extra2.type] // CHECK:STDOUT: %Extra3.ref: type = name_ref Extra3, file.%Extra3.decl [template = constants.%Extra3.type] @@ -1597,7 +1597,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Extra8.ref: type = name_ref Extra8, file.%Extra8.decl [template = constants.%Extra8.type] // CHECK:STDOUT: %.loc16_71: %tuple.type.1 = tuple_literal (%Extra1.ref, %Extra2.ref, %Extra3.ref, %Extra4.ref, %Extra5.ref, %Extra6.ref, %Extra7.ref, %Extra8.ref) // CHECK:STDOUT: %.loc16_72: type = converted %.loc16_71, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.type.2) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.type.2) [template = constants.%C.2] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1669,21 +1669,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.9] // 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: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16_79: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc16_79 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc13_9.1: type) { @@ -1693,11 +1693,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1723,25 +1723,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %T.patt.loc13_9.2 => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_use_has_extra_interfaces.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(type) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(type) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [template] // CHECK:STDOUT: %Extra7.type: type = facet_type <@Extra7> [template] // CHECK:STDOUT: %Extra6.type: type = facet_type <@Extra6> [template] @@ -1751,7 +1751,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Extra2.type: type = facet_type <@Extra2> [template] // CHECK:STDOUT: %Extra1.type: type = facet_type <@Extra1> [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.type) [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1760,12 +1760,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .I = %import_ref.4 // CHECK:STDOUT: import HasExtraInterfaces//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %C.type = import_ref HasExtraInterfaces//default, inst+39, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.2: = import_ref HasExtraInterfaces//default, inst+47, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.1: %C.type = import_ref HasExtraInterfaces//default, inst+39, loaded [template = constants.%C.generic] +// CHECK:STDOUT: %import_ref.2: = import_ref HasExtraInterfaces//default, inst+47, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref HasExtraInterfaces//default, inst+45, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref HasExtraInterfaces//default, inst+49, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.5 = import_ref HasExtraInterfaces//default, inst+51, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref HasExtraInterfaces//default, inst+57, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %F.assoc_type = import_ref HasExtraInterfaces//default, inst+57, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref HasExtraInterfaces//default, inst+53, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref HasExtraInterfaces//default, inst+31, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref HasExtraInterfaces//default, inst+27, unloaded @@ -1775,7 +1775,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.14 = import_ref HasExtraInterfaces//default, inst+11, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref HasExtraInterfaces//default, inst+7, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref HasExtraInterfaces//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.17: type = import_ref HasExtraInterfaces//default, inst+72, loaded [template = constants.%C.4] +// CHECK:STDOUT: %import_ref.17: type = import_ref HasExtraInterfaces//default, inst+72, loaded [template = constants.%C.3] // CHECK:STDOUT: %import_ref.18: type = import_ref HasExtraInterfaces//default, inst+74, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.19 = import_ref HasExtraInterfaces//default, inst+80, unloaded // CHECK:STDOUT: } @@ -1787,14 +1787,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %HasExtraInterfaces.import = import HasExtraInterfaces // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] { -// CHECK:STDOUT: %c.patt: %C.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %C.3 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %C.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %C.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %HasExtraInterfaces.ref.loc5: = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [template = imports.%HasExtraInterfaces] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(type) [template = constants.%C.3] -// CHECK:STDOUT: %c.param: %C.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %C.3 = bind_name c, %c.param +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] +// CHECK:STDOUT: %C: type = class_type @C, @C(type) [template = constants.%C.2] +// CHECK:STDOUT: %c.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %C.2 = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1871,12 +1871,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Test(%c.param_patt: %C.3) { +// CHECK:STDOUT: fn @Test(%c.param_patt: %C.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %C.3 = name_ref c, %c +// CHECK:STDOUT: %c.ref: %C.2 = name_ref c, %c // CHECK:STDOUT: %HasExtraInterfaces.ref.loc11: = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [template = imports.%HasExtraInterfaces] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.4 [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.6 [template = constants.%.5] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, imports.%import_ref.6 [template = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon index 00dd56c909b29..53cd613329d3c 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon @@ -57,18 +57,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -78,14 +78,14 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .X = %X.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc5_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc5_9.1, runtime_param [symbolic = %T.patt.loc5_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -104,17 +104,17 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc4_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc4_31.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc4_31.2 (constants.%.1)] -// CHECK:STDOUT: %.loc4_31.3: @I.%.loc4_31.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc4_31.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %F.assoc_type (constants.%F.assoc_type)] +// CHECK:STDOUT: %assoc0.loc4_31.2: @I.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc4_31.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type) = fn_decl @F [symbolic = @I.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc4_31.1: @I.%.loc4_31.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc4_31.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc4_31.1: @I.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc4_31.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc4_31.1 +// CHECK:STDOUT: .F = %assoc0.loc4_31.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -126,20 +126,20 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%T.loc4_13.1: type, @I.%Self.1: @I.%I.type (%I.type.2)) { @@ -168,11 +168,11 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %InInterfaceArgs: type = class_type @InInterfaceArgs [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -180,24 +180,24 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.9 [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.9 [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%InInterfaceArgs)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%InInterfaceArgs) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.9 [template] -// CHECK:STDOUT: %.7: %I.type.2 = facet_value %X, %X [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %I.facet: %I.type.2 = facet_value %X, %X [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I.generic] // CHECK:STDOUT: %import_ref.2 = import_ref Main//types, inst+32, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref Main//types, inst+41, loaded [template = constants.%X] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//types, inst+43, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//types, inst+43, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//types, inst+42, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//types, inst+14, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//types, inst+20, unloaded @@ -216,7 +216,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %InInterfaceArgs.decl: type = class_decl @InInterfaceArgs [template = constants.%InInterfaceArgs] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I.generic] // CHECK:STDOUT: %InInterfaceArgs.ref: type = name_ref InInterfaceArgs, file.%InInterfaceArgs.decl [template = constants.%InInterfaceArgs] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%InInterfaceArgs)> [template = constants.%I.type.3] // CHECK:STDOUT: } @@ -231,8 +231,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @I.%.1 (%.3) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -244,19 +244,19 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %X.ref as %I.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc7 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @InInterfaceArgs { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%InInterfaceArgs -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -296,23 +296,23 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%InInterfaceArgs, constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%InInterfaceArgs, constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_impl_in_interface_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -320,36 +320,36 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %InInterfaceArgs: type = class_type @InInterfaceArgs [template] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%InInterfaceArgs)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @I(%InInterfaceArgs) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type.3, %F.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.10 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %assoc0.3: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I.generic] // CHECK:STDOUT: %import_ref.2 = import_ref Main//types, inst+32, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref Main//types, inst+41, loaded [template = constants.%X] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//impl_in_interface_args, inst+5, loaded [template = constants.%InInterfaceArgs] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//types, inst+43, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//types, inst+43, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//types, inst+42, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//types, inst+14, unloaded -// CHECK:STDOUT: %import_ref.8: @I.%.1 (%.4) = import_ref Main//types, inst+20, loaded [symbolic = @I.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.8: @I.%F.assoc_type (%F.assoc_type.1) = import_ref Main//types, inst+20, loaded [symbolic = @I.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//types, inst+16, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//types, inst+16, unloaded -// CHECK:STDOUT: %import_ref.11: = import_ref Main//impl_in_interface_args, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//impl_in_interface_args, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.12 = import_ref Main//impl_in_interface_args, inst+6, unloaded // CHECK:STDOUT: %import_ref.14: type = import_ref Main//impl_in_interface_args, inst+14, loaded [template = constants.%X] // CHECK:STDOUT: %import_ref.15: type = import_ref Main//impl_in_interface_args, inst+45, loaded [template = constants.%I.type.3] -// CHECK:STDOUT: %import_ref.16: = import_ref Main//impl_in_interface_args, inst+56, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.16: = import_ref Main//impl_in_interface_args, inst+56, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -380,8 +380,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @I.%.1 (%.4) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -411,13 +411,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: fn @G(%x.param_patt: %X) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %X = name_ref x, %x -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I.generic] // CHECK:STDOUT: %InInterfaceArgs.ref: type = name_ref InInterfaceArgs, imports.%import_ref.4 [template = constants.%InInterfaceArgs] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%InInterfaceArgs)> [template = constants.%I.type.3] -// CHECK:STDOUT: %.loc6_35: %.6 = specific_constant imports.%import_ref.8, @I(constants.%InInterfaceArgs) [template = constants.%.7] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc6_35 [template = constants.%.7] -// CHECK:STDOUT: %.loc6_15: %F.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%F.3] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc6_15() +// CHECK:STDOUT: %.loc6: %F.assoc_type.2 = specific_constant imports.%import_ref.8, @I(constants.%InInterfaceArgs) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc6 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %F.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -449,53 +449,53 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- impl_in_class_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %InClassArgs: type = class_type @InClassArgs [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%InClassArgs) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%InClassArgs) [template] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.9 [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.9 [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%X)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%X) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.9 [template] -// CHECK:STDOUT: %.7: %I.type.2 = facet_value %C.3, %C.3 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %I.facet: %I.type.2 = facet_value %C.2, %C.2 [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I] -// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//types, inst+32, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I.generic] +// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//types, inst+32, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//types, inst+41, loaded [template = constants.%X] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//types, inst+39, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//types, inst+39, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//types, inst+37, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//types, inst+14, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//types, inst+20, unloaded // CHECK:STDOUT: %import_ref.8: @I.%F.type (%F.type.1) = import_ref Main//types, inst+16, loaded [symbolic = @I.%F (constants.%F.1)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//types, inst+16, unloaded -// CHECK:STDOUT: %import_ref.10: = import_ref Main//types, inst+43, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.10: = import_ref Main//types, inst+43, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.11 = import_ref Main//types, inst+42, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -509,10 +509,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %InClassArgs.decl: type = class_decl @InClassArgs [template = constants.%InClassArgs] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] // CHECK:STDOUT: %InClassArgs.ref: type = name_ref InClassArgs, file.%InClassArgs.decl [template = constants.%InClassArgs] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.3] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.2] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [template = constants.%I.type.3] // CHECK:STDOUT: } @@ -527,8 +527,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @I.%.1 (%.3) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -540,19 +540,19 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %I.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc7 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @InClassArgs { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%InClassArgs -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(constants.%T: type) { @@ -615,65 +615,65 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_impl_in_class_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %InClassArgs: type = class_type @InClassArgs [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%InClassArgs) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%InClassArgs) [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.12 [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%X)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @I(%X) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type.3, %F.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %assoc0.3: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I] -// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//types, inst+32, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.1: %I.type.1 = import_ref Main//types, inst+7, loaded [template = constants.%I.generic] +// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//types, inst+32, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//types, inst+41, loaded [template = constants.%X] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//impl_in_class_args, inst+5, loaded [template = constants.%InClassArgs] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//types, inst+39, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//types, inst+39, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//types, inst+37, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//impl_in_class_args, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//impl_in_class_args, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.8 = import_ref Main//impl_in_class_args, inst+6, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//types, inst+14, unloaded -// CHECK:STDOUT: %import_ref.10: @I.%.1 (%.4) = import_ref Main//types, inst+20, loaded [symbolic = @I.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.10: @I.%F.assoc_type (%F.assoc_type.1) = import_ref Main//types, inst+20, loaded [symbolic = @I.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.11 = import_ref Main//types, inst+16, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//types, inst+16, unloaded -// CHECK:STDOUT: %import_ref.13: = import_ref Main//types, inst+43, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//types, inst+43, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.14 = import_ref Main//types, inst+42, unloaded -// CHECK:STDOUT: %import_ref.16: type = import_ref Main//impl_in_class_args, inst+25, loaded [template = constants.%C.3] +// CHECK:STDOUT: %import_ref.16: type = import_ref Main//impl_in_class_args, inst+25, loaded [template = constants.%C.2] // CHECK:STDOUT: %import_ref.17: type = import_ref Main//impl_in_class_args, inst+58, loaded [template = constants.%I.type.3] -// CHECK:STDOUT: %import_ref.18: = import_ref Main//impl_in_class_args, inst+69, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.18: = import_ref Main//impl_in_class_args, inst+69, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -686,14 +686,14 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %c.patt: %C.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %C.3 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: %C.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %C.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] // CHECK:STDOUT: %InClassArgs.ref: type = name_ref InClassArgs, imports.%import_ref.4 [template = constants.%InClassArgs] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.3] -// CHECK:STDOUT: %c.param: %C.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %C.3 = bind_name c, %c.param +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.2] +// CHECK:STDOUT: %c.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %C.2 = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -706,8 +706,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @I.%.1 (%.4) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, imports.%import_ref.12 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -747,16 +747,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: complete_type_witness = imports.%import_ref.13 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @H(%c.param_patt: %C.3) { +// CHECK:STDOUT: fn @H(%c.param_patt: %C.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %C.3 = name_ref c, %c -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I] +// CHECK:STDOUT: %c.ref: %C.2 = name_ref c, %c +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [template = constants.%I.type.3] -// CHECK:STDOUT: %.loc6_34: %.6 = specific_constant imports.%import_ref.10, @I(constants.%X) [template = constants.%.7] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc6_34 [template = constants.%.7] -// CHECK:STDOUT: %.loc6_28: %F.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%F.3] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc6_28() +// CHECK:STDOUT: %.loc6: %F.assoc_type.2 = specific_constant imports.%import_ref.10, @I(constants.%X) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc6 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %F.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -800,7 +800,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index 0fd4398a0a8a0..ce1fa85e68092 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -167,25 +167,25 @@ fn P(o: O) { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [template] // CHECK:STDOUT: %Self.2: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasG.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %assoc0.2: %G.assoc_type = assoc_entity element0, @HasG.%G.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: %HasG.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.8: = interface_witness (%G.2) [template] -// CHECK:STDOUT: %.9: type = struct_type {} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: } @@ -222,41 +222,41 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasG { // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} -// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %G.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .G = %.loc9 +// CHECK:STDOUT: .G = %assoc0 // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc13 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%G.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%G.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -268,13 +268,13 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [template = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.1.%HasF.ref // CHECK:STDOUT: extend @impl.2.%HasG.ref -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { @@ -300,21 +300,21 @@ fn P(o: O) { // CHECK:STDOUT: fn @H(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() +// CHECK:STDOUT: %F.ref.loc22: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %impl.elem0.loc22: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %impl.elem0.loc22() // CHECK:STDOUT: %c.ref.loc23: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() +// CHECK:STDOUT: %F.ref.loc23: %F.assoc_type = name_ref F, @HasF.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %impl.elem0.loc23: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %impl.elem0.loc23() // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] -// CHECK:STDOUT: %.loc24: %G.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call.loc24: init %empty_tuple.type = call %.loc24() +// CHECK:STDOUT: %G.ref.loc24: %G.assoc_type = name_ref G, @HasG.%assoc0 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0.loc24: %G.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %c.ref.loc25: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] -// CHECK:STDOUT: %.loc25: %G.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call.loc25: init %empty_tuple.type = call %.loc25() +// CHECK:STDOUT: %G.ref.loc25: %G.assoc_type = name_ref G, @HasG.%assoc0 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0.loc25: %G.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -322,9 +322,9 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%.7) {} +// CHECK:STDOUT: specific @G.1(constants.%HasG.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impls.carbon // CHECK:STDOUT: @@ -333,25 +333,25 @@ fn P(o: O) { // CHECK:STDOUT: %Self.1: %HasA1.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %A.type.1: type = fn_type @A.1 [template] // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasA1.type, %A.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasA1.%A.decl [template] +// CHECK:STDOUT: %A.assoc_type.1: type = assoc_entity_type %HasA1.type, %A.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %A.assoc_type.1 = assoc_entity element0, @HasA1.%A.decl [template] // CHECK:STDOUT: %HasA2.type: type = facet_type <@HasA2> [template] // CHECK:STDOUT: %Self.2: %HasA2.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %HasA2.type, %A.type.2 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasA2.%A.decl [template] +// CHECK:STDOUT: %A.assoc_type.2: type = assoc_entity_type %HasA2.type, %A.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %A.assoc_type.2 = assoc_entity element0, @HasA2.%A.decl [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %A.type.3: type = fn_type @A.3 [template] // CHECK:STDOUT: %A.3: %A.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: %HasA1.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.6: = interface_witness (%A.3) [template] +// CHECK:STDOUT: %HasA1.facet: %HasA1.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%A.3) [template] // CHECK:STDOUT: %A.type.4: type = fn_type @A.4 [template] // CHECK:STDOUT: %A.4: %A.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: %HasA2.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.8: = interface_witness (%A.4) [template] -// CHECK:STDOUT: %.9: type = struct_type {} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %HasA2.facet: %HasA2.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%A.4) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -388,41 +388,41 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasA1 { // CHECK:STDOUT: %Self: %HasA1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %A.decl: %A.type.1 = fn_decl @A.1 [template = constants.%A.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %A.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %A.assoc_type.1 = assoc_entity element0, %A.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .A = %.loc5 +// CHECK:STDOUT: .A = %assoc0 // CHECK:STDOUT: witness = (%A.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasA2 { // CHECK:STDOUT: %Self: %HasA2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %A.decl: %A.type.2 = fn_decl @A.2 [template = constants.%A.2] {} {} -// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %A.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %A.assoc_type.2 = assoc_entity element0, %A.decl [template = constants.%assoc0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .A = %.loc9 +// CHECK:STDOUT: .A = %assoc0 // CHECK:STDOUT: witness = (%A.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasA1.ref { // CHECK:STDOUT: %A.decl: %A.type.3 = fn_decl @A.3 [template = constants.%A.3] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%A.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%A.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: witness = %.loc13 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasA2.ref { // CHECK:STDOUT: %A.decl: %A.type.4 = fn_decl @A.4 [template = constants.%A.4] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%A.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%A.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -434,13 +434,13 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %HasA2.ref: type = name_ref HasA2, file.%HasA2.decl [template = constants.%HasA2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: extend @impl.1.%HasA1.ref // CHECK:STDOUT: extend @impl.2.%HasA2.ref -// CHECK:STDOUT: complete_type_witness = %.loc19 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A.1(@HasA1.%Self: %HasA1.type) { @@ -476,9 +476,9 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.1(constants.%.5) {} +// CHECK:STDOUT: specific @A.1(constants.%HasA1.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.2(constants.%.7) {} +// CHECK:STDOUT: specific @A.2(constants.%HasA2.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- different_impl_and_base.carbon // CHECK:STDOUT: @@ -488,21 +488,21 @@ fn P(o: O) { // CHECK:STDOUT: %I.type.1: type = fn_type @I.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I.1: %I.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasI.type, %I.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasI.%I.decl [template] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %HasI.type, %I.type.1 [template] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @HasI.%I.decl [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] // CHECK:STDOUT: %J: %J.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %E: type = class_type @E [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %E, %B [template] +// CHECK:STDOUT: %E.elem: type = unbound_element_type %E, %B [template] // CHECK:STDOUT: %I.type.2: type = fn_type @I.2 [template] // CHECK:STDOUT: %I.2: %I.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: %HasI.type = facet_value %E, %E [template] -// CHECK:STDOUT: %.8: = interface_witness (%I.2) [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %HasI.facet: %HasI.type = facet_value %E, %E [template] +// CHECK:STDOUT: %interface: = interface_witness (%I.2) [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: } @@ -539,48 +539,48 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasI { // CHECK:STDOUT: %Self: %HasI.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %I.decl: %I.type.1 = fn_decl @I.1 [template = constants.%I.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %I.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .I = %.loc5 +// CHECK:STDOUT: .I = %assoc0 // CHECK:STDOUT: witness = (%I.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasI.ref { // CHECK:STDOUT: %I.decl: %I.type.2 = fn_decl @I.2 [template = constants.%I.2] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%I.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%I.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: witness = %.loc14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] {} {} -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc13: %.6 = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %.loc13: %E.elem = base_decl %B.ref, element0 [template] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %HasI.ref: type = name_ref HasI, file.%HasI.decl [template = constants.%HasI.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E // CHECK:STDOUT: .base = %.loc13 // CHECK:STDOUT: extend %B.ref // CHECK:STDOUT: extend @impl.%HasI.ref -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @I.1(@HasI.%Self: %HasI.type) { @@ -601,13 +601,13 @@ fn P(o: O) { // CHECK:STDOUT: fn @H(%e.param_patt: %E) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %I.ref.loc20: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc20: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] -// CHECK:STDOUT: %I.call.loc20: init %empty_tuple.type = call %.loc20() +// CHECK:STDOUT: %I.ref.loc20: %I.assoc_type = name_ref I, @HasI.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc20: %I.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%I.2] +// CHECK:STDOUT: %I.call.loc20: init %empty_tuple.type = call %impl.elem0.loc20() // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e -// CHECK:STDOUT: %I.ref.loc21: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc21: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] -// CHECK:STDOUT: %I.call.loc21: init %empty_tuple.type = call %.loc21() +// CHECK:STDOUT: %I.ref.loc21: %I.assoc_type = name_ref I, @HasI.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc21: %I.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%I.2] +// CHECK:STDOUT: %I.call.loc21: init %empty_tuple.type = call %impl.elem0.loc21() // CHECK:STDOUT: %E.ref.loc22: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %J.ref.loc22: %J.type = name_ref J, @B.%J.decl [template = constants.%J] // CHECK:STDOUT: %J.call.loc22: init %empty_tuple.type = call %J.ref.loc22() @@ -619,7 +619,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @I.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.1(constants.%.7) {} +// CHECK:STDOUT: specific @I.1(constants.%HasI.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impl_and_base.carbon // CHECK:STDOUT: @@ -627,22 +627,22 @@ fn P(o: O) { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %K.type.1: type = fn_type @K.1 [template] // CHECK:STDOUT: %K.1: %K.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %HasK.type: type = facet_type <@HasK> [template] // CHECK:STDOUT: %Self: %HasK.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type.2: type = fn_type @K.2 [template] // CHECK:STDOUT: %K.2: %K.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %HasK.type, %K.type.2 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasK.%K.decl [template] +// CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type %HasK.type, %K.type.2 [template] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @HasK.%K.decl [template] // CHECK:STDOUT: %L: type = class_type @L [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %L, %Base [template] +// CHECK:STDOUT: %L.elem: type = unbound_element_type %L, %Base [template] // CHECK:STDOUT: %K.type.3: type = fn_type @K.3 [template] // CHECK:STDOUT: %K.3: %K.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: %HasK.type = facet_value %L, %L [template] -// CHECK:STDOUT: %.8: = interface_witness (%K.3) [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %HasK.facet: %HasK.type = facet_value %L, %L [template] +// CHECK:STDOUT: %interface: = interface_witness (%K.3) [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %M.type: type = fn_type @M [template] // CHECK:STDOUT: %M: %M.type = struct_value () [template] // CHECK:STDOUT: } @@ -679,48 +679,48 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasK { // CHECK:STDOUT: %Self: %HasK.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %K.decl: %K.type.2 = fn_decl @K.2 [template = constants.%K.2] {} {} -// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %K.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, %K.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .K = %.loc9 +// CHECK:STDOUT: .K = %assoc0 // CHECK:STDOUT: witness = (%K.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasK.ref { // CHECK:STDOUT: %K.decl: %K.type.3 = fn_decl @K.3 [template = constants.%K.3] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%K.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%K.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: witness = %.loc14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %K.decl: %K.type.1 = fn_decl @K.1 [template = constants.%K.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @L { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc13: %.6 = base_decl %Base.ref, element0 [template] +// CHECK:STDOUT: %.loc13: %L.elem = base_decl %Base.ref, element0 [template] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%L [template = constants.%L] // CHECK:STDOUT: %HasK.ref: type = name_ref HasK, file.%HasK.decl [template = constants.%HasK.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%L // CHECK:STDOUT: .base = %.loc13 // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: extend @impl.%HasK.ref -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @K.1() { @@ -749,7 +749,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @K.2(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @K.2(constants.%.7) {} +// CHECK:STDOUT: specific @K.2(constants.%HasK.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- ambiguity_hidden.carbon // CHECK:STDOUT: @@ -758,34 +758,34 @@ fn P(o: O) { // CHECK:STDOUT: %N.type.1: type = fn_type @N.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %N.1: %N.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %HasN1.type: type = facet_type <@HasN1> [template] // CHECK:STDOUT: %Self.1: %HasN1.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %N.type.2: type = fn_type @N.2 [template] // CHECK:STDOUT: %N.2: %N.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %HasN1.type, %N.type.2 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasN1.%N.decl [template] +// CHECK:STDOUT: %N.assoc_type.1: type = assoc_entity_type %HasN1.type, %N.type.2 [template] +// CHECK:STDOUT: %assoc0.1: %N.assoc_type.1 = assoc_entity element0, @HasN1.%N.decl [template] // CHECK:STDOUT: %HasN2.type: type = facet_type <@HasN2> [template] // CHECK:STDOUT: %Self.2: %HasN2.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %N.type.3: type = fn_type @N.3 [template] // CHECK:STDOUT: %N.3: %N.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %HasN2.type, %N.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @HasN2.%N.decl [template] +// CHECK:STDOUT: %N.assoc_type.2: type = assoc_entity_type %HasN2.type, %N.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %N.assoc_type.2 = assoc_entity element0, @HasN2.%N.decl [template] // CHECK:STDOUT: %O: type = class_type @O [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %O, %NBase [template] +// CHECK:STDOUT: %O.elem: type = unbound_element_type %O, %NBase [template] // CHECK:STDOUT: %N.type.4: type = fn_type @N.4 [template] // CHECK:STDOUT: %N.4: %N.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: %HasN1.type = facet_value %O, %O [template] -// CHECK:STDOUT: %.10: = interface_witness (%N.4) [template] +// CHECK:STDOUT: %HasN1.facet: %HasN1.type = facet_value %O, %O [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%N.4) [template] // CHECK:STDOUT: %N.type.5: type = fn_type @N.5 [template] // CHECK:STDOUT: %N.5: %N.type.5 = struct_value () [template] -// CHECK:STDOUT: %.11: %HasN2.type = facet_value %O, %O [template] -// CHECK:STDOUT: %.12: = interface_witness (%N.5) [template] +// CHECK:STDOUT: %HasN2.facet: %HasN2.type = facet_value %O, %O [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%N.5) [template] // CHECK:STDOUT: %N.type.6: type = fn_type @N.6 [template] // CHECK:STDOUT: %N.6: %N.type.6 = struct_value () [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: %NBase} [template] -// CHECK:STDOUT: %.14: = complete_type_witness %.13 [template] +// CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %NBase} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %P.type: type = fn_type @P [template] // CHECK:STDOUT: %P: %P.type = struct_value () [template] // CHECK:STDOUT: } @@ -824,56 +824,56 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasN1 { // CHECK:STDOUT: %Self: %HasN1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %N.decl: %N.type.2 = fn_decl @N.2 [template = constants.%N.2] {} {} -// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %N.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %N.assoc_type.1 = assoc_entity element0, %N.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .N = %.loc9 +// CHECK:STDOUT: .N = %assoc0 // CHECK:STDOUT: witness = (%N.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasN2 { // CHECK:STDOUT: %Self: %HasN2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %N.decl: %N.type.3 = fn_decl @N.3 [template = constants.%N.3] {} {} -// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element0, %N.decl [template = constants.%.6] +// CHECK:STDOUT: %assoc0: %N.assoc_type.2 = assoc_entity element0, %N.decl [template = constants.%assoc0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .N = %.loc13 +// CHECK:STDOUT: .N = %assoc0 // CHECK:STDOUT: witness = (%N.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasN1.ref { // CHECK:STDOUT: %N.decl: %N.type.4 = fn_decl @N.4 [template = constants.%N.4] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%N.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%N.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasN2.ref { // CHECK:STDOUT: %N.decl: %N.type.5 = fn_decl @N.5 [template = constants.%N.5] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%N.decl) [template = constants.%.12] +// CHECK:STDOUT: %interface: = interface_witness (%N.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl -// CHECK:STDOUT: witness = %.loc21 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NBase { // CHECK:STDOUT: %N.decl: %N.type.1 = fn_decl @N.1 [template = constants.%N.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NBase // CHECK:STDOUT: .N = %N.decl -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @O { // CHECK:STDOUT: %NBase.ref: type = name_ref NBase, file.%NBase.decl [template = constants.%NBase] -// CHECK:STDOUT: %.loc17: %.8 = base_decl %NBase.ref, element0 [template] +// CHECK:STDOUT: %.loc17: %O.elem = base_decl %NBase.ref, element0 [template] // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%O [template = constants.%O] // CHECK:STDOUT: %HasN1.ref: type = name_ref HasN1, file.%HasN1.decl [template = constants.%HasN1.type] @@ -883,7 +883,7 @@ fn P(o: O) { // CHECK:STDOUT: %HasN2.ref: type = name_ref HasN2, file.%HasN2.decl [template = constants.%HasN2.type] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.6 = fn_decl @N.6 [template = constants.%N.6] {} {} -// CHECK:STDOUT: %.loc25: = complete_type_witness %.13 [template = constants.%.14] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%O @@ -892,7 +892,7 @@ fn P(o: O) { // CHECK:STDOUT: extend %NBase.ref // CHECK:STDOUT: extend @impl.1.%HasN1.ref // CHECK:STDOUT: extend @impl.2.%HasN2.ref -// CHECK:STDOUT: complete_type_witness = %.loc25 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @N.1() { @@ -937,7 +937,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @N.3(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.2(constants.%.9) {} +// CHECK:STDOUT: specific @N.2(constants.%HasN1.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.3(constants.%.11) {} +// CHECK:STDOUT: specific @N.3(constants.%HasN2.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 04c2b0eb4bc30..b5eac3f302409 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -25,15 +25,15 @@ impl C as Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: %Simple.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,29 +52,29 @@ impl C as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { @@ -89,5 +89,5 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon index 678bb27cdea64..56a66de9c59be 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon @@ -30,8 +30,8 @@ impl AC as AI {} // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,10 +71,10 @@ impl AC as AI {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon index 7e37216bc5e28..a907205b5f13e 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon @@ -20,8 +20,8 @@ impl true as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc16_6.1: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc16_6.2: type = converted %.loc16_6.1, [template = ] +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc16: type = converted %true, [template = ] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -45,9 +45,9 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as %I.ref { -// CHECK:STDOUT: %.loc16_16: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc16_16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon index 7d7d22c9bba9f..5669b0a7eafe6 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon @@ -40,7 +40,7 @@ impl C as J {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,8 +49,8 @@ impl C as J {} // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc12_7.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc12_7.2: type = converted %.loc12_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_7.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_7.2: type = converted %.loc12_7.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -67,8 +67,8 @@ impl C as J {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,10 +92,10 @@ impl C as J {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index 35361be8e7810..fab420685e3f0 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -78,17 +78,17 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %Self.5: %L.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: %I.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %T.1 [symbolic] +// CHECK:STDOUT: %T.as_type.1: type = facet_access_type %T.1 [symbolic] // CHECK:STDOUT: %T.2: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %J.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = facet_access_type %T.2 [symbolic] +// CHECK:STDOUT: %T.as_type.2: type = facet_access_type %T.2 [symbolic] // CHECK:STDOUT: %T.3: %K.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3: %K.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = facet_access_type %T.3 [symbolic] +// CHECK:STDOUT: %T.as_type.3: type = facet_access_type %T.3 [symbolic] // CHECK:STDOUT: %T.4: %L.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.4: %L.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = facet_access_type %T.4 [symbolic] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %T.as_type.4: type = facet_access_type %T.4 [symbolic] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,8 +110,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc11_21.1: type = facet_access_type %T.ref [symbolic = %.loc11_21.3 (constants.%.1)] -// CHECK:STDOUT: %.loc11_21.2: type = converted %T.ref, %.loc11_21.1 [symbolic = %.loc11_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc11_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.1)] +// CHECK:STDOUT: %.loc11: type = converted %T.ref, %T.as_type.loc11_21.1 [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc11_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_14.2 (constants.%T.1)] @@ -122,8 +122,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc12_21.1: type = facet_access_type %T.ref [symbolic = %.loc12_21.3 (constants.%.2)] -// CHECK:STDOUT: %.loc12_21.2: type = converted %T.ref, %.loc12_21.1 [symbolic = %.loc12_21.3 (constants.%.2)] +// CHECK:STDOUT: %T.as_type.loc12_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.2)] +// CHECK:STDOUT: %.loc12: type = converted %T.ref, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param // CHECK:STDOUT: %T.loc12_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_14.2 (constants.%T.2)] @@ -134,8 +134,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc13_14.1 [symbolic = %T.loc13_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc13_21.1: type = facet_access_type %T.ref [symbolic = %.loc13_21.3 (constants.%.3)] -// CHECK:STDOUT: %.loc13_21.2: type = converted %T.ref, %.loc13_21.1 [symbolic = %.loc13_21.3 (constants.%.3)] +// CHECK:STDOUT: %T.as_type.loc13_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3)] +// CHECK:STDOUT: %.loc13: type = converted %T.ref, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param // CHECK:STDOUT: %T.loc13_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_14.2 (constants.%T.3)] @@ -146,8 +146,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc14_21.1: type = facet_access_type %T.ref [symbolic = %.loc14_21.3 (constants.%.4)] -// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref, %.loc14_21.1 [symbolic = %.loc14_21.3 (constants.%.4)] +// CHECK:STDOUT: %T.as_type.loc14_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.4)] +// CHECK:STDOUT: %.loc14: type = converted %T.ref, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param // CHECK:STDOUT: %T.loc14_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_14.2 (constants.%T.4)] @@ -158,8 +158,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc18_14.1 [symbolic = %T.loc18_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc18_21.1: type = facet_access_type %T.ref [symbolic = %.loc18_21.3 (constants.%.1)] -// CHECK:STDOUT: %.loc18_21.2: type = converted %T.ref, %.loc18_21.1 [symbolic = %.loc18_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc18_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_21.2 (constants.%T.as_type.1)] +// CHECK:STDOUT: %.loc18: type = converted %T.ref, %T.as_type.loc18_21.1 [symbolic = %T.as_type.loc18_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc18_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc18_14.2 (constants.%T.1)] @@ -170,8 +170,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc19_14.1 [symbolic = %T.loc19_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc19_21.1: type = facet_access_type %T.ref [symbolic = %.loc19_21.3 (constants.%.2)] -// CHECK:STDOUT: %.loc19_21.2: type = converted %T.ref, %.loc19_21.1 [symbolic = %.loc19_21.3 (constants.%.2)] +// CHECK:STDOUT: %T.as_type.loc19_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_21.2 (constants.%T.as_type.2)] +// CHECK:STDOUT: %.loc19: type = converted %T.ref, %T.as_type.loc19_21.1 [symbolic = %T.as_type.loc19_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param // CHECK:STDOUT: %T.loc19_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_14.2 (constants.%T.2)] @@ -182,8 +182,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc20_21.1: type = facet_access_type %T.ref [symbolic = %.loc20_21.3 (constants.%.3)] -// CHECK:STDOUT: %.loc20_21.2: type = converted %T.ref, %.loc20_21.1 [symbolic = %.loc20_21.3 (constants.%.3)] +// CHECK:STDOUT: %T.as_type.loc20_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_21.2 (constants.%T.as_type.3)] +// CHECK:STDOUT: %.loc20: type = converted %T.ref, %T.as_type.loc20_21.1 [symbolic = %T.as_type.loc20_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param // CHECK:STDOUT: %T.loc20_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc20_14.2 (constants.%T.3)] @@ -194,8 +194,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc21_21.1: type = facet_access_type %T.ref [symbolic = %.loc21_21.3 (constants.%.4)] -// CHECK:STDOUT: %.loc21_21.2: type = converted %T.ref, %.loc21_21.1 [symbolic = %.loc21_21.3 (constants.%.4)] +// CHECK:STDOUT: %T.as_type.loc21_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc21_21.2 (constants.%T.as_type.4)] +// CHECK:STDOUT: %.loc21: type = converted %T.ref, %T.as_type.loc21_21.1 [symbolic = %T.as_type.loc21_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param // CHECK:STDOUT: %T.loc21_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T.4)] @@ -245,141 +245,141 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.1(%T.loc11_14.1: %I.type) { // CHECK:STDOUT: %T.loc11_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.patt.loc11_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.1)] -// CHECK:STDOUT: %.loc11_21.3: type = facet_access_type %T.loc11_14.2 [symbolic = %.loc11_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc11_21.2: type = facet_access_type %T.loc11_14.2 [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc11_21.2 as %Interface.ref; +// CHECK:STDOUT: impl: %.loc11 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(%T.loc12_14.1: %J.type) { // CHECK:STDOUT: %T.loc12_14.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc12_14.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc12_21.3: type = facet_access_type %T.loc12_14.2 [symbolic = %.loc12_21.3 (constants.%.2)] +// CHECK:STDOUT: %T.as_type.loc12_21.2: type = facet_access_type %T.loc12_14.2 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc12_21.2 as %Interface.ref; +// CHECK:STDOUT: impl: %.loc12 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.3(%T.loc13_14.1: %K.type) { // CHECK:STDOUT: %T.loc13_14.2: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.patt.loc13_14.2: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %.loc13_21.3: type = facet_access_type %T.loc13_14.2 [symbolic = %.loc13_21.3 (constants.%.3)] +// CHECK:STDOUT: %T.as_type.loc13_21.2: type = facet_access_type %T.loc13_14.2 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc13_21.2 as %Interface.ref; +// CHECK:STDOUT: impl: %.loc13 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.4(%T.loc14_14.1: %L.type) { // CHECK:STDOUT: %T.loc14_14.2: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.patt.loc14_14.2: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.4)] -// CHECK:STDOUT: %.loc14_21.3: type = facet_access_type %T.loc14_14.2 [symbolic = %.loc14_21.3 (constants.%.4)] +// CHECK:STDOUT: %T.as_type.loc14_21.2: type = facet_access_type %T.loc14_14.2 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc14_21.2 as %Interface.ref; +// CHECK:STDOUT: impl: %.loc14 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.5(%T.loc18_14.1: %I.type) { // CHECK:STDOUT: %T.loc18_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc18_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.patt.loc18_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.1)] -// CHECK:STDOUT: %.loc18_21.3: type = facet_access_type %T.loc18_14.2 [symbolic = %.loc18_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc18_21.2: type = facet_access_type %T.loc18_14.2 [symbolic = %T.as_type.loc18_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc18_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: impl: %.loc18 as %Interface.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc18_36 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.6(%T.loc19_14.1: %J.type) { // CHECK:STDOUT: %T.loc19_14.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc19_14.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc19_21.3: type = facet_access_type %T.loc19_14.2 [symbolic = %.loc19_21.3 (constants.%.2)] +// CHECK:STDOUT: %T.as_type.loc19_21.2: type = facet_access_type %T.loc19_14.2 [symbolic = %T.as_type.loc19_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc19_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: impl: %.loc19 as %Interface.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc19_36 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.7(%T.loc20_14.1: %K.type) { // CHECK:STDOUT: %T.loc20_14.2: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.patt.loc20_14.2: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %.loc20_21.3: type = facet_access_type %T.loc20_14.2 [symbolic = %.loc20_21.3 (constants.%.3)] +// CHECK:STDOUT: %T.as_type.loc20_21.2: type = facet_access_type %T.loc20_14.2 [symbolic = %T.as_type.loc20_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc20_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: impl: %.loc20 as %Interface.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc20_36 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.8(%T.loc21_14.1: %L.type) { // CHECK:STDOUT: %T.loc21_14.2: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.patt.loc21_14.2: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt.4)] -// CHECK:STDOUT: %.loc21_21.3: type = facet_access_type %T.loc21_14.2 [symbolic = %.loc21_21.3 (constants.%.4)] +// CHECK:STDOUT: %T.as_type.loc21_21.2: type = facet_access_type %T.loc21_14.2 [symbolic = %T.as_type.loc21_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc21_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: impl: %.loc21 as %Interface.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc21_36 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.1(constants.%T.1) { // CHECK:STDOUT: %T.loc11_14.2 => constants.%T.1 // CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%T.1 -// CHECK:STDOUT: %.loc11_21.3 => constants.%.1 +// CHECK:STDOUT: %T.as_type.loc11_21.2 => constants.%T.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T.2) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T.2 -// CHECK:STDOUT: %.loc12_21.3 => constants.%.2 +// CHECK:STDOUT: %T.as_type.loc12_21.2 => constants.%T.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%T.3) { // CHECK:STDOUT: %T.loc13_14.2 => constants.%T.3 // CHECK:STDOUT: %T.patt.loc13_14.2 => constants.%T.3 -// CHECK:STDOUT: %.loc13_21.3 => constants.%.3 +// CHECK:STDOUT: %T.as_type.loc13_21.2 => constants.%T.as_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.4(constants.%T.4) { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T.4 // CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T.4 -// CHECK:STDOUT: %.loc14_21.3 => constants.%.4 +// CHECK:STDOUT: %T.as_type.loc14_21.2 => constants.%T.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.5(constants.%T.1) { // CHECK:STDOUT: %T.loc18_14.2 => constants.%T.1 // CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.1 -// CHECK:STDOUT: %.loc18_21.3 => constants.%.1 +// CHECK:STDOUT: %T.as_type.loc18_21.2 => constants.%T.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.6(constants.%T.2) { // CHECK:STDOUT: %T.loc19_14.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.2 -// CHECK:STDOUT: %.loc19_21.3 => constants.%.2 +// CHECK:STDOUT: %T.as_type.loc19_21.2 => constants.%T.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%T.3) { // CHECK:STDOUT: %T.loc20_14.2 => constants.%T.3 // CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T.3 -// CHECK:STDOUT: %.loc20_21.3 => constants.%.3 +// CHECK:STDOUT: %T.as_type.loc20_21.2 => constants.%T.as_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.8(constants.%T.4) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T.4 // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.4 -// CHECK:STDOUT: %.loc21_21.3 => constants.%.4 +// CHECK:STDOUT: %T.as_type.loc21_21.2 => constants.%T.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon @@ -391,7 +391,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %T [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -407,8 +407,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc7: %I.type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_21.1: type = facet_access_type %T.ref.loc7 [symbolic = %.loc7_21.3 (constants.%.1)] -// CHECK:STDOUT: %.loc7_21.2: type = converted %T.ref.loc7, %.loc7_21.1 [symbolic = %.loc7_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc7_21.1: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7: type = converted %T.ref.loc7, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref.loc7: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc7: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc7_14.1: %I.type = bind_symbolic_name T, 0, %T.param.loc7 [symbolic = %T.loc7_14.2 (constants.%T)] @@ -419,8 +419,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc14: %I.type = name_ref T, %T.loc14 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14_21.1: type = facet_access_type %T.ref.loc14 [symbolic = constants.%.1] -// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref.loc14, %.loc14_21.1 [symbolic = constants.%.1] +// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [symbolic = constants.%T.as_type] +// CHECK:STDOUT: %.loc14: type = converted %T.ref.loc14, %T.as_type.loc14 [symbolic = constants.%T.as_type] // CHECK:STDOUT: %J.ref.loc14: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc14: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc14: %I.type = bind_symbolic_name T, 0, %T.param.loc14 [symbolic = constants.%T] @@ -446,11 +446,11 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl(%T.loc7_14.1: %I.type) { // CHECK:STDOUT: %T.loc7_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc7_21.3: type = facet_access_type %T.loc7_14.2 [symbolic = %.loc7_21.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc7_21.2: type = facet_access_type %T.loc7_14.2 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc7_21.2 as %J.ref.loc7 { +// CHECK:STDOUT: impl: %.loc7 as %J.ref.loc7 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = .inst+26.loc7_28 // CHECK:STDOUT: } @@ -459,7 +459,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T -// CHECK:STDOUT: %.loc7_21.3 => constants.%.1 +// CHECK:STDOUT: %T.as_type.loc7_21.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- same_type_different_spelling.carbon @@ -468,9 +468,9 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: = interface_witness () [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C, %C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -489,10 +489,10 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %C.ref.loc14_7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc14_10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_11.1: %tuple.type = tuple_literal (%C.ref.loc14_7, %C.ref.loc14_10) -// CHECK:STDOUT: %.loc14_13: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C.ref.loc14_7, %C.ref.loc14_10) [template = constants.%tuple] // CHECK:STDOUT: %.loc14_11.2: %tuple.type = converted %.loc14_11.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_12: type = tuple_access %.loc14_11.2, element0 [template = constants.%C] +// CHECK:STDOUT: %tuple.elem0: type = tuple_access %.loc14_11.2, element0 [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -506,17 +506,17 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %I.ref { -// CHECK:STDOUT: %.loc13: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc13 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %.loc14_12 as %I.ref { -// CHECK:STDOUT: %.loc14_20: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: impl @impl.2: %tuple.elem0 as %I.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc14_20 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon index f16d5145cf4c2..a58023cebb8c3 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon @@ -40,15 +40,15 @@ fn G(c: C) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %I.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,21 +63,21 @@ fn G(c: C) { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc5 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc9: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc9 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -85,12 +85,12 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend @impl.%I.ref -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -105,39 +105,39 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_imported_class_extend_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//extend_impl_library, inst+1, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//extend_impl_library, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//extend_impl_library, inst+24, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//extend_impl_library, inst+24, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//extend_impl_library, inst+13, unloaded // CHECK:STDOUT: %import_ref.5: type = import_ref Main//extend_impl_library, inst+15, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//extend_impl_library, inst+3, unloaded -// CHECK:STDOUT: %import_ref.7: %.4 = import_ref Main//extend_impl_library, inst+10, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: %F.assoc_type = import_ref Main//extend_impl_library, inst+10, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.8 = import_ref Main//extend_impl_library, inst+5, unloaded // CHECK:STDOUT: %import_ref.10: type = import_ref Main//extend_impl_library, inst+14, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.11: type = import_ref Main//extend_impl_library, inst+15, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_impl_library, inst+21, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_impl_library, inst+21, loaded [template = constants.%interface] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -179,13 +179,13 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc7: %.4 = name_ref F, imports.%import_ref.7 [template = constants.%.5] -// CHECK:STDOUT: %.loc7: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc7: init %empty_tuple.type = call %.loc7() +// CHECK:STDOUT: %F.ref.loc7: %F.assoc_type = name_ref F, imports.%import_ref.7 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc7: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc7: init %empty_tuple.type = call %impl.elem0.loc7() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc8: %.4 = name_ref F, imports.%import_ref.7 [template = constants.%.5] -// CHECK:STDOUT: %.loc8: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc8: init %empty_tuple.type = call %.loc8() +// CHECK:STDOUT: %F.ref.loc8: %F.assoc_type = name_ref F, imports.%import_ref.7 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc8: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc8: init %empty_tuple.type = call %impl.elem0.loc8() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index 3be4d43da5be2..6f968c47e682b 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -41,17 +41,17 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%.3)> [symbolic] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,7 +60,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc5_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc5_13.1, runtime_param [symbolic = %T.patt.loc5_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -72,7 +72,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_14.1, runtime_param [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc7_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param @@ -83,10 +83,10 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_32.1: type = ptr_type %T [symbolic = %.loc8_32.2 (constants.%.3)] -// CHECK:STDOUT: %I.type.loc8_33.1: type = facet_type <@I, @I(constants.%.3)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] +// CHECK:STDOUT: %ptr.loc8_32.1: type = ptr_type %T [symbolic = %ptr.loc8_32.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc8_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -120,25 +120,25 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.2(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %.loc8_32.2 (constants.%.3)] -// CHECK:STDOUT: %I.type.loc8_33.2: type = facet_type <@I, @I(%.loc8_32.2)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] +// CHECK:STDOUT: %ptr.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %ptr.loc8_32.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc8_33.2: type = facet_type <@I, @I(%ptr.loc8_32.2)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_33.1 { -// CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc8_35 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { @@ -162,24 +162,24 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.3) { -// CHECK:STDOUT: %T.loc5_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.3 +// CHECK:STDOUT: specific @I(constants.%ptr) { +// CHECK:STDOUT: %T.loc5_13.2 => constants.%ptr +// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%ptr // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.2.%.loc8_32.2) { -// CHECK:STDOUT: %T.loc5_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.3 +// CHECK:STDOUT: specific @I(@impl.2.%ptr.loc8_32.2) { +// CHECK:STDOUT: %T.loc5_13.2 => constants.%ptr +// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %.loc8_32.2 => constants.%.3 +// CHECK:STDOUT: %ptr.loc8_32.2 => constants.%ptr // CHECK:STDOUT: %I.type.loc8_33.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -188,23 +188,23 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%.3)> [symbolic] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+12, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+12, loaded [template = constants.%I.generic] // CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst+19, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref Main//import_generic, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//import_generic, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic, inst+2, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, inst+29, loaded [symbolic = @impl.1.%I.type.1 (constants.%I.type.2)] @@ -222,7 +222,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = constants.%T] // CHECK:STDOUT: %I.type.loc4: type = facet_type <@I, @I(constants.%T)> [symbolic = constants.%I.type.2] // CHECK:STDOUT: %T.param: type = value_param runtime_param @@ -253,18 +253,18 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 { -// CHECK:STDOUT: %.loc4: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc4 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T (%T) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%.1)> [symbolic = %I.type (constants.%I.type.3)] +// CHECK:STDOUT: %ptr: type = ptr_type @impl.2.%T (%T) [symbolic = %ptr (constants.%ptr)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -305,20 +305,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type.1 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.3) { -// CHECK:STDOUT: %T => constants.%.3 -// CHECK:STDOUT: %T.patt => constants.%.3 +// CHECK:STDOUT: specific @I(constants.%ptr) { +// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.patt => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.3 -// CHECK:STDOUT: %T.patt => constants.%.3 +// CHECK:STDOUT: specific @I(@impl.2.%ptr) { +// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.patt => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ptr => constants.%ptr // CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -327,22 +327,22 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%.3)> [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+12, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+12, loaded [template = constants.%I.generic] // CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst+19, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref Main//import_generic, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//import_generic, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic, inst+2, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, inst+29, loaded [symbolic = @impl.1.%I.type (constants.%I.type.2)] @@ -360,10 +360,10 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc11: type = ptr_type %T [symbolic = constants.%.3] -// CHECK:STDOUT: %I.type.loc11: type = facet_type <@I, @I(constants.%.3)> [symbolic = constants.%I.type.3] +// CHECK:STDOUT: %ptr.loc11: type = ptr_type %T [symbolic = constants.%ptr] +// CHECK:STDOUT: %I.type.loc11: type = facet_type <@I, @I(constants.%ptr)> [symbolic = constants.%I.type.3] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: } @@ -395,8 +395,8 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%.1)> [symbolic = %I.type.1 (constants.%I.type.3)] +// CHECK:STDOUT: %ptr.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %ptr.1 (constants.%ptr)] +// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%ptr.1)> [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -433,20 +433,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.3) { -// CHECK:STDOUT: %T => constants.%.3 -// CHECK:STDOUT: %T.patt => constants.%.3 +// CHECK:STDOUT: specific @I(constants.%ptr) { +// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.patt => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.3 -// CHECK:STDOUT: %T.patt => constants.%.3 +// CHECK:STDOUT: specific @I(@impl.2.%ptr.1) { +// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.patt => constants.%ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ptr.1 => constants.%ptr // CHECK:STDOUT: %I.type.1 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 2acdb551da7f2..f8dfe5b3f5051 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -35,11 +35,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %assoc0: %Op.assoc_type = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,47 +52,47 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { -// CHECK:STDOUT: %self.patt: @Op.%.loc5_15.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Op.%.loc5_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @Op.%.loc5_15.1 (%.1) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @Op.%.loc5_15.1 (%.1) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @Op.%.loc5_15.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Op.%.loc5_15.1 (%.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %.loc5_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref.loc5_15, %.loc5_15.2 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_15: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_28.1: type = facet_access_type %Self.ref.loc5_28 [symbolic = %.loc5_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_28: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_37.1: type = facet_access_type %Self.ref.loc5_37 [symbolic = %.loc5_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = %.loc5_15.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @Op.%.loc5_15.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Op.%.loc5_15.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @Op.%.loc5_15.1 (%.1) = value_param runtime_param1 -// CHECK:STDOUT: %other: @Op.%.loc5_15.1 (%.1) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @Op.%.loc5_15.1 (%.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @Op.%.loc5_15.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_37: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param1 +// CHECK:STDOUT: %other: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %Op.assoc_type = assoc_entity element0, %Op.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Op = %.loc5 +// CHECK:STDOUT: .Op = %assoc0 // CHECK:STDOUT: witness = (%Op.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op(@Add.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_15.1: type = facet_access_type %Self [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.%.loc5_15.1 (%.1)](%other.param_patt: @Op.%.loc5_15.1 (%.1)) -> @Op.%.loc5_15.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type)](%other.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type)) -> @Op.%Self.as_type.loc5_15.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc5_15.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon @@ -105,20 +105,20 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %.2: %Add.type = facet_value %empty_tuple.type, %empty_tuple.type [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %empty_tuple.type, %empty_tuple.type [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %assoc0: %Op.assoc_type = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.4 = import_ref Main//a, inst+34, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.3: %Op.assoc_type = import_ref Main//a, inst+34, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Main//a, inst+27, loaded [template = constants.%Op.2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -182,11 +182,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc6_16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %empty_tuple.type](%other.param_patt: %empty_tuple.type) -> %empty_tuple.type { @@ -199,20 +199,20 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.2.%.1 (%.1)](%other.param_patt: @Op.2.%.1 (%.1)) -> @Op.2.%.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self.as_type (%Self.as_type)](%other.param_patt: @Op.2.%Self.as_type (%Self.as_type)) -> @Op.2.%Self.as_type (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%x.param_patt: %empty_tuple.type, %y.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] -// CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, imports.%import_ref.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 +// CHECK:STDOUT: %Op.ref: %Op.assoc_type = name_ref Op, imports.%import_ref.3 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc11_11.2(%x.ref, %y.ref) +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%x.ref, %y.ref) // CHECK:STDOUT: %.loc11_22.1: ref %empty_tuple.type = temporary_storage // CHECK:STDOUT: %.loc11_22.2: ref %empty_tuple.type = temporary %.loc11_22.1, %Op.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] @@ -222,11 +222,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.2(constants.%.2) { -// CHECK:STDOUT: %Self => constants.%.2 -// CHECK:STDOUT: %.1 => constants.%empty_tuple.type +// CHECK:STDOUT: specific @Op.2(constants.%Add.facet) { +// CHECK:STDOUT: %Self => constants.%Add.facet +// CHECK:STDOUT: %Self.as_type => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon index 99db828b5dac9..d37e9afe6bec3 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -45,20 +45,20 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: %I.type = facet_value %C.2, %C.2 [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -66,7 +66,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -78,9 +78,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %T.patt.loc10_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_14.1, runtime_param [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.1 [symbolic = %T.loc10_14.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_14.2 (constants.%T)] @@ -90,31 +90,31 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc7 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(%T.loc10_14.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.6)] +// CHECK:STDOUT: %interface.loc10_34.2: = interface_witness (%F) [symbolic = %interface.loc10_34.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_27.1 as %I.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.6)] +// CHECK:STDOUT: %interface.loc10_34.1: = interface_witness (%F.decl) [symbolic = %interface.loc10_34.2 (constants.%interface)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc10_34.1 +// CHECK:STDOUT: witness = %interface.loc10_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -125,11 +125,11 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,22 +162,22 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_34.2 => constants.%.6 +// CHECK:STDOUT: %interface.loc10_34.2 => constants.%interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.5) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_use_in_fn_decl.carbon @@ -185,41 +185,41 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.1) [template] -// CHECK:STDOUT: %struct: %C.3 = struct_value () [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%empty_struct_type) [template] +// CHECK:STDOUT: %C.val: %C.2 = struct_value () [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.1) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%empty_struct_type) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.8: = specific_function %F.3, @F.2(%.1) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.3, @F.2(%empty_struct_type) [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//import_generic, inst+7, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//import_generic, inst+7, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//import_generic, inst+17, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//import_generic, inst+15, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//import_generic, inst+15, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//import_generic, inst+13, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic, inst+19, unloaded -// CHECK:STDOUT: %import_ref.6: %.4 = import_ref Main//import_generic, inst+25, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %F.assoc_type = import_ref Main//import_generic, inst+25, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.7 = import_ref Main//import_generic, inst+21, unloaded -// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, inst+32, loaded [symbolic = @impl.%C (constants.%C.2)] +// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, inst+32, loaded [symbolic = @impl.%C (constants.%C.1)] // CHECK:STDOUT: %import_ref.10: type = import_ref Main//import_generic, inst+33, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.11: = import_ref Main//import_generic, inst+43, loaded [symbolic = @impl.%.1 (constants.%.6)] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//import_generic, inst+43, loaded [symbolic = @impl.%interface (constants.%interface.1)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,22 +230,22 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_11: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_12: type = converted %.loc6_11, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.1) [template = constants.%C.3] -// CHECK:STDOUT: %c.var: ref %C.3 = var c -// CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] +// CHECK:STDOUT: %.loc6_11: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_12: type = converted %.loc6_11, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [template = constants.%C.2] +// CHECK:STDOUT: %c.var: ref %C.2 = var c +// CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.3 [template = constants.%F.4] { // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %c.ref: ref %C.3 = name_ref c, file.%c +// CHECK:STDOUT: %c.ref: ref %C.2 = name_ref c, file.%c // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_12.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc15_12.2: = specific_function %.loc15_12.1, @F.2(constants.%.1) [template = constants.%.8] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_12.2() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, imports.%import_ref.6 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [template = constants.%F.specific_fn] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: %.loc15_19.1: ref %empty_tuple.type = temporary_storage // CHECK:STDOUT: %.loc15_19.2: ref %empty_tuple.type = temporary %.loc15_19.1, %F.call // CHECK:STDOUT: %.loc15_19.3: type = converted %F.call, [template = ] @@ -264,12 +264,12 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: generic impl @impl(constants.%T: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.1: = interface_witness (%F) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%F) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.9 as imports.%import_ref.10 { // CHECK:STDOUT: !members: @@ -307,9 +307,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_17.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_17.2: init %C.3 = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_18: init %C.3 = converted %.loc6_17.1, %.loc6_17.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_17.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_17.2: init %C.2 = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_18: init %C.2 = converted %.loc6_17.1, %.loc6_17.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_18 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -319,9 +319,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.1) { -// CHECK:STDOUT: %T => constants.%.1 -// CHECK:STDOUT: %T.patt => constants.%.1 +// CHECK:STDOUT: specific @C(constants.%empty_struct_type) { +// CHECK:STDOUT: %T => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -336,34 +336,34 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C => constants.%C.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %interface => constants.%interface.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C => constants.%C.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.1) { -// CHECK:STDOUT: %T => constants.%.1 -// CHECK:STDOUT: %T.patt => constants.%.1 -// CHECK:STDOUT: %C => constants.%C.3 +// CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { +// CHECK:STDOUT: %T => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt => constants.%empty_struct_type +// CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %interface => constants.%interface.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.1) { +// CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 6cd679511d2dc..a50656265855b 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -85,16 +85,16 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] +// CHECK:STDOUT: %Action.generic: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %Action.type.2: type = facet_type <@Action, @Action(%T)> [symbolic] // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Action.%Op.decl [symbolic] +// CHECK:STDOUT: %Op.assoc_type.1: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Op.assoc_type.1 = assoc_entity element0, @Action.%Op.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Action.type.3: type = facet_type <@Action, @Action(%B)> [template] @@ -102,10 +102,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Action.%Op.decl [template] -// CHECK:STDOUT: %.7: %Action.type.2 = facet_value %A, %A [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %Op.assoc_type.2: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %Op.assoc_type.2 = assoc_entity element0, @Action.%Op.decl [template] +// CHECK:STDOUT: %Action.facet: %Action.type.2 = facet_value %A, %A [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -118,7 +118,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Action.decl: %Action.type.1 = interface_decl @Action [template = constants.%Action] { +// CHECK:STDOUT: %Action.decl: %Action.type.1 = interface_decl @Action [template = constants.%Action.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_18.1, runtime_param [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -130,7 +130,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [template = constants.%Action.type.3] // CHECK:STDOUT: } @@ -153,52 +153,52 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T.loc4_18.2) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.loc5_10.2: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.loc5_10.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_10.3: @Action.%.loc5_10.2 (%.1) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.2)] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %Op.assoc_type (constants.%Op.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_10.2: @Action.%Op.assoc_type (%Op.assoc_type.1) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc5_10.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.decl: @Action.%Op.type (%Op.type.1) = fn_decl @Op.1 [symbolic = @Action.%Op (constants.%Op.1)] {} {} -// CHECK:STDOUT: %.loc5_10.1: @Action.%.loc5_10.2 (%.1) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_10.1: @Action.%Op.assoc_type (%Op.assoc_type.1) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc5_10.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Op = %.loc5_10.1 +// CHECK:STDOUT: .Op = %assoc0.loc5_10.1 // CHECK:STDOUT: witness = (%Op.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %A.ref as %Action.type { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} {} -// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc12 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(@Action.%T.loc4_18.1: type, @Action.%Self.1: @Action.%Action.type (%Action.type.2)) { @@ -214,13 +214,13 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @F(%a.param_patt: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [template = constants.%Action.type.3] -// CHECK:STDOUT: %.loc16_26: %.5 = specific_constant @Action.%.loc5_10.1, @Action(constants.%B) [template = constants.%.6] -// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, %.loc16_26 [template = constants.%.6] -// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc16_15() +// CHECK:STDOUT: %.loc16: %Op.assoc_type.2 = specific_constant @Action.%assoc0.loc5_10.1, @Action(constants.%B) [template = constants.%assoc0.2] +// CHECK:STDOUT: %Op.ref: %Op.assoc_type.2 = name_ref Op, %.loc16 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %Op.type.3 = interface_witness_access constants.%interface, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,21 +245,21 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.loc5_10.2 => constants.%.5 -// CHECK:STDOUT: %.loc5_10.3 => constants.%.6 +// CHECK:STDOUT: %Op.assoc_type => constants.%Op.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_10.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%B, constants.%.7) {} +// CHECK:STDOUT: specific @Op.1(constants.%B, constants.%Action.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- action.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] +// CHECK:STDOUT: %Action.generic: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Action.type.2: type = facet_type <@Action, @Action(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -269,36 +269,36 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %Op.assoc_type.1: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Op.assoc_type.1 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Op.assoc_type.2: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Op.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: %.3 = assoc_entity element0, imports.%import_ref.19 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Op.assoc_type.1 = assoc_entity element0, imports.%import_ref.19 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+7, loaded [template = constants.%Action] +// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+7, loaded [template = constants.%Action.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//action, inst+33, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//action, inst+36, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+61, unloaded -// CHECK:STDOUT: %import_ref.6: = import_ref Main//action, inst+35, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//action, inst+35, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//action, inst+14, unloaded -// CHECK:STDOUT: %import_ref.9: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.9: @Action.%Op.assoc_type (%Op.assoc_type.1) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+16, unloaded -// CHECK:STDOUT: %import_ref.11: = import_ref Main//action, inst+31, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//action, inst+31, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.12 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.13: type = import_ref Main//action, inst+39, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.14: type = import_ref Main//action, inst+42, loaded [template = constants.%Action.type.3] -// CHECK:STDOUT: %import_ref.15: = import_ref Main//action, inst+53, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.15: = import_ref Main//action, inst+53, loaded [template = constants.%interface] // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+45, unloaded // CHECK:STDOUT: %import_ref.17 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: } @@ -333,8 +333,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @Action.%.1 (%.3) = assoc_entity element0, imports.%import_ref.17 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %Op.assoc_type (constants.%Op.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @Action.%Op.assoc_type (%Op.assoc_type.1) = assoc_entity element0, imports.%import_ref.17 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -370,13 +370,13 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @G(%a.param_patt: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [template = constants.%Action.type.3] -// CHECK:STDOUT: %.loc4_26: %.5 = specific_constant imports.%import_ref.9, @Action(constants.%B) [template = constants.%.6] -// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, %.loc4_26 [template = constants.%.6] -// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc4_15() +// CHECK:STDOUT: %.loc4: %Op.assoc_type.2 = specific_constant imports.%import_ref.9, @Action(constants.%B) [template = constants.%assoc0.2] +// CHECK:STDOUT: %Op.ref: %Op.assoc_type.2 = name_ref Op, %.loc4 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -396,8 +396,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %Op.assoc_type => constants.%Op.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(%T) { @@ -411,10 +411,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] -// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] +// CHECK:STDOUT: %Action.generic: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Action.type.2: type = facet_type <@Action, @Action(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -424,42 +424,42 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %Op.assoc_type.1: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Op.assoc_type.1 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Op.assoc_type.2: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Op.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Action.type.4: type = facet_type <@Action, @Action(%C)> [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op, @Action(%C) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Action.type.4, %Op.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.17 [template] -// CHECK:STDOUT: %.10: %.3 = assoc_entity element0, imports.%import_ref.21 [symbolic] +// CHECK:STDOUT: %Op.assoc_type.3: type = assoc_entity_type %Action.type.4, %Op.type.3 [template] +// CHECK:STDOUT: %assoc0.3: %Op.assoc_type.3 = assoc_entity element0, imports.%import_ref.17 [template] +// CHECK:STDOUT: %assoc0.4: %Op.assoc_type.1 = assoc_entity element0, imports.%import_ref.21 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+7, loaded [template = constants.%Action] +// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+7, loaded [template = constants.%Action.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//action, inst+33, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//action, inst+36, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+61, unloaded -// CHECK:STDOUT: %import_ref.6: = import_ref Main//action, inst+35, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//action, inst+35, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//action, inst+14, unloaded -// CHECK:STDOUT: %import_ref.9: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.9: @Action.%Op.assoc_type (%Op.assoc_type.1) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.4)] // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+16, unloaded -// CHECK:STDOUT: %import_ref.11: = import_ref Main//action, inst+31, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//action, inst+31, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.12 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.13: type = import_ref Main//action, inst+39, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.14: type = import_ref Main//action, inst+42, loaded [template = constants.%Action.type.3] // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+53, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+45, unloaded // CHECK:STDOUT: %import_ref.17 = import_ref Main//action, inst+16, unloaded -// CHECK:STDOUT: %import_ref.19: = import_ref Main//action, inst+38, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.19: = import_ref Main//action, inst+38, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.20 = import_ref Main//action, inst+37, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,8 +493,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @Action.%.1 (%.3) = assoc_entity element0, imports.%import_ref.17 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %Op.assoc_type (constants.%Op.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @Action.%Op.assoc_type (%Op.assoc_type.1) = assoc_entity element0, imports.%import_ref.17 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -536,11 +536,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @G(%a.param_patt: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%C)> [template = constants.%Action.type.4] -// CHECK:STDOUT: %.loc8: %.8 = specific_constant imports.%import_ref.9, @Action(constants.%C) [template = constants.%.9] -// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, %.loc8 [template = constants.%.9] +// CHECK:STDOUT: %.loc8: %Op.assoc_type.3 = specific_constant imports.%import_ref.9, @Action(constants.%C) [template = constants.%assoc0.3] +// CHECK:STDOUT: %Op.ref: %Op.assoc_type.3 = name_ref Op, %.loc8 [template = constants.%assoc0.3] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -558,8 +558,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %Op.assoc_type => constants.%Op.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(%T) { @@ -578,8 +578,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Op.assoc_type => constants.%Op.assoc_type.3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- factory.carbon @@ -588,26 +588,26 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] +// CHECK:STDOUT: %Factory.generic: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %Factory.type.2: type = facet_type <@Factory, @Factory(%T)> [symbolic] // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Factory.%Make.decl [symbolic] +// CHECK:STDOUT: %Make.assoc_type.1: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Make.assoc_type.1 = assoc_entity element0, @Factory.%Make.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %Factory.type.3: type = facet_type <@Factory, @Factory(%B)> [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Factory.%Make.decl [template] -// CHECK:STDOUT: %.7: %Factory.type.2 = facet_value %A, %A [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %Make.assoc_type.2: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %Make.assoc_type.2 = assoc_entity element0, @Factory.%Make.decl [template] +// CHECK:STDOUT: %Factory.facet: %Factory.type.2 = facet_value %A, %A [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%Make.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -616,7 +616,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Factory.decl: %Factory.type.1 = interface_decl @Factory [template = constants.%Factory] { +// CHECK:STDOUT: %Factory.decl: %Factory.type.1 = interface_decl @Factory [template = constants.%Factory.generic] { // CHECK:STDOUT: %T.patt.loc4_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_19.1, runtime_param [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -627,7 +627,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, file.%Factory.decl [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, file.%Factory.decl [template = constants.%Factory.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [template = constants.%Factory.type.3] // CHECK:STDOUT: } @@ -642,8 +642,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T.loc4_19.2) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc5_17.2: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.loc5_17.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_17.3: @Factory.%.loc5_17.2 (%.1) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.2)] +// CHECK:STDOUT: %Make.assoc_type: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %Make.assoc_type (constants.%Make.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc5_17.2: @Factory.%Make.assoc_type (%Make.assoc_type.1) = assoc_entity element0, %Make.decl [symbolic = %assoc0.loc5_17.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -655,11 +655,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.param: ref @Make.1.%T (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_17.1: @Factory.%.loc5_17.2 (%.1) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_17.1: @Factory.%Make.assoc_type (%Make.assoc_type.1) = assoc_entity element0, %Make.decl [symbolic = %assoc0.loc5_17.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Make = %.loc5_17.1 +// CHECK:STDOUT: .Make = %assoc0.loc5_17.1 // CHECK:STDOUT: witness = (%Make.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -673,27 +673,27 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.param: ref %B = out_param runtime_param0 // CHECK:STDOUT: %return: ref %B = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%Make.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = %.loc11 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make.1(@Factory.%T.loc4_19.1: type, @Factory.%Self.1: @Factory.%Factory.type (%Factory.type.2)) { @@ -727,11 +727,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.loc5_17.2 => constants.%.5 -// CHECK:STDOUT: %.loc5_17.3 => constants.%.6 +// CHECK:STDOUT: %Make.assoc_type => constants.%Make.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc5_17.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make.1(constants.%B, constants.%.7) { +// CHECK:STDOUT: specific @Make.1(constants.%B, constants.%Factory.facet) { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: @@ -739,10 +739,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] +// CHECK:STDOUT: %Factory.generic: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.2: type = facet_type <@Factory, @Factory(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -752,34 +752,34 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %Make.assoc_type.1: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Make.assoc_type.1 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %Make.assoc_type.2: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Make.assoc_type.2 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [template] // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [template] -// CHECK:STDOUT: %.8: %.3 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Make.assoc_type.1 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%Make.3) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Make.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+7, loaded [template = constants.%Factory] +// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+7, loaded [template = constants.%Factory.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+34, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//factory, inst+39, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//factory, inst+41, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//factory, inst+41, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+40, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.7: @Factory.%.1 (%.3) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.7: @Factory.%Make.assoc_type (%Make.assoc_type.1) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+21, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref Main//factory, inst+37, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.9: = import_ref Main//factory, inst+37, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.10 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//factory, inst+45, loaded [template = constants.%Factory.type.3] -// CHECK:STDOUT: %import_ref.13: = import_ref Main//factory, inst+61, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//factory, inst+61, loaded [template = constants.%interface] // CHECK:STDOUT: %import_ref.14 = import_ref Main//factory, inst+53, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: } @@ -817,8 +817,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @Factory.%.1 (%.3) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %Make.assoc_type: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %Make.assoc_type (constants.%Make.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @Factory.%Make.assoc_type (%Make.assoc_type.1) = assoc_entity element0, imports.%import_ref.15 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -855,14 +855,14 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @MakeB(%a.param_patt: %A) -> %return: %B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory.generic] // CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [template = constants.%Factory.type.3] -// CHECK:STDOUT: %.loc5_23: %.5 = specific_constant imports.%import_ref.7, @Factory(constants.%B) [template = constants.%.6] -// CHECK:STDOUT: %Make.ref: %.5 = name_ref Make, %.loc5_23 [template = constants.%.6] -// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%Make.3] +// CHECK:STDOUT: %.loc5: %Make.assoc_type.2 = specific_constant imports.%import_ref.7, @Factory(constants.%B) [template = constants.%assoc0.2] +// CHECK:STDOUT: %Make.ref: %Make.assoc_type.2 = name_ref Make, %.loc5 [template = constants.%assoc0.2] +// CHECK:STDOUT: %impl.elem0: %Make.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Make.3] // CHECK:STDOUT: %.loc4_16.2: ref %B = splice_block %return {} -// CHECK:STDOUT: %Make.call: init %B = call %.loc5_11() to %.loc4_16.2 +// CHECK:STDOUT: %Make.call: init %B = call %impl.elem0() to %.loc4_16.2 // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -882,8 +882,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %Make.assoc_type => constants.%Make.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(%T) { @@ -899,10 +899,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] +// CHECK:STDOUT: %Factory.generic: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.2: type = facet_type <@Factory, @Factory(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -912,33 +912,33 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %Make.assoc_type.1: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Make.assoc_type.1 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %Make.assoc_type.2: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Make.assoc_type.2 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %Factory.type.4: type = facet_type <@Factory, @Factory(%C)> [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Factory(%C) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.15 [template] -// CHECK:STDOUT: %.10: %.3 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %Make.assoc_type.3: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template] +// CHECK:STDOUT: %assoc0.3: %Make.assoc_type.3 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %assoc0.4: %Make.assoc_type.1 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+7, loaded [template = constants.%Factory] +// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+7, loaded [template = constants.%Factory.generic] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+34, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//factory, inst+39, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref Main//factory, inst+41, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//factory, inst+41, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+40, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.7: @Factory.%.1 (%.3) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.7: @Factory.%Make.assoc_type (%Make.assoc_type.1) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.4)] // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+21, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref Main//factory, inst+37, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.9: = import_ref Main//factory, inst+37, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.10 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//factory, inst+45, loaded [template = constants.%Factory.type.3] @@ -982,8 +982,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @Factory.%.1 (%.3) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %Make.assoc_type: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %Make.assoc_type (constants.%Make.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @Factory.%Make.assoc_type (%Make.assoc_type.1) = assoc_entity element0, imports.%import_ref.15 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1012,11 +1012,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make(constants.%T: type, constants.%Self.1: @Factory.%Factory.type (%Factory.type.2)) { @@ -1028,11 +1028,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @MakeC(%a.param_patt: %A) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory.generic] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [template = constants.%Factory.type.4] -// CHECK:STDOUT: %.loc10: %.8 = specific_constant imports.%import_ref.7, @Factory(constants.%C) [template = constants.%.9] -// CHECK:STDOUT: %Make.ref: %.8 = name_ref Make, %.loc10 [template = constants.%.9] +// CHECK:STDOUT: %.loc10: %Make.assoc_type.3 = specific_constant imports.%import_ref.7, @Factory(constants.%C) [template = constants.%assoc0.3] +// CHECK:STDOUT: %Make.ref: %Make.assoc_type.3 = name_ref Make, %.loc10 [template = constants.%assoc0.3] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1050,8 +1050,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %Make.assoc_type => constants.%Make.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(%T) { @@ -1072,7 +1072,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Make.assoc_type => constants.%Make.assoc_type.3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon index 7bd66b0f5e33e..f672ddb01c67b 100644 --- a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon @@ -114,7 +114,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: = interface_witness () [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -149,10 +149,10 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%import_ref.3 as imports.%import_ref.4 { -// CHECK:STDOUT: %.loc6_14: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc6_14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- use_decl_in_api.carbon 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 3d124caa7e656..746adeb5dbdb7 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -27,20 +27,20 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DefaultConstructible.type: type = facet_type <@DefaultConstructible> [template] // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %Make.assoc_type: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] +// CHECK:STDOUT: %assoc0: %Make.assoc_type = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_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: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: %DefaultConstructible.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.7: = interface_witness (%Make.2) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %DefaultConstructible.facet: %DefaultConstructible.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,20 +57,20 @@ class A { // CHECK:STDOUT: interface @DefaultConstructible { // CHECK:STDOUT: %Self: %DefaultConstructible.type = 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: %return.patt: @Make.1.%.loc12_16.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Make.1.%.loc12_16.1 (%.1) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Make.1.%Self.as_type.loc12_16.1 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Make.1.%Self.as_type.loc12_16.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_16.2: type = facet_access_type %Self.ref [symbolic = %.loc12_16.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_16.3: type = converted %Self.ref, %.loc12_16.2 [symbolic = %.loc12_16.1 (constants.%.1)] -// CHECK:STDOUT: %return.param: ref @Make.1.%.loc12_16.1 (%.1) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @Make.1.%.loc12_16.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc12_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc12: type = converted %Self.ref, %Self.as_type.loc12_16.2 [symbolic = %Self.as_type.loc12_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %return.param: ref @Make.1.%Self.as_type.loc12_16.1 (%Self.as_type) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @Make.1.%Self.as_type.loc12_16.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %Make.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %Make.assoc_type = assoc_entity element0, %Make.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Make = %.loc12 +// CHECK:STDOUT: .Make = %assoc0 // CHECK:STDOUT: witness = (%Make.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -83,19 +83,19 @@ class A { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%Make.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -103,35 +103,35 @@ class A { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [template = constants.%DefaultConstructible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make.1(@DefaultConstructible.%Self: %DefaultConstructible.type) { // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_16.1: type = facet_access_type %Self [symbolic = %.loc12_16.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_16.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Make.1.%.loc12_16.1 (%.1); +// CHECK:STDOUT: fn() -> @Make.1.%Self.as_type.loc12_16.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make.2() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_33.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc21_34: init %C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc21_33.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc21_34: init %C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc21_34 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc12_16.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc12_16.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make.1(constants.%.6) { -// CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %.loc12_16.1 => constants.%C +// CHECK:STDOUT: specific @Make.1(constants.%DefaultConstructible.facet) { +// CHECK:STDOUT: %Self => constants.%DefaultConstructible.facet +// CHECK:STDOUT: %Self.as_type.loc12_16.1 => constants.%C // 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 1151d69497b8d..ef553cc74d24e 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -41,51 +41,51 @@ impl D as SelfNested { // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseSelf.type: type = facet_type <@UseSelf> [template] // CHECK:STDOUT: %Self.1: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_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: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: %UseSelf.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %struct.1: %C = struct_value () [template] +// CHECK:STDOUT: %UseSelf.facet.1: %UseSelf.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: %UseSelf.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.10: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %struct.2: %D = struct_value () [template] +// CHECK:STDOUT: %UseSelf.facet.2: %UseSelf.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %D.val: %D = struct_value () [template] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [template] // CHECK:STDOUT: %Self.2: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.12: type = ptr_type %.11 [symbolic] -// CHECK:STDOUT: %.13: type = struct_type {.x: %.11, .y: %empty_tuple.type} [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %ptr.2: type = ptr_type %Self.as_type.2 [symbolic] +// CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %Self.as_type.2, .y: %empty_tuple.type} [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.12, %.13) [symbolic] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%ptr.2, %struct_type.x.y.1) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %SelfNested.type, %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: %empty_tuple.type} [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.16, %.17) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %C [template] +// CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: %C, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%ptr.3, %struct_type.x.y.2) [template] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.18: %SelfNested.type = facet_value %C, %C [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: %empty_tuple.type} [template] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.20, %.21) [template] +// CHECK:STDOUT: %SelfNested.facet.1: %SelfNested.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface.3: = interface_witness (%F.5) [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type %D [template] +// CHECK:STDOUT: %struct_type.x.y.3: type = struct_type {.x: %D, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%ptr.4, %struct_type.x.y.3) [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.22: %SelfNested.type = facet_value %D, %D [template] -// CHECK:STDOUT: %.23: = interface_witness (%F.6) [template] +// CHECK:STDOUT: %SelfNested.facet.2: %SelfNested.type = facet_value %D, %D [template] +// CHECK:STDOUT: %interface.4: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,34 +120,34 @@ impl D as SelfNested { // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %x.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %x.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @F.1.%.loc12_14.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %x.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_23.1: type = facet_access_type %Self.ref.loc12_23 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_23: type = facet_access_type %Self.ref.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_23: type = converted %Self.ref.loc12_23, %Self.as_type.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_32.1: type = facet_access_type %Self.ref.loc12_32 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%.loc12_14.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %x.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param1 -// CHECK:STDOUT: %x: @F.1.%.loc12_14.1 (%.1) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.1.%.loc12_14.1 (%.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @F.1.%.loc12_14.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc12_32: type = facet_access_type %Self.ref.loc12_32 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_32: type = converted %Self.ref.loc12_32, %Self.as_type.loc12_32 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param +// CHECK:STDOUT: %x.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %x: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type.1 = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -158,25 +158,25 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: @F.4.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.3: type = facet_access_type %Self.ref.loc28_12 [symbolic = %.loc28_16.1 (constants.%.11)] -// CHECK:STDOUT: %.loc28_16.4: type = converted %Self.ref.loc28_12, %.loc28_16.3 [symbolic = %.loc28_16.1 (constants.%.11)] -// CHECK:STDOUT: %.loc28_16.5: type = ptr_type %.11 [symbolic = %.loc28_16.2 (constants.%.12)] +// CHECK:STDOUT: %Self.as_type.loc28_16.2: type = facet_access_type %Self.ref.loc28_12 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc28_16: type = converted %Self.ref.loc28_12, %Self.as_type.loc28_16.2 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %ptr.loc28_16.2: type = ptr_type %Self.as_type.2 [symbolic = %ptr.loc28_16.1 (constants.%ptr.2)] // CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_24.1: type = facet_access_type %Self.ref.loc28_24 [symbolic = %.loc28_16.1 (constants.%.11)] -// CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = %.loc28_16.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type.loc28_24: type = facet_access_type %Self.ref.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc28_24: type = converted %Self.ref.loc28_24, %Self.as_type.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] // CHECK:STDOUT: %.loc28_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc28_36.2: type = struct_type {.x: %.11, .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.13)] -// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%.loc28_16.5, %.loc28_36.2) +// CHECK:STDOUT: %struct_type.x.y.loc28_36.2: type = struct_type {.x: %Self.as_type.2, .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc28_36.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%ptr.loc28_16.2, %struct_type.x.y.loc28_36.2) // CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %x.param: @F.4.%tuple.type (%tuple.type.2) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.4.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] +// CHECK:STDOUT: %assoc0: %F.assoc_type.2 = assoc_entity element0, %F.decl [template = constants.%assoc0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc28 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,11 +199,11 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc19 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D.ref as %UseSelf.ref { @@ -225,11 +225,11 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param2 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc23 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %C.ref as %SelfNested.ref { @@ -238,21 +238,21 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.16] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.3] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc32_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%.17] -// CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%.loc32_13, %.loc32_30) +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.2] +// CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.19] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc31 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %D.ref as %SelfNested.ref { @@ -261,68 +261,68 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %tuple.type.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.20] +// CHECK:STDOUT: %ptr: type = ptr_type %D [template = constants.%ptr.4] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] // CHECK:STDOUT: %.loc36_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%.21] -// CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%.loc36_16, %.loc36_36) +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.3] +// CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.param: %tuple.type.4 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.4 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.23] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc35 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc12_14.1 (%.1)](%x.param_patt: @F.1.%.loc12_14.1 (%.1)) -> @F.1.%.loc12_14.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1)](%x.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1)) -> @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %C](%x.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_38.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), %return [template = constants.%struct.1] -// CHECK:STDOUT: %.loc20_39: init %C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc20_38.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc20_39: init %C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc20_39 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3[%self.param_patt: %D](%x.param_patt: %D) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_47.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), %return [template = constants.%struct.2] -// CHECK:STDOUT: %.loc24_48: init %D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc24_47.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), %return [template = constants.%D.val] +// CHECK:STDOUT: %.loc24_48: init %D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%D.val] // CHECK:STDOUT: return %.loc24_48 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.1: type = facet_access_type %Self [symbolic = %.loc28_16.1 (constants.%.11)] -// CHECK:STDOUT: %.loc28_16.2: type = ptr_type @F.4.%.loc28_16.1 (%.11) [symbolic = %.loc28_16.2 (constants.%.12)] -// CHECK:STDOUT: %.loc28_36.1: type = struct_type {.x: @F.4.%.loc28_16.1 (%.11), .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.13)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.4.%.loc28_16.2 (%.12), @F.4.%.loc28_36.1 (%.13)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %Self.as_type.loc28_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %ptr.loc28_16.1: type = ptr_type @F.4.%Self.as_type.loc28_16.1 (%Self.as_type.2) [symbolic = %ptr.loc28_16.1 (constants.%ptr.2)] +// CHECK:STDOUT: %struct_type.x.y.loc28_36.1: type = struct_type {.x: @F.4.%Self.as_type.loc28_16.1 (%Self.as_type.2), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc28_36.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.4.%ptr.loc28_16.1 (%ptr.2), @F.4.%struct_type.x.y.loc28_36.1 (%struct_type.x.y.1)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param_patt: @F.4.%tuple.type (%tuple.type.2)); // CHECK:STDOUT: } @@ -333,40 +333,40 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.6) { -// CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %.loc12_14.1 => constants.%C +// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.1) { +// CHECK:STDOUT: %Self => constants.%UseSelf.facet.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.9) { -// CHECK:STDOUT: %Self => constants.%.9 -// CHECK:STDOUT: %.loc12_14.1 => constants.%D +// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.2) { +// CHECK:STDOUT: %Self => constants.%UseSelf.facet.2 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.loc28_16.1 => constants.%.11 -// CHECK:STDOUT: %.loc28_16.2 => constants.%.12 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.13 +// CHECK:STDOUT: %Self.as_type.loc28_16.1 => constants.%Self.as_type.2 +// CHECK:STDOUT: %ptr.loc28_16.1 => constants.%ptr.2 +// CHECK:STDOUT: %struct_type.x.y.loc28_36.1 => constants.%struct_type.x.y.1 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%.18) { -// CHECK:STDOUT: %Self => constants.%.18 -// CHECK:STDOUT: %.loc28_16.1 => constants.%C -// CHECK:STDOUT: %.loc28_16.2 => constants.%.16 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.17 +// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.1) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.1 +// CHECK:STDOUT: %Self.as_type.loc28_16.1 => constants.%C +// CHECK:STDOUT: %ptr.loc28_16.1 => constants.%ptr.3 +// CHECK:STDOUT: %struct_type.x.y.loc28_36.1 => constants.%struct_type.x.y.2 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%.22) { -// CHECK:STDOUT: %Self => constants.%.22 -// CHECK:STDOUT: %.loc28_16.1 => constants.%D -// CHECK:STDOUT: %.loc28_16.2 => constants.%.20 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.21 +// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.2) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.2 +// CHECK:STDOUT: %Self.as_type.loc28_16.1 => constants.%D +// CHECK:STDOUT: %ptr.loc28_16.1 => constants.%ptr.4 +// CHECK:STDOUT: %struct_type.x.y.loc28_36.1 => constants.%struct_type.x.y.3 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index fed0e3c593fa2..aef05939bd1e5 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -23,14 +23,14 @@ impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,18 +50,18 @@ impl i32 as I {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc13_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.3: type = converted %int.make_type_signed.loc13, %.loc13_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed.loc13, %.loc13_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.2 [template] {} { -// CHECK:STDOUT: %.loc19_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.3: type = converted %int.make_type_signed, %.loc19_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -74,27 +74,27 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc13_6.3 as %I.ref.loc13; +// CHECK:STDOUT: impl @impl.1: %.loc13_6.2 as %I.ref.loc13; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %.loc19_6.3 as %I.ref { -// CHECK:STDOUT: %.loc19_15: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: impl @impl.2: %.loc19_6.2 as %I.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc19_15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc16_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.3: type = converted %int.make_type_signed.loc16, %.loc16_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc17 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 19bc89f960358..9f6f29da36eff 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -16,34 +16,34 @@ var d: i32 = a[b]; // CHECK:STDOUT: --- array_element_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 24 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_24.1: Core.IntLiteral = int_value 24 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 24 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.38) [template] -// CHECK:STDOUT: %.39: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.42: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_24.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_24.2: %i32 = int_value 24 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2, %int_24.2) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,90 +64,90 @@ var d: i32 = a[b]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc13_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.3: type = converted %int.make_type_signed.loc13, %.loc13_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %.loc14_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.3: type = converted %int.make_type_signed.loc14, %.loc14_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 24 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_26.7: ref %i32 = array_index file.%a.var, %.loc11_26.6 -// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_26.14: ref %i32 = array_index file.%a.var, %.loc11_26.13 -// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_26.16: init %.3 = array_init (%.loc11_26.8, %.loc11_26.15) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.16 [template = constants.%array] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [template = constants.%int_24.1] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_12, %int_24) +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_12, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_12, %int.convert_checked.loc11_26.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%a.var, %int_0.loc11 +// CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_24) [template = constants.%int_24.2] +// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %int_24, %int.convert_checked.loc11_26.2 [template = constants.%int_24.2] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_26.6: ref %i32 = array_index file.%a.var, %int_1.loc11 +// CHECK:STDOUT: %.loc11_26.7: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.6 [template = constants.%int_24.2] +// CHECK:STDOUT: %.loc11_26.8: init %array_type = array_init (%.loc11_26.4, %.loc11_26.7) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_27: init %array_type = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.41] -// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.41] -// CHECK:STDOUT: assign file.%b.var, %.loc12_15.4 -// CHECK:STDOUT: %a.ref.loc13: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.3: type = converted %int.make_type_signed.loc13, %.loc13_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.44] -// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc13_17.4: ref %i32 = array_index %a.ref.loc13, %.loc13_16.6 -// CHECK:STDOUT: %.loc13_17.5: %i32 = bind_value %.loc13_17.4 -// CHECK:STDOUT: assign file.%c.var, %.loc13_17.5 -// CHECK:STDOUT: %a.ref.loc14: ref %.3 = name_ref a, file.%a +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12 [template = constants.%int_1.2] +// CHECK:STDOUT: assign file.%b.var, %.loc12 +// CHECK:STDOUT: %a.ref.loc13: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed.loc13, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_16.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_16.2: %i32 = converted %int_0.loc13, %.loc13_16.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_17.3: ref %i32 = array_index %a.ref.loc13, %.loc13_16.2 +// CHECK:STDOUT: %.loc13_17.4: %i32 = bind_value %.loc13_17.3 +// CHECK:STDOUT: assign file.%c.var, %.loc13_17.4 +// CHECK:STDOUT: %a.ref.loc14: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b -// CHECK:STDOUT: %.loc14_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_signed.loc14, %.loc14_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_signed.loc14, %.loc14_17.1 [template = constants.%i32] // CHECK:STDOUT: %.loc14_16: %i32 = bind_value %b.ref -// CHECK:STDOUT: %.loc14_17.4: ref %i32 = array_index %a.ref.loc14, %.loc14_16 -// CHECK:STDOUT: %.loc14_17.5: %i32 = bind_value %.loc14_17.4 -// CHECK:STDOUT: assign file.%d.var, %.loc14_17.5 +// CHECK:STDOUT: %.loc14_17.3: ref %i32 = array_index %a.ref.loc14, %.loc14_16 +// CHECK:STDOUT: %.loc14_17.4: %i32 = bind_value %.loc14_17.3 +// CHECK:STDOUT: assign file.%d.var, %.loc14_17.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index a6f6a3f247462..655f932d31f40 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -31,42 +31,42 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: --- expr_category.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] -// CHECK:STDOUT: %.41: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.42: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 4 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [template] // CHECK:STDOUT: } @@ -89,220 +89,220 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %array_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.3: type = converted %int.make_type_signed, %.loc11_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, %i32 [template = constants.%.3] -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed, %.loc11_12.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %array_type = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, %i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc13: type = array_type %int_3.loc13, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [template = constants.%ValueBinding] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %array_type = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_26: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_21.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.3: type = converted %int.make_type_signed.loc21, %.loc21_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27: type = array_type %.loc21_26, %i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_signed.loc21, %.loc21_21.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc21: type = array_type %int_3.loc21, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.3; +// CHECK:STDOUT: fn @F() -> %array_type; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed.loc14, %.loc14_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_28: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) -// CHECK:STDOUT: %.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.3: = bound_method %.loc14_22, %.loc14_29.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_29.4: = specific_function %.loc14_29.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %.loc14_29.4(%.loc14_22) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_29.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_29.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc14_29.7: ref %i32 = array_index %a.var, %.loc14_29.6 -// CHECK:STDOUT: %.loc14_29.8: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.10: = bound_method %.loc14_25, %.loc14_29.9 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_29.11: = specific_function %.loc14_29.10, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %.loc14_29.11(%.loc14_25) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_29.12: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_29.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_29.14: ref %i32 = array_index %a.var, %.loc14_29.13 -// CHECK:STDOUT: %.loc14_29.15: init %i32 = initialize_from %.loc14_29.12 to %.loc14_29.14 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.17: = bound_method %.loc14_28, %.loc14_29.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_29.18: = specific_function %.loc14_29.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %.loc14_29.18(%.loc14_28) [template = constants.%.40] -// CHECK:STDOUT: %.loc14_29.19: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_29.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_29.21: ref %i32 = array_index %a.var, %.loc14_29.20 -// CHECK:STDOUT: %.loc14_29.22: init %i32 = initialize_from %.loc14_29.19 to %.loc14_29.21 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_29.23: init %.3 = array_init (%.loc14_29.8, %.loc14_29.15, %.loc14_29.22) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc14_30: init %.3 = converted %.loc14_29.1, %.loc14_29.23 [template = constants.%array] +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed.loc14, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc14: type = array_type %int_3.loc14_16, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_1.loc14_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc14_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%int_1.loc14_22, %int_2.loc14_25, %int_3.loc14_28) +// CHECK:STDOUT: %impl.elem0.loc14_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_29.1: = bound_method %int_1.loc14_22, %impl.elem0.loc14_29.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_29.1: = specific_function %Convert.bound.loc14_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %Convert.specific_fn.loc14_29.1(%int_1.loc14_22) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_29.2: init %i32 = converted %int_1.loc14_22, %int.convert_checked.loc14_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc14_29.3: ref %i32 = array_index %a.var, %int_0.loc14 +// CHECK:STDOUT: %.loc14_29.4: init %i32 = initialize_from %.loc14_29.2 to %.loc14_29.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_29.2: = bound_method %int_2.loc14_25, %impl.elem0.loc14_29.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_29.2: = specific_function %Convert.bound.loc14_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %Convert.specific_fn.loc14_29.2(%int_2.loc14_25) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_29.5: init %i32 = converted %int_2.loc14_25, %int.convert_checked.loc14_29.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc14_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc14_29.6: ref %i32 = array_index %a.var, %int_1.loc14_29 +// CHECK:STDOUT: %.loc14_29.7: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc14_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_29.3: = bound_method %int_3.loc14_28, %impl.elem0.loc14_29.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc14_29.3: = specific_function %Convert.bound.loc14_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %Convert.specific_fn.loc14_29.3(%int_3.loc14_28) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_29.8: init %i32 = converted %int_3.loc14_28, %int.convert_checked.loc14_29.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc14_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc14_29.9: ref %i32 = array_index %a.var, %int_2.loc14_29 +// CHECK:STDOUT: %.loc14_29.10: init %i32 = initialize_from %.loc14_29.8 to %.loc14_29.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_29.11: init %array_type = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc14_30: init %array_type = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 -// CHECK:STDOUT: %.loc17_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_11: init type = call constants.%Int(%.loc17_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_11: init type = call constants.%Int(%int_32.loc17_11) [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.1: type = value_of_initializer %int.make_type_signed.loc17_11 [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.2: type = converted %int.make_type_signed.loc17_11, %.loc17_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.3: type = ptr_type %i32 [template = constants.%.41] -// CHECK:STDOUT: %pa.var: ref %.41 = var pa -// CHECK:STDOUT: %pa: ref %.41 = bind_name pa, %pa.var -// CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_22: init type = call constants.%Int(%.loc17_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_22.2: type = value_of_initializer %int.make_type_signed.loc17_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_22.3: type = converted %int.make_type_signed.loc17_22, %.loc17_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.44] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc17_22.4: ref %i32 = array_index %a.ref.loc17, %.loc17_21.6 -// CHECK:STDOUT: %.loc17_18: %.41 = addr_of %.loc17_22.4 -// CHECK:STDOUT: assign %pa.var, %.loc17_18 -// CHECK:STDOUT: %a.ref.loc18: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc18_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_6.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_6.3: type = converted %int.make_type_signed.loc18, %.loc18_6.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_5.3: = bound_method %.loc18_5.1, %.loc18_5.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc18_5.4: = specific_function %.loc18_5.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %.loc18_5.4(%.loc18_5.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc18_5.5: %i32 = value_of_initializer %int.convert_checked.loc18_5 [template = constants.%.44] -// CHECK:STDOUT: %.loc18_5.6: %i32 = converted %.loc18_5.1, %.loc18_5.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc18_6.4: ref %i32 = array_index %a.ref.loc18, %.loc18_5.6 -// CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 4 [template = constants.%.45] -// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.48] -// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18_8 [template = constants.%.48] -// CHECK:STDOUT: assign %.loc18_6.4, %.loc18_8.4 +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %pa.var: ref %ptr.2 = var pa +// CHECK:STDOUT: %pa: ref %ptr.2 = bind_name pa, %pa.var +// CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc17_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_22: init type = call constants.%Int(%int_32.loc17_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_22.1: type = value_of_initializer %int.make_type_signed.loc17_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_22.2: type = converted %int.make_type_signed.loc17_22, %.loc17_22.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.1: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_21.2: %i32 = converted %int_0.loc17, %.loc17_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc17_22.3: ref %i32 = array_index %a.ref.loc17, %.loc17_21.2 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc17_22.3 +// CHECK:STDOUT: assign %pa.var, %addr +// CHECK:STDOUT: %a.ref.loc18: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_6.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_6.2: type = converted %int.make_type_signed.loc18, %.loc18_6.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc18_5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_5: = bound_method %int_0.loc18, %impl.elem0.loc18_5 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc18_5: = specific_function %Convert.bound.loc18_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %Convert.specific_fn.loc18_5(%int_0.loc18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc18_5.1: %i32 = value_of_initializer %int.convert_checked.loc18_5 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc18_5.2: %i32 = converted %int_0.loc18, %.loc18_5.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc18_6.3: ref %i32 = array_index %a.ref.loc18, %.loc18_5.2 +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc18_8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_8: = bound_method %int_4, %impl.elem0.loc18_8 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc18_8: = specific_function %Convert.bound.loc18_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %Convert.specific_fn.loc18_8(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc18_8: init %i32 = converted %int_4, %int.convert_checked.loc18_8 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %.loc18_6.3, %.loc18_8 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_16: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_11.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.3: type = converted %int.make_type_signed.loc22, %.loc22_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_17: type = array_type %.loc22_16, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc22_22: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc22_28: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) -// CHECK:STDOUT: %.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.3: = bound_method %.loc22_22, %.loc22_29.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc22_29.4: = specific_function %.loc22_29.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %.loc22_29.4(%.loc22_22) [template = constants.%.34] -// CHECK:STDOUT: %.loc22_29.5: init %i32 = converted %.loc22_22, %int.convert_checked.loc22_29.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc22_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc22_29.7: ref %i32 = array_index %a.var, %.loc22_29.6 -// CHECK:STDOUT: %.loc22_29.8: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc22_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.10: = bound_method %.loc22_25, %.loc22_29.9 [template = constants.%.35] -// CHECK:STDOUT: %.loc22_29.11: = specific_function %.loc22_29.10, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %.loc22_29.11(%.loc22_25) [template = constants.%.37] -// CHECK:STDOUT: %.loc22_29.12: init %i32 = converted %.loc22_25, %int.convert_checked.loc22_29.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc22_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc22_29.14: ref %i32 = array_index %a.var, %.loc22_29.13 -// CHECK:STDOUT: %.loc22_29.15: init %i32 = initialize_from %.loc22_29.12 to %.loc22_29.14 [template = constants.%.37] -// CHECK:STDOUT: %.loc22_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.17: = bound_method %.loc22_28, %.loc22_29.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc22_29.18: = specific_function %.loc22_29.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %.loc22_29.18(%.loc22_28) [template = constants.%.40] -// CHECK:STDOUT: %.loc22_29.19: init %i32 = converted %.loc22_28, %int.convert_checked.loc22_29.3 [template = constants.%.40] -// CHECK:STDOUT: %.loc22_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc22_29.21: ref %i32 = array_index %a.var, %.loc22_29.20 -// CHECK:STDOUT: %.loc22_29.22: init %i32 = initialize_from %.loc22_29.19 to %.loc22_29.21 [template = constants.%.40] -// CHECK:STDOUT: %.loc22_29.23: init %.3 = array_init (%.loc22_29.8, %.loc22_29.15, %.loc22_29.22) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc22_30: init %.3 = converted %.loc22_29.1, %.loc22_29.23 [template = constants.%array] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc22_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed.loc22, %.loc22_11.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type.loc22: type = array_type %int_3.loc22_16, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_1.loc22_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3.loc22_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%int_1.loc22_22, %int_2.loc22_25, %int_3.loc22_28) +// CHECK:STDOUT: %impl.elem0.loc22_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc22_29.1: = bound_method %int_1.loc22_22, %impl.elem0.loc22_29.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc22_29.1: = specific_function %Convert.bound.loc22_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %Convert.specific_fn.loc22_29.1(%int_1.loc22_22) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc22_29.2: init %i32 = converted %int_1.loc22_22, %int.convert_checked.loc22_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc22_29.3: ref %i32 = array_index %a.var, %int_0.loc22 +// CHECK:STDOUT: %.loc22_29.4: init %i32 = initialize_from %.loc22_29.2 to %.loc22_29.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc22_29.2: = bound_method %int_2.loc22_25, %impl.elem0.loc22_29.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc22_29.2: = specific_function %Convert.bound.loc22_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %Convert.specific_fn.loc22_29.2(%int_2.loc22_25) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc22_29.5: init %i32 = converted %int_2.loc22_25, %int.convert_checked.loc22_29.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %int_1.loc22_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc22_29.6: ref %i32 = array_index %a.var, %int_1.loc22_29 +// CHECK:STDOUT: %.loc22_29.7: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc22_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc22_29.3: = bound_method %int_3.loc22_28, %impl.elem0.loc22_29.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc22_29.3: = specific_function %Convert.bound.loc22_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %Convert.specific_fn.loc22_29.3(%int_3.loc22_28) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc22_29.8: init %i32 = converted %int_3.loc22_28, %int.convert_checked.loc22_29.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %int_2.loc22_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc22_29.9: ref %i32 = array_index %a.var, %int_2.loc22_29 +// CHECK:STDOUT: %.loc22_29.10: init %i32 = initialize_from %.loc22_29.8 to %.loc22_29.9 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc22_29.11: init %array_type = array_init (%.loc22_29.4, %.loc22_29.7, %.loc22_29.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc22_30: init %array_type = converted %.loc22_29.1, %.loc22_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc22_30 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc26_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc26_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_6.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_6.3: type = converted %int.make_type_signed.loc26, %.loc26_6.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_5.3: = bound_method %.loc26_5.1, %.loc26_5.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc26_5.4: = specific_function %.loc26_5.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_5.4(%.loc26_5.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc26_5.5: %i32 = value_of_initializer %int.convert_checked.loc26 [template = constants.%.44] -// CHECK:STDOUT: %.loc26_5.6: %i32 = converted %.loc26_5.1, %.loc26_5.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc26_6.4: ref %i32 = array_index %a.ref, %.loc26_5.6 -// CHECK:STDOUT: %b.ref: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc27_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc27_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_6.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_6.3: type = converted %int.make_type_signed.loc27, %.loc27_6.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_5.3: = bound_method %.loc27_5.1, %.loc27_5.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc27_5.4: = specific_function %.loc27_5.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_5.4(%.loc27_5.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc27_5.5: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.44] -// CHECK:STDOUT: %.loc27_5.6: %i32 = converted %.loc27_5.1, %.loc27_5.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc27_6.4: ref %.3 = value_as_ref %b.ref -// CHECK:STDOUT: %.loc27_6.5: ref %i32 = array_index %.loc27_6.4, %.loc27_5.6 -// CHECK:STDOUT: %.loc27_6.6: %i32 = bind_value %.loc27_6.5 +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_6.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_6.2: type = converted %int.make_type_signed.loc26, %.loc26_6.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_0.loc26, %impl.elem0.loc26 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_0.loc26) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc26_5.1: %i32 = value_of_initializer %int.convert_checked.loc26 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc26_5.2: %i32 = converted %int_0.loc26, %.loc26_5.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc26_6.3: ref %i32 = array_index %a.ref, %.loc26_5.2 +// CHECK:STDOUT: %b.ref: %array_type = name_ref b, %b +// CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_6.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_6.2: type = converted %int.make_type_signed.loc27, %.loc27_6.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc27_5.1: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc27_5.2: %i32 = converted %int_0.loc27, %.loc27_5.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc27_6.3: ref %array_type = value_as_ref %b.ref +// CHECK:STDOUT: %.loc27_6.4: ref %i32 = array_index %.loc27_6.3, %.loc27_5.2 +// CHECK:STDOUT: %.loc27_6.5: %i32 = bind_value %.loc27_6.4 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc28_5.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc28_5.1 -// CHECK:STDOUT: %.loc28_7.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc28_5.2: ref %.3 = temporary %.loc28_5.1, %F.call -// CHECK:STDOUT: %.loc28_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%.loc28_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_8.2: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_8.3: type = converted %int.make_type_signed.loc28, %.loc28_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_7.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc28_7.3: = bound_method %.loc28_7.1, %.loc28_7.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc28_7.4: = specific_function %.loc28_7.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_7.4(%.loc28_7.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc28_7.5: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%.44] -// CHECK:STDOUT: %.loc28_7.6: %i32 = converted %.loc28_7.1, %.loc28_7.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc28_8.4: ref %i32 = array_index %.loc28_5.2, %.loc28_7.6 -// CHECK:STDOUT: %.loc28_8.5: %i32 = bind_value %.loc28_8.4 +// CHECK:STDOUT: %.loc28_5.1: ref %array_type = temporary_storage +// CHECK:STDOUT: %F.call: init %array_type = call %F.ref() to %.loc28_5.1 +// CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc28_5.2: ref %array_type = temporary %.loc28_5.1, %F.call +// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] +// CHECK:STDOUT: %.loc28_8.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] +// CHECK:STDOUT: %.loc28_8.2: type = converted %int.make_type_signed.loc28, %.loc28_8.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc28_7.1: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc28_7.2: %i32 = converted %int_0.loc28, %.loc28_7.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc28_8.3: ref %i32 = array_index %.loc28_5.2, %.loc28_7.2 +// CHECK:STDOUT: %.loc28_8.4: %i32 = bind_value %.loc28_8.3 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index e0d357f4bf582..49988c9bb324b 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -24,30 +24,30 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: --- fail_array_large_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.1, %i32 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,73 +67,73 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc17_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.3: type = converted %int.make_type_signed.loc17, %.loc17_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc22_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_8.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_8.3: type = converted %int.make_type_signed.loc22, %.loc22_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_8.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_8.2: type = converted %int.make_type_signed.loc22, %.loc22_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.2: init %i32 = converted %int_12, %int.convert_checked.loc11 [template = constants.%int_12.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_23.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_23.4: init %i32 = initialize_from %.loc11_23.2 to %.loc11_23.3 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.5: init %array_type = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %array_type = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc17_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17, %.loc17_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_16.3: = bound_method %.loc17_16.1, %.loc17_16.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc17_16.4: = specific_function %.loc17_16.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_16.4(%.loc17_16.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc17_16.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.36] -// CHECK:STDOUT: %.loc17_16.6: %i32 = converted %.loc17_16.1, %.loc17_16.5 [template = constants.%.36] -// CHECK:STDOUT: %.loc17_17.4: ref %i32 = array_index %a.ref.loc17, %.loc17_16.6 [template = ] -// CHECK:STDOUT: %.loc17_17.5: %i32 = bind_value %.loc17_17.4 -// CHECK:STDOUT: assign file.%b.var, %.loc17_17.5 -// CHECK:STDOUT: %a.ref.loc22: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.37] -// CHECK:STDOUT: %.loc22_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_27.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_27.3: type = converted %int.make_type_signed.loc22, %.loc22_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_16.3: = bound_method %.loc22_16.1, %.loc22_16.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc22_16.4: = specific_function %.loc22_16.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_16.4(%.loc22_16.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc22_16.5: %i32 = value_of_initializer %int.convert_checked.loc22 [template = constants.%.40] -// CHECK:STDOUT: %.loc22_16.6: %i32 = converted %.loc22_16.1, %.loc22_16.5 [template = constants.%.40] -// CHECK:STDOUT: %.loc22_27.4: ref %i32 = array_index %a.ref.loc22, %.loc22_16.6 [template = ] -// CHECK:STDOUT: %.loc22_27.5: %i32 = bind_value %.loc22_27.4 -// CHECK:STDOUT: assign file.%c.var, %.loc22_27.5 +// CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_signed.loc17, %.loc17_17.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_1, %impl.elem0.loc17 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_16.1: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_16.2: %i32 = converted %int_1, %.loc17_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_17.3: ref %i32 = array_index %a.ref.loc17, %.loc17_16.2 [template = ] +// CHECK:STDOUT: %.loc17_17.4: %i32 = bind_value %.loc17_17.3 +// CHECK:STDOUT: assign file.%b.var, %.loc17_17.4 +// CHECK:STDOUT: %a.ref.loc22: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_27.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_27.2: type = converted %int.make_type_signed.loc22, %.loc22_27.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_2147483647, %impl.elem0.loc22 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_2147483647) [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc22_16.1: %i32 = value_of_initializer %int.convert_checked.loc22 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc22_16.2: %i32 = converted %int_2147483647, %.loc22_16.1 [template = constants.%int_2147483647.2] +// CHECK:STDOUT: %.loc22_27.3: ref %i32 = array_index %a.ref.loc22, %.loc22_16.2 [template = ] +// CHECK:STDOUT: %.loc22_27.4: %i32 = bind_value %.loc22_27.3 +// CHECK:STDOUT: assign file.%c.var, %.loc22_27.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 c428b312b3c9c..74829b071f384 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -20,24 +20,24 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: --- fail_array_non_int_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] -// CHECK:STDOUT: %.34: f64 = float_literal 2.6000000000000001 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] +// CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,47 +56,47 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc18_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.3: type = converted %int.make_type_signed.loc18, %.loc18_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_8.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_signed.loc18, %.loc18_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.2: init %i32 = converted %int_12, %int.convert_checked [template = constants.%int_12.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_23.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_23.4: init %i32 = initialize_from %.loc11_23.2 to %.loc11_23.3 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.5: init %array_type = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %array_type = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_signed, %.loc18_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_16.2: %i32 = converted %.loc18_16.1, [template = ] -// CHECK:STDOUT: %.loc18_19.4: ref %i32 = array_index %a.ref, [template = ] -// CHECK:STDOUT: %.loc18_19.5: %i32 = bind_value %.loc18_19.4 -// CHECK:STDOUT: assign file.%b.var, %.loc18_19.5 +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [template = constants.%float] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_signed, %.loc18_19.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_16: %i32 = converted %float, [template = ] +// CHECK:STDOUT: %.loc18_19.3: ref %i32 = array_index %a.ref, [template = ] +// CHECK:STDOUT: %.loc18_19.4: %i32 = bind_value %.loc18_19.3 +// CHECK:STDOUT: assign file.%b.var, %.loc18_19.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 21928c05fb12b..902df62dee1d4 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 @@ -17,26 +17,26 @@ var b: i32 = a[1]; // CHECK:STDOUT: --- fail_array_out_of_bound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_1.1, %i32 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,52 +55,52 @@ var b: i32 = a[1]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %array_type = var a +// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.2: init %i32 = converted %int_12, %int.convert_checked.loc11 [template = constants.%int_12.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_23.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc11_23.4: init %i32 = initialize_from %.loc11_23.2 to %.loc11_23.3 [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_23.5: init %array_type = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %array_type = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_signed, %.loc15_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_16.3: = bound_method %.loc15_16.1, %.loc15_16.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_16.4: = specific_function %.loc15_16.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_16.4(%.loc15_16.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc15_16.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_16.6: %i32 = converted %.loc15_16.1, %.loc15_16.5 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_17.4: ref %i32 = array_index %a.ref, %.loc15_16.6 [template = ] -// CHECK:STDOUT: %.loc15_17.5: %i32 = bind_value %.loc15_17.4 -// CHECK:STDOUT: assign file.%b.var, %.loc15_17.5 +// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_17.2: type = converted %int.make_type_signed, %.loc15_17.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1, %impl.elem0.loc15 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_16.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_16.2: %i32 = converted %int_1, %.loc15_16.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_17.3: ref %i32 = array_index %a.ref, %.loc15_16.2 [template = ] +// CHECK:STDOUT: %.loc15_17.4: %i32 = bind_value %.loc15_17.3 +// CHECK:STDOUT: assign file.%b.var, %.loc15_17.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 7a82d72661fc3..b3e2986691dcf 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -39,29 +39,29 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: --- fail_expr_category.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 4 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,133 +81,133 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %array_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_12.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.3: type = converted %int.make_type_signed, %.loc11_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, %i32 [template = constants.%.3] -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed, %.loc11_12.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %array_type = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, %i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.3; +// CHECK:STDOUT: fn @F() -> %array_type; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%.loc19_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%int_32.loc19_11) [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_signed.loc19_11, %.loc19_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_14.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %pb.var: ref %.5 = var pb -// CHECK:STDOUT: %pb: ref %.5 = bind_name pb, %pb.var -// CHECK:STDOUT: %b.ref.loc19: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc19_21.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%.loc19_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.2: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.3: type = converted %int.make_type_signed.loc19_22, %.loc19_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_21.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_21.3: = bound_method %.loc19_21.1, %.loc19_21.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_21.4: = specific_function %.loc19_21.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_21.4(%.loc19_21.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc19_21.5: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.33] -// CHECK:STDOUT: %.loc19_21.6: %i32 = converted %.loc19_21.1, %.loc19_21.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc19_22.4: ref %.3 = value_as_ref %b.ref.loc19 -// CHECK:STDOUT: %.loc19_22.5: ref %i32 = array_index %.loc19_22.4, %.loc19_21.6 -// CHECK:STDOUT: %.loc19_22.6: %i32 = bind_value %.loc19_22.5 -// CHECK:STDOUT: %.loc19_18: %.5 = addr_of [template = ] -// CHECK:STDOUT: assign %pb.var, %.loc19_18 -// CHECK:STDOUT: %b.ref.loc24: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc24_5.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%.loc24_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_6.2: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_6.3: type = converted %int.make_type_signed.loc24, %.loc24_6.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_5.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_5.3: = bound_method %.loc24_5.1, %.loc24_5.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc24_5.4: = specific_function %.loc24_5.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %.loc24_5.4(%.loc24_5.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc24_5.5: %i32 = value_of_initializer %int.convert_checked.loc24_5 [template = constants.%.33] -// CHECK:STDOUT: %.loc24_5.6: %i32 = converted %.loc24_5.1, %.loc24_5.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc24_6.4: ref %.3 = value_as_ref %b.ref.loc24 -// CHECK:STDOUT: %.loc24_6.5: ref %i32 = array_index %.loc24_6.4, %.loc24_5.6 -// CHECK:STDOUT: %.loc24_6.6: %i32 = bind_value %.loc24_6.5 -// CHECK:STDOUT: %.loc24_10: Core.IntLiteral = int_value 4 [template = constants.%.34] -// CHECK:STDOUT: %.loc24_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_8.2: = bound_method %.loc24_10, %.loc24_8.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc24_8.3: = specific_function %.loc24_8.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %.loc24_8.3(%.loc24_10) [template = constants.%.37] -// CHECK:STDOUT: %.loc24_8.4: init %i32 = converted %.loc24_10, %int.convert_checked.loc24_8 [template = constants.%.37] -// CHECK:STDOUT: assign %.loc24_6.6, %.loc24_8.4 -// CHECK:STDOUT: %.loc32_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc32_11: init type = call constants.%Int(%.loc32_11) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %pb.var: ref %ptr.2 = var pb +// CHECK:STDOUT: %pb: ref %ptr.2 = bind_name pb, %pb.var +// CHECK:STDOUT: %b.ref.loc19: %array_type = name_ref b, %b +// CHECK:STDOUT: %int_0.loc19: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%int_32.loc19_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed.loc19_22, %.loc19_22.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_0.loc19, %impl.elem0.loc19 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_0.loc19) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int_0.loc19, %.loc19_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc19_22.3: ref %array_type = value_as_ref %b.ref.loc19 +// CHECK:STDOUT: %.loc19_22.4: ref %i32 = array_index %.loc19_22.3, %.loc19_21.2 +// CHECK:STDOUT: %.loc19_22.5: %i32 = bind_value %.loc19_22.4 +// CHECK:STDOUT: %addr.loc19: %ptr.2 = addr_of [template = ] +// CHECK:STDOUT: assign %pb.var, %addr.loc19 +// CHECK:STDOUT: %b.ref.loc24: %array_type = name_ref b, %b +// CHECK:STDOUT: %int_0.loc24: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%int_32.loc24) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_6.1: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] +// CHECK:STDOUT: %.loc24_6.2: type = converted %int.make_type_signed.loc24, %.loc24_6.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc24_5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_5: = bound_method %int_0.loc24, %impl.elem0.loc24_5 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc24_5: = specific_function %Convert.bound.loc24_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %Convert.specific_fn.loc24_5(%int_0.loc24) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc24_5.1: %i32 = value_of_initializer %int.convert_checked.loc24_5 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc24_5.2: %i32 = converted %int_0.loc24, %.loc24_5.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc24_6.3: ref %array_type = value_as_ref %b.ref.loc24 +// CHECK:STDOUT: %.loc24_6.4: ref %i32 = array_index %.loc24_6.3, %.loc24_5.2 +// CHECK:STDOUT: %.loc24_6.5: %i32 = bind_value %.loc24_6.4 +// CHECK:STDOUT: %int_4.loc24: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc24_8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24_8: = bound_method %int_4.loc24, %impl.elem0.loc24_8 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc24_8: = specific_function %Convert.bound.loc24_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %Convert.specific_fn.loc24_8(%int_4.loc24) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc24_8: init %i32 = converted %int_4.loc24, %int.convert_checked.loc24_8 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %.loc24_6.5, %.loc24_8 +// CHECK:STDOUT: %int_32.loc32_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc32_11: init type = call constants.%Int(%int_32.loc32_11) [template = constants.%i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_signed.loc32_11 [template = constants.%i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_signed.loc32_11, %.loc32_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %pf.var: ref %.5 = var pf -// CHECK:STDOUT: %pf: ref %.5 = bind_name pf, %pf.var +// CHECK:STDOUT: %ptr.loc32: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %pf.var: ref %ptr.2 = var pf +// CHECK:STDOUT: %pf: ref %ptr.2 = bind_name pf, %pf.var // CHECK:STDOUT: %F.ref.loc32: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc32_21.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc32: init %.3 = call %F.ref.loc32() to %.loc32_21.1 -// CHECK:STDOUT: %.loc32_23.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc32_21.2: ref %.3 = temporary %.loc32_21.1, %F.call.loc32 -// CHECK:STDOUT: %.loc32_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc32_24: init type = call constants.%Int(%.loc32_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_24.2: type = value_of_initializer %int.make_type_signed.loc32_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_24.3: type = converted %int.make_type_signed.loc32_24, %.loc32_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc32_23.3: = bound_method %.loc32_23.1, %.loc32_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc32_23.4: = specific_function %.loc32_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_23.4(%.loc32_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc32_23.5: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%.33] -// CHECK:STDOUT: %.loc32_23.6: %i32 = converted %.loc32_23.1, %.loc32_23.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc32_24.4: ref %i32 = array_index %.loc32_21.2, %.loc32_23.6 -// CHECK:STDOUT: %.loc32_24.5: %i32 = bind_value %.loc32_24.4 -// CHECK:STDOUT: %.loc32_18: %.5 = addr_of [template = ] -// CHECK:STDOUT: assign %pf.var, %.loc32_18 +// CHECK:STDOUT: %.loc32_21.1: ref %array_type = temporary_storage +// CHECK:STDOUT: %F.call.loc32: init %array_type = call %F.ref.loc32() to %.loc32_21.1 +// CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc32_21.2: ref %array_type = temporary %.loc32_21.1, %F.call.loc32 +// CHECK:STDOUT: %int_32.loc32_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc32_24: init type = call constants.%Int(%int_32.loc32_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc32_24.1: type = value_of_initializer %int.make_type_signed.loc32_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc32_24.2: type = converted %int.make_type_signed.loc32_24, %.loc32_24.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_0.loc32, %impl.elem0.loc32 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_0.loc32) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc32_23.1: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc32_23.2: %i32 = converted %int_0.loc32, %.loc32_23.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc32_24.3: ref %i32 = array_index %.loc32_21.2, %.loc32_23.2 +// CHECK:STDOUT: %.loc32_24.4: %i32 = bind_value %.loc32_24.3 +// CHECK:STDOUT: %addr.loc32: %ptr.2 = addr_of [template = ] +// CHECK:STDOUT: assign %pf.var, %addr.loc32 // CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc36_5.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc36: init %.3 = call %F.ref.loc36() to %.loc36_5.1 -// CHECK:STDOUT: %.loc36_7.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc36_5.2: ref %.3 = temporary %.loc36_5.1, %F.call.loc36 -// CHECK:STDOUT: %.loc36_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%.loc36_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.2: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.3: type = converted %int.make_type_signed.loc36, %.loc36_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_7.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_7.3: = bound_method %.loc36_7.1, %.loc36_7.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc36_7.4: = specific_function %.loc36_7.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %.loc36_7.4(%.loc36_7.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc36_7.5: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%.33] -// CHECK:STDOUT: %.loc36_7.6: %i32 = converted %.loc36_7.1, %.loc36_7.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc36_8.4: ref %i32 = array_index %.loc36_5.2, %.loc36_7.6 -// CHECK:STDOUT: %.loc36_8.5: %i32 = bind_value %.loc36_8.4 -// CHECK:STDOUT: %.loc36_12: Core.IntLiteral = int_value 4 [template = constants.%.34] -// CHECK:STDOUT: %.loc36_10.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_10.2: = bound_method %.loc36_12, %.loc36_10.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc36_10.3: = specific_function %.loc36_10.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %.loc36_10.3(%.loc36_12) [template = constants.%.37] -// CHECK:STDOUT: %.loc36_10.4: init %i32 = converted %.loc36_12, %int.convert_checked.loc36_10 [template = constants.%.37] -// CHECK:STDOUT: assign %.loc36_8.5, %.loc36_10.4 +// CHECK:STDOUT: %.loc36_5.1: ref %array_type = temporary_storage +// CHECK:STDOUT: %F.call.loc36: init %array_type = call %F.ref.loc36() to %.loc36_5.1 +// CHECK:STDOUT: %int_0.loc36: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc36_5.2: ref %array_type = temporary %.loc36_5.1, %F.call.loc36 +// CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] +// CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] +// CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_signed.loc36, %.loc36_8.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc36_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc36_7: = bound_method %int_0.loc36, %impl.elem0.loc36_7 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc36_7: = specific_function %Convert.bound.loc36_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %Convert.specific_fn.loc36_7(%int_0.loc36) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc36_7.1: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc36_7.2: %i32 = converted %int_0.loc36, %.loc36_7.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc36_8.3: ref %i32 = array_index %.loc36_5.2, %.loc36_7.2 +// CHECK:STDOUT: %.loc36_8.4: %i32 = bind_value %.loc36_8.3 +// CHECK:STDOUT: %int_4.loc36: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc36_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc36_10: = bound_method %int_4.loc36, %impl.elem0.loc36_10 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc36_10: = specific_function %Convert.bound.loc36_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %Convert.specific_fn.loc36_10(%int_4.loc36) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc36_10: init %i32 = converted %int_4.loc36, %int.convert_checked.loc36_10 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %.loc36_8.4, %.loc36_10 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index 2275866abe79f..a2ba3659c3427 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -36,18 +36,18 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: --- fail_invalid_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.5 = struct_value (%.3, %.4) [template] -// CHECK:STDOUT: %.11: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1, %int_2) [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,29 +71,29 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %N: = namespace [template] {} -// CHECK:STDOUT: %.loc16_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.3: type = converted %int.make_type_signed.loc16, %.loc16_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.3: type = converted %int.make_type_signed.loc23, %.loc23_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed.loc23, %.loc23_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc29_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%.loc29_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_8.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_8.3: type = converted %int.make_type_signed.loc29, %.loc29_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_8.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_8.2: type = converted %int.make_type_signed.loc29, %.loc29_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %.loc34_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_8.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_8.3: type = converted %int.make_type_signed.loc34, %.loc34_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_8.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_8.2: type = converted %int.make_type_signed.loc34, %.loc34_8.1 [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -103,28 +103,28 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref: = name_ref N, file.%N [template = file.%N] -// CHECK:STDOUT: %.loc16: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: assign file.%a.var, // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc23: Core.IntLiteral = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign file.%b.var, -// CHECK:STDOUT: %.loc29_20: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_28: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc29_29.1: %.5 = struct_literal (%.loc29_20, %.loc29_28) -// CHECK:STDOUT: %.loc29_31: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %struct: %.5 = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct] -// CHECK:STDOUT: %.loc29_29.2: %.5 = converted %.loc29_29.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %int_1.loc29: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc29_29.1: %struct_type.a.b.1 = struct_literal (%int_1.loc29, %int_2) +// CHECK:STDOUT: %int_0.loc29: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.loc29, %int_2) [template = constants.%struct] +// CHECK:STDOUT: %.loc29_29.2: %struct_type.a.b.1 = converted %.loc29_29.1, %struct [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %.loc34_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34_19: init type = call constants.%Int(%.loc34_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_19.2: type = value_of_initializer %int.make_type_signed.loc34_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_19.3: type = converted %int.make_type_signed.loc34_19, %.loc34_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc34_28: init type = call constants.%Int(%.loc34_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_28.2: type = value_of_initializer %int.make_type_signed.loc34_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_28.3: type = converted %int.make_type_signed.loc34_28, %.loc34_28.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_31: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.11] -// CHECK:STDOUT: %.loc34_33: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int_32.loc34_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc34_19: init type = call constants.%Int(%int_32.loc34_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_19.1: type = value_of_initializer %int.make_type_signed.loc34_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_19.2: type = converted %int.make_type_signed.loc34_19, %.loc34_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc34_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc34_28: init type = call constants.%Int(%int_32.loc34_28) [template = constants.%i32] +// CHECK:STDOUT: %.loc34_28.1: type = value_of_initializer %int.make_type_signed.loc34_28 [template = constants.%i32] +// CHECK:STDOUT: %.loc34_28.2: type = converted %int.make_type_signed.loc34_28, %.loc34_28.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.2] +// CHECK:STDOUT: %int_0.loc34: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index af23612b66c9a..21d205f16921f 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -20,11 +20,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,14 +46,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.3: type = converted %int.make_type_signed, %.loc15_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] -// CHECK:STDOUT: %.loc15_18: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: assign %b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 2af2e2edcef04..6b64234e0b7e8 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -18,25 +18,25 @@ var d: i32 = c[-10]; // CHECK:STDOUT: --- fail_negative_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] +// CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.33, %.33) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.2, %int_42.2) [template] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,55 +56,55 @@ var d: i32 = c[-10]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %c.var: ref %array_type = var c +// CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 42 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 42 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.6: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.7: ref %i32 = array_index file.%c.var, %.loc11_26.6 -// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.14: ref %i32 = array_index file.%c.var, %.loc11_26.13 -// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_26.16: init %.3 = array_init (%.loc11_26.8, %.loc11_26.15) to file.%c.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.16 [template = constants.%array] +// CHECK:STDOUT: %int_42.loc11_20: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] +// CHECK:STDOUT: %int_42.loc11_24: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_42.loc11_20, %int_42.loc11_24) +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_42.loc11_20, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_42.loc11_20) [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_42.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%int_42.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%c.var, %int_0 +// CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_42.2] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_42.loc11_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_42.loc11_24) [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %int_42.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%int_42.2] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc11_26.6: ref %i32 = array_index file.%c.var, %int_1 +// CHECK:STDOUT: %.loc11_26.7: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.6 [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc11_26.8: init %array_type = array_init (%.loc11_26.4, %.loc11_26.7) to file.%c.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_27: init %array_type = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%c.var, %.loc11_27 -// CHECK:STDOUT: %c.ref: ref %.3 = name_ref c, file.%c -// CHECK:STDOUT: %.loc15_17: Core.IntLiteral = int_value 10 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed, %.loc15_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.4: ref %i32 = array_index %c.ref, [template = ] -// CHECK:STDOUT: %.loc15_19.5: %i32 = bind_value %.loc15_19.4 -// CHECK:STDOUT: assign file.%d.var, %.loc15_19.5 +// CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed, %.loc15_19.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.3: ref %i32 = array_index %c.ref, [template = ] +// CHECK:STDOUT: %.loc15_19.4: %i32 = bind_value %.loc15_19.3 +// CHECK:STDOUT: assign file.%d.var, %.loc15_19.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 2f91b680fa06b..405bf9e24f7c9 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -20,8 +20,8 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,8 +43,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_3: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_5: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index eb17190448049..da4a83c36ca01 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -18,14 +18,14 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %i32 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,18 +48,18 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %T [template = constants.%.2] -// CHECK:STDOUT: %.loc13_11.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc13_14: %.4 = assoc_entity element1, %N [template = constants.%.5] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %N [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc12 -// CHECK:STDOUT: .N = %.loc13_14 +// CHECK:STDOUT: .T = %assoc0 +// CHECK:STDOUT: .N = %assoc1 // CHECK:STDOUT: witness = (%T, %N) // CHECK:STDOUT: } // CHECK:STDOUT: 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 1e414705f9fa5..7c80f963419f4 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -23,9 +23,9 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] -// CHECK:STDOUT: %.25: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc0.7: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,14 +47,14 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc18_18: Core.IntLiteral = int_value 42 [template = constants.%.1] -// CHECK:STDOUT: %.loc18_20.1: type = converted %.loc18_18, [template = ] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] +// CHECK:STDOUT: %.loc18: type = converted %int_42, [template = ] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_20.2: %.25 = assoc_entity element0, %T [template = constants.%.26] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc18_20.2 +// CHECK:STDOUT: .T = %assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index c6282f5224005..0a0e15b5f2416 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -25,24 +25,24 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc0.1: %assoc_type.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.32: type = assoc_entity_type %I.type, %i32 [template] -// CHECK:STDOUT: %.33: %.32 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,10 +65,10 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%.loc16_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16_32: init type = call constants.%Int(%.loc16_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16_32: init type = call constants.%Int(%int_32.loc16_32) [template = constants.%i32] // CHECK:STDOUT: %.loc16_35: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc16_27, %int.make_type_signed.loc16_32) // CHECK:STDOUT: %.loc16_36.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] // CHECK:STDOUT: %.loc16_36.2: type = converted %int.make_type_signed.loc16_27, %.loc16_36.1 [template = constants.%i32] @@ -76,25 +76,25 @@ interface I { // CHECK:STDOUT: %.loc16_36.4: type = converted %int.make_type_signed.loc16_32, %.loc16_36.3 [template = constants.%i32] // CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16_36.6: %.2 = assoc_entity element0, %T [template = constants.%.3] -// CHECK:STDOUT: %.loc20_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.3: type = converted %int.make_type_signed.loc20, %.loc20_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_25: Core.IntLiteral = int_value 42 [template = constants.%.4] -// CHECK:STDOUT: %.loc20_27.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_27.2: = bound_method %.loc20_25, %.loc20_27.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc20_27.3: = specific_function %.loc20_27.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc20_27.3(%.loc20_25) [template = constants.%.31] -// CHECK:STDOUT: %.loc20_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc20_27.5: %i32 = converted %.loc20_25, %.loc20_27.4 [template = constants.%.31] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0.1] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_signed.loc20, %.loc20_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_42) [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc20_27.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc20_27.2: %i32 = converted %int_42, %.loc20_27.1 [template = constants.%int_42.2] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc20_27.6: %.32 = assoc_entity element1, %N [template = constants.%.33] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %N [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc16_36.6 -// CHECK:STDOUT: .N = %.loc20_27.6 +// CHECK:STDOUT: .T = %assoc0 +// CHECK:STDOUT: .N = %assoc1 // CHECK:STDOUT: witness = (%T, %N) // CHECK:STDOUT: } // CHECK:STDOUT: 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 abeb9af97bd7d..5d2c9cfa52ddc 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 @@ -28,16 +28,16 @@ interface Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,7 +60,7 @@ interface Interface { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc16: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -69,18 +69,18 @@ interface Interface { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_19.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc21_19: init type = call constants.%Int(%.loc21_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_19.2: type = value_of_initializer %int.make_type_signed.loc21_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_19.3: type = converted %int.make_type_signed.loc21_19, %.loc21_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc21_27: init type = call constants.%Int(%.loc21_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27.2: type = value_of_initializer %int.make_type_signed.loc21_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27.3: type = converted %int.make_type_signed.loc21_27, %.loc21_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_35.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc21_35: init type = call constants.%Int(%.loc21_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_35.2: type = value_of_initializer %int.make_type_signed.loc21_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_35.3: type = converted %int.make_type_signed.loc21_35, %.loc21_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_19: init type = call constants.%Int(%int_32.loc21_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_19.1: type = value_of_initializer %int.make_type_signed.loc21_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_19.2: type = converted %int.make_type_signed.loc21_19, %.loc21_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_27: init type = call constants.%Int(%int_32.loc21_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_27.1: type = value_of_initializer %int.make_type_signed.loc21_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_27.2: type = converted %int.make_type_signed.loc21_27, %.loc21_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21_35: init type = call constants.%Int(%int_32.loc21_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_35.1: type = value_of_initializer %int.make_type_signed.loc21_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_35.2: type = converted %int.make_type_signed.loc21_35, %.loc21_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -88,12 +88,12 @@ interface Interface { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc16 -// CHECK:STDOUT: .G = %.loc21 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .G = %assoc1 // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: 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 7e6c403b570d5..51b63cfe5b088 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 @@ -70,20 +70,20 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.6: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.7: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,8 +101,8 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} -// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.6] {} {} -// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.7] { +// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.1] {} {} +// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.2] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -110,18 +110,18 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_19.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc31_19: init type = call constants.%Int(%.loc31_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_19.2: type = value_of_initializer %int.make_type_signed.loc31_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_19.3: type = converted %int.make_type_signed.loc31_19, %.loc31_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_27.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc31_27: init type = call constants.%Int(%.loc31_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_27.2: type = value_of_initializer %int.make_type_signed.loc31_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_27.3: type = converted %int.make_type_signed.loc31_27, %.loc31_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_35.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc31_35: init type = call constants.%Int(%.loc31_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_35.2: type = value_of_initializer %int.make_type_signed.loc31_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_35.3: type = converted %int.make_type_signed.loc31_35, %.loc31_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_19: init type = call constants.%Int(%int_32.loc31_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_19.1: type = value_of_initializer %int.make_type_signed.loc31_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_19.2: type = converted %int.make_type_signed.loc31_19, %.loc31_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_27: init type = call constants.%Int(%int_32.loc31_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_27.1: type = value_of_initializer %int.make_type_signed.loc31_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_27.2: type = converted %int.make_type_signed.loc31_27, %.loc31_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc31_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc31_35: init type = call constants.%Int(%int_32.loc31_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc31_35.1: type = value_of_initializer %int.make_type_signed.loc31_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_35.2: type = converted %int.make_type_signed.loc31_35, %.loc31_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -134,7 +134,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -143,18 +143,18 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_19.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc13_19: init type = call constants.%Int(%.loc13_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.2: type = value_of_initializer %int.make_type_signed.loc13_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.3: type = converted %int.make_type_signed.loc13_19, %.loc13_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_27.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc13_27: init type = call constants.%Int(%.loc13_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_27.2: type = value_of_initializer %int.make_type_signed.loc13_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_27.3: type = converted %int.make_type_signed.loc13_27, %.loc13_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_35.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc13_35: init type = call constants.%Int(%.loc13_35.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_35.2: type = value_of_initializer %int.make_type_signed.loc13_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_35.3: type = converted %int.make_type_signed.loc13_35, %.loc13_35.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_19: init type = call constants.%Int(%int_32.loc13_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_19.1: type = value_of_initializer %int.make_type_signed.loc13_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_19.2: type = converted %int.make_type_signed.loc13_19, %.loc13_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_27: init type = call constants.%Int(%int_32.loc13_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_27.1: type = value_of_initializer %int.make_type_signed.loc13_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_27.2: type = converted %int.make_type_signed.loc13_27, %.loc13_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13_35: init type = call constants.%Int(%int_32.loc13_35) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_35.1: type = value_of_initializer %int.make_type_signed.loc13_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_35.2: type = converted %int.make_type_signed.loc13_35, %.loc13_35.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -162,12 +162,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc7 -// CHECK:STDOUT: .G = %.loc13 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .G = %assoc1 // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -215,8 +215,8 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%Self) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -298,12 +298,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param.loc14: ref @F.%U.loc14_22.1 (%U) = out_param runtime_param2 // CHECK:STDOUT: %.loc14_38: ref @F.%U.loc14_22.1 (%U) = return_slot %return.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index 53f9b43a4b0c2..d9927135820ba 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 @@ -23,7 +23,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt: %Empty.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = facet_access_type %T [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,15 +55,15 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt.loc13_6.2: %Empty.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc14_10.3: type = facet_access_type %T.loc13_6.2 [symbolic = %.loc14_10.3 (constants.%.1)] +// CHECK:STDOUT: %T.as_type.loc14_10.2: type = facet_access_type %T.loc13_6.2 [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Empty.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc14_10.1: type = facet_access_type %T.ref [symbolic = %.loc14_10.3 (constants.%.1)] -// CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref, %.loc14_10.1 [symbolic = %.loc14_10.3 (constants.%.1)] -// CHECK:STDOUT: %x.var: ref @F.%.loc14_10.3 (%.1) = var x -// CHECK:STDOUT: %x: ref @F.%.loc14_10.3 (%.1) = bind_name x, %x.var +// CHECK:STDOUT: %T.as_type.loc14_10.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc14: type = converted %T.ref, %T.as_type.loc14_10.1 [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] +// CHECK:STDOUT: %x.var: ref @F.%T.as_type.loc14_10.2 (%T.as_type) = var x +// CHECK:STDOUT: %x: ref @F.%T.as_type.loc14_10.2 (%T.as_type) = bind_name x, %x.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon index 7b2402528e058..0417c1947b75f 100644 --- a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon @@ -30,25 +30,25 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 2 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 2 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = specific_function %G, @G(%.3) [template] -// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%.3)> [template] -// CHECK:STDOUT: %F.type.2: type = fn_type @F, @I(%.3) [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.3, %F.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%empty_struct_type) [template] +// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%empty_struct_type)> [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F, @I(%empty_struct_type) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %I.type.3, %F.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,7 +57,7 @@ fn H() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -83,8 +83,8 @@ fn H() { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc12_22.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc12_22.2 (constants.%.1)] -// CHECK:STDOUT: %.loc12_22.3: @I.%.loc12_22.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc12_22.2: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_22.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -100,11 +100,11 @@ fn H() { // CHECK:STDOUT: %return.param: ref @F.%U.loc12_8.1 (%U) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.%U.loc12_8.1 (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_22.1: @I.%.loc12_22.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc12_22.1: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_22.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc12_22.1 +// CHECK:STDOUT: .F = %assoc0.loc12_22.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -123,16 +123,16 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc19_6.2: type = facet_type <@I, @I(%T.loc15_6.2)> [symbolic = %I.type.loc19_6.2 (constants.%I.type.2)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc15_6.2) [symbolic = %F.type (constants.%F.type.1)] -// CHECK:STDOUT: %.loc19_7.2: type = assoc_entity_type @G.%I.type.loc19_6.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %.loc19_7.2 (constants.%.1)] -// CHECK:STDOUT: %.loc19_7.3: @G.%.loc19_7.2 (%.1) = assoc_entity element0, @I.%F.decl [symbolic = %.loc19_7.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @G.%I.type.loc19_6.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @G.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, @I.%F.decl [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_6.1 [symbolic = %T.loc15_6.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc19_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc19_6.2 (constants.%I.type.2)] -// CHECK:STDOUT: %.loc19_7.1: @G.%.loc19_7.2 (%.1) = specific_constant @I.%.loc12_22.1, @I(constants.%T) [symbolic = %.loc19_7.3 (constants.%.2)] -// CHECK:STDOUT: %F.ref: @G.%.loc19_7.2 (%.1) = name_ref F, %.loc19_7.1 [symbolic = %.loc19_7.3 (constants.%.2)] +// CHECK:STDOUT: %.loc19: @G.%F.assoc_type (%F.assoc_type.1) = specific_constant @I.%assoc0.loc12_22.1, @I(constants.%T) [symbolic = %assoc0 (constants.%assoc0.1)] +// CHECK:STDOUT: %F.ref: @G.%F.assoc_type (%F.assoc_type.1) = name_ref F, %.loc19 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -140,10 +140,10 @@ fn H() { // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc23_6: %.3 = struct_literal () -// CHECK:STDOUT: %.loc23_7: type = converted %.loc23_6, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_3: = specific_function %G.ref, @G(constants.%.3) [template = constants.%.4] -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc23_3() +// CHECK:STDOUT: %.loc23_6: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc23_7: type = converted %.loc23_6, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%empty_struct_type) [template = constants.%G.specific_fn] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -156,8 +156,8 @@ fn H() { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc12_22.2 => constants.%.1 -// CHECK:STDOUT: %.loc12_22.3 => constants.%.2 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.1 +// CHECK:STDOUT: %assoc0.loc12_22.2 => constants.%assoc0.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self, constants.%U) { @@ -180,19 +180,19 @@ fn H() { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%.3) { -// CHECK:STDOUT: %T.loc15_6.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc15_6.2 => constants.%.3 +// CHECK:STDOUT: specific @G(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc15_6.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc15_6.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc19_6.2 => constants.%I.type.3 // CHECK:STDOUT: %F.type => constants.%F.type.2 -// CHECK:STDOUT: %.loc19_7.2 => constants.%.5 -// CHECK:STDOUT: %.loc19_7.3 => constants.%.6 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.3) { -// CHECK:STDOUT: %T.loc11_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%.3 +// CHECK:STDOUT: specific @I(constants.%empty_struct_type) { +// CHECK:STDOUT: %T.loc11_13.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%empty_struct_type // 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 912b85e4488e7..367628ab4d096 100644 --- a/toolchain/check/testdata/interface/no_prelude/basic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/basic.carbon @@ -26,8 +26,8 @@ interface ForwardDeclared { // CHECK:STDOUT: %Self.2: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ForwardDeclared.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %ForwardDeclared.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,11 +51,11 @@ interface ForwardDeclared { // CHECK:STDOUT: interface @ForwardDeclared { // CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc17: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc17 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index f02468f11919a..1dc560535b6d6 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -32,15 +32,15 @@ class C { // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: %I.type = facet_value %C, %C [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,21 +53,21 @@ class C { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc21 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -76,12 +76,12 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: complete_type_witness = %.loc24 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -92,15 +92,15 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc16_19.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc16_19.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: %.loc16_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc16_19.2: init %C = class_init (), %c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc16_20: init %C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc16_20 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc14 [template = constants.%.2] -// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc17() +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -112,5 +112,5 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet) {} // 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 32be874511647..bbcb6432af923 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon @@ -30,7 +30,7 @@ alias UseOther = I.other; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,7 +50,7 @@ alias UseOther = I.other; // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %.loc19: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 683fdaf39be3a..a492b94129038 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -78,8 +78,8 @@ interface Class { } // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -101,11 +101,11 @@ interface Class { } // CHECK:STDOUT: interface @.1 { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -123,11 +123,11 @@ interface Class { } // CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.type: type = facet_type <@.1> [template] // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -149,33 +149,33 @@ interface Class { } // CHECK:STDOUT: interface @.1 { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%.loc14_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%.loc14_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %.type = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %.loc14_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc14_14.3: type = converted %Self.ref, %.loc14_14.2 [symbolic = %.loc14_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.%.loc14_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%.loc14_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@.1.%Self: %.type) { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc14_14.1: type = facet_access_type %Self [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc14_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc14_14.1 (%.1)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc14_14.1 (%Self.as_type)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.loc14_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc14_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_name_conflict_with_fn.carbon 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 bddf7c3ae9933..067b3a209e26e 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -45,19 +45,19 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%T.1)> [symbolic] // CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_interface_type @Generic [template] -// CHECK:STDOUT: %Generic: %Generic.type = struct_value () [template] +// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [template] // CHECK:STDOUT: %.type.3: type = facet_type <@.2> [template] // CHECK:STDOUT: %Self.2: %.type.3 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %DifferentParams.type: type = generic_interface_type @DifferentParams [template] -// CHECK:STDOUT: %DifferentParams: %DifferentParams.type = struct_value () [template] +// CHECK:STDOUT: %DifferentParams.generic: %DifferentParams.type = struct_value () [template] // CHECK:STDOUT: %T.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type.4: type = generic_interface_type @.3 [template] -// CHECK:STDOUT: %.2: %.type.4 = struct_value () [template] +// CHECK:STDOUT: %.generic.2: %.type.4 = struct_value () [template] // CHECK:STDOUT: %.type.5: type = facet_type <@.3, @.3(%T.2)> [symbolic] // CHECK:STDOUT: %Self.3: %.type.5 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -69,14 +69,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: .DifferentParams = %DifferentParams.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NotGeneric.decl: type = interface_decl @NotGeneric [template = constants.%NotGeneric.type] {} {} -// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.generic.1] { // CHECK:STDOUT: %T.patt.loc19_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_22.1, runtime_param [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_22.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl: %Generic.type = interface_decl @Generic [template = constants.%Generic] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = interface_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc21_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_19.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc21_19.1, runtime_param [symbolic = %T.patt.loc21_19.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { @@ -84,14 +84,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc21_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_19.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.type.3] {} {} -// CHECK:STDOUT: %DifferentParams.decl: %DifferentParams.type = interface_decl @DifferentParams [template = constants.%DifferentParams] { +// CHECK:STDOUT: %DifferentParams.decl: %DifferentParams.type = interface_decl @DifferentParams [template = constants.%DifferentParams.generic] { // CHECK:STDOUT: %T.patt.loc31_27.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_27.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc31_27.1, runtime_param [symbolic = %T.patt.loc31_27.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc31_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc31_27.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc38: %.type.4 = interface_decl @.3 [template = constants.%.2] { +// CHECK:STDOUT: %.decl.loc38: %.type.4 = interface_decl @.3 [template = constants.%.generic.2] { // CHECK:STDOUT: %T.patt.loc38_27.1: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %empty_tuple.type = value_param_pattern %T.patt.loc38_27.1, runtime_param [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon index 43434159c9b1b..12856adb7c1e4 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon @@ -30,7 +30,7 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: --- fail_lookup_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,7 +41,7 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: %.1 = struct_literal () +// CHECK:STDOUT: %.loc8: %empty_struct_type = struct_literal () // CHECK:STDOUT: %T: = bind_name T, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -51,7 +51,7 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %type_where: type = facet_type [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,7 +68,7 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7: %empty_struct_type = struct_literal () // CHECK:STDOUT: %U: = bind_name U, // CHECK:STDOUT: return // CHECK:STDOUT: } 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 2ed39d25b88d3..91604916835e3 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -61,10 +61,10 @@ interface BeingDefined { // CHECK:STDOUT: %Self: %BeingDefined.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %BeingDefined.type, %H.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @BeingDefined.%H.decl [template] +// CHECK:STDOUT: %H.assoc_type: type = assoc_entity_type %BeingDefined.type, %H.type [template] +// CHECK:STDOUT: %assoc0: %H.assoc_type = assoc_entity element0, @BeingDefined.%H.decl [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.4: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,12 +92,12 @@ interface BeingDefined { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: %.2 = assoc_entity element0, %H.decl [template = constants.%.3] -// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.4] {} {} +// CHECK:STDOUT: %assoc0: %H.assoc_type = assoc_entity element0, %H.decl [template = constants.%assoc0] +// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.2] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .H = %.loc45 +// CHECK:STDOUT: .H = %assoc0 // CHECK:STDOUT: witness = (%H.decl) // CHECK:STDOUT: } // CHECK:STDOUT: 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 d9a8731d14dc9..e6b15d47c92dc 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -42,10 +42,10 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Interface.type, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Interface.%T [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %Interface.type, type [template] +// CHECK:STDOUT: %assoc1: %assoc_type = assoc_entity element1, @Interface.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %Different.type: type = facet_type <@Different> [template] @@ -75,7 +75,7 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [template = constants.%Different.type] // CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc36_6.1 [symbolic = %U.loc36_6.2 (constants.%U)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %T.ref: %.3 = name_ref T, @Interface.%.loc14 [template = constants.%.4] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @Interface.%assoc1 [template = constants.%assoc1] // CHECK:STDOUT: %U.param: %Different.type = value_param runtime_param // CHECK:STDOUT: %U.loc36_6.1: %Different.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc36_6.2 (constants.%U)] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 @@ -86,14 +86,14 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element1, %T [template = constants.%.4] +// CHECK:STDOUT: %assoc1: %assoc_type = assoc_entity element1, %T [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 -// CHECK:STDOUT: .T = %.loc14 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .T = %assoc1 // CHECK:STDOUT: witness = (%F.decl, %T) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,9 +113,9 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Interface.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Interface.%assoc0 [template = constants.%assoc0] // CHECK:STDOUT: %Interface.ref.loc28: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %T.ref: %.3 = name_ref T, @Interface.%.loc14 [template = constants.%.4] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @Interface.%assoc1 [template = constants.%assoc1] // CHECK:STDOUT: %.loc28: type = converted %T.ref, [template = ] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index e2ab1adc7dad7..2b46f7a30daca 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -152,11 +152,11 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -169,33 +169,33 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%.loc9_22.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%.loc9_22.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %.loc9_22.1 (constants.%.1)] -// CHECK:STDOUT: %.loc9_22.3: type = converted %Self.ref, %.loc9_22.2 [symbolic = %.loc9_22.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.%.loc9_22.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%.loc9_22.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_22.2 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc9 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_22.1: type = facet_access_type %Self [symbolic = %.loc9_22.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc9_22.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc9_22.1 (%.1)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc9_22.1 (%Self.as_type)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc9_22.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc9_22.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_protected_member.carbon @@ -203,11 +203,11 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -220,32 +220,32 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%.loc8_24.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%.loc8_24.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc8_24.2: type = facet_access_type %Self.ref [symbolic = %.loc8_24.1 (constants.%.1)] -// CHECK:STDOUT: %.loc8_24.3: type = converted %Self.ref, %.loc8_24.2 [symbolic = %.loc8_24.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.%.loc8_24.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%.loc8_24.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %Self.as_type.loc8_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc8: type = converted %Self.ref, %Self.as_type.loc8_24.2 [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc8 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc8_24.1: type = facet_access_type %Self [symbolic = %.loc8_24.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc8_24.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc8_24.1 (%.1)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc8_24.1 (%Self.as_type)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc8_24.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc8_24.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: 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 7bf7a8d80f60c..a4ec21d675eae 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -26,10 +26,10 @@ interface Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,12 +42,12 @@ interface Interface { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: 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 564481be8b877..ac5cb09c51fb0 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 @@ -32,15 +32,15 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %T: %Interface.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %Interface.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] // CHECK:STDOUT: %CallStatic: %CallStatic.type = struct_value () [template] -// CHECK:STDOUT: %.3: = facet_access_witness %T [symbolic] -// CHECK:STDOUT: %.4: %F.type = interface_witness_access %.3, element0 [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %T [symbolic] +// CHECK:STDOUT: %T.as_wit: = facet_access_witness %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %F.type = interface_witness_access %T.as_wit, element0 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %CallFacet.type: type = fn_type @CallFacet [template] // CHECK:STDOUT: %CallFacet: %CallFacet.type = struct_value () [template] // CHECK:STDOUT: } @@ -63,28 +63,28 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { // CHECK:STDOUT: %T.patt.loc21_14.1: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %Interface.type = value_param_pattern %T.patt.loc21_14.1, runtime_param [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @CallFacet.%.loc21_32.3 (%.5) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallFacet.%.loc21_32.3 (%.5) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc21_32.1: type = facet_access_type %T.ref [symbolic = %.loc21_32.3 (constants.%.5)] -// CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = %.loc21_32.3 (constants.%.5)] +// CHECK:STDOUT: %T.as_type.loc21_32.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc21: type = converted %T.ref, %T.as_type.loc21_32.1 [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] // CHECK:STDOUT: %T.param: %Interface.type = value_param runtime_param // CHECK:STDOUT: %T.loc21_14.1: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallFacet.%.loc21_32.3 (%.5) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallFacet.%.loc21_32.3 (%.5) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc11 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -98,15 +98,15 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %T.patt.loc13_15.2: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc18_4.3: = facet_access_witness %T.loc13_15.2 [symbolic = %.loc18_4.3 (constants.%.3)] -// CHECK:STDOUT: %.loc18_4.4: %F.type = interface_witness_access %.loc18_4.3, element0 [symbolic = %.loc18_4.4 (constants.%.4)] +// CHECK:STDOUT: %T.as_wit.loc18_4.2: = facet_access_witness %T.loc13_15.2 [symbolic = %T.as_wit.loc18_4.2 (constants.%T.as_wit)] +// CHECK:STDOUT: %impl.elem0.loc18_4.2: %F.type = interface_witness_access %T.as_wit.loc18_4.2, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Interface.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc13_15.1 [symbolic = %T.loc13_15.2 (constants.%T)] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Interface.%.loc11 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_4.1: = facet_access_witness %T.ref [symbolic = %.loc18_4.3 (constants.%.3)] -// CHECK:STDOUT: %.loc18_4.2: %F.type = interface_witness_access %.loc18_4.1, element0 [symbolic = %.loc18_4.4 (constants.%.4)] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Interface.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %T.as_wit.loc18_4.1: = facet_access_witness %T.ref [symbolic = %T.as_wit.loc18_4.2 (constants.%T.as_wit)] +// CHECK:STDOUT: %impl.elem0.loc18_4.1: %F.type = interface_witness_access %T.as_wit.loc18_4.1, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -114,13 +114,13 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: generic fn @CallFacet(%T.loc21_14.1: %Interface.type) { // CHECK:STDOUT: %T.loc21_14.2: %Interface.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc21_32.3: type = facet_access_type %T.loc21_14.2 [symbolic = %.loc21_32.3 (constants.%.5)] +// CHECK:STDOUT: %T.as_type.loc21_32.2: type = facet_access_type %T.loc21_14.2 [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: %Interface.type, %x.param_patt: @CallFacet.%.loc21_32.3 (%.5)) { +// CHECK:STDOUT: fn(%T.param_patt: %Interface.type, %x.param_patt: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @CallFacet.%.loc21_32.3 (%.5) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -135,6 +135,6 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: specific @CallFacet(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T -// CHECK:STDOUT: %.loc21_32.3 => constants.%.5 +// CHECK:STDOUT: %T.as_type.loc21_32.2 => constants.%T.as_type // 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 18165de0f4db3..f6caac35fb740 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -27,49 +27,49 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @I(%T) [symbolic] -// CHECK:STDOUT: %.4: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.1: %.type = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.4] { -// CHECK:STDOUT: %self.patt: @.1.%.loc22_24.4 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @.1.%.loc22_24.4 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @.1.%.loc22_24.4 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc22_24.4 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.1] { +// CHECK:STDOUT: %self.patt: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc22_6.2 (constants.%T)] // CHECK:STDOUT: %.loc22_24.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_24: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_24.2: type = facet_access_type %Self.ref.loc22_24 [symbolic = %.loc22_24.4 (constants.%.1)] -// CHECK:STDOUT: %.loc22_24.3: type = converted %Self.ref.loc22_24, %.loc22_24.2 [symbolic = %.loc22_24.4 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc22_24.1: type = facet_access_type %Self.ref.loc22_24 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc22_24.2: type = converted %Self.ref.loc22_24, %Self.as_type.loc22_24.1 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc22_35.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_35: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_35.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_35.2: type = facet_access_type %Self.ref.loc22_35 [symbolic = %.loc22_24.4 (constants.%.1)] -// CHECK:STDOUT: %.loc22_35.3: type = converted %Self.ref.loc22_35, %.loc22_35.2 [symbolic = %.loc22_24.4 (constants.%.1)] -// CHECK:STDOUT: %self.param: @.1.%.loc22_24.4 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @.1.%.loc22_24.4 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @.1.%.loc22_24.4 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @.1.%.loc22_24.4 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc22_35: type = facet_access_type %Self.ref.loc22_35 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc22_35.2: type = converted %Self.ref.loc22_35, %Self.as_type.loc22_35 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,35 +82,35 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc13_29.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc13_29.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_29.3: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %F.assoc_type (constants.%F.assoc_type)] +// CHECK:STDOUT: %assoc0.loc13_29.2: @I.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc13_29.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type) = fn_decl @F [symbolic = @I.%F (constants.%F)] { -// CHECK:STDOUT: %self.patt: @F.%.loc13_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%.loc13_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%.loc13_14.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc13_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_14.2: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.3: type = facet_access_type %Self.ref.loc13_14 [symbolic = %.loc13_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc13_14.4: type = converted %Self.ref.loc13_14, %.loc13_14.3 [symbolic = %.loc13_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc13_14.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref.loc13_14 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc13_25.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc13_25: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_25.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_25.2: type = facet_access_type %Self.ref.loc13_25 [symbolic = %.loc13_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc13_25.3: type = converted %Self.ref.loc13_25, %.loc13_25.2 [symbolic = %.loc13_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.%.loc13_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%.loc13_14.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.%.loc13_14.1 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%.loc13_14.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc13_25: type = facet_access_type %Self.ref.loc13_25 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc13_25.2: type = converted %Self.ref.loc13_25, %Self.as_type.loc13_25 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc13_14.1 (%Self.as_type) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%Self.as_type.loc13_14.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_29.1: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] +// CHECK:STDOUT: %assoc0.loc13_29.1: @I.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc13_29.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc13_29.1 +// CHECK:STDOUT: .F = %assoc0.loc13_29.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -119,9 +119,9 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.1: type = facet_access_type %Self [symbolic = %.loc13_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc13_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc13_14.1 (%.1)]() -> @F.%.loc13_14.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type)]() -> @F.%Self.as_type.loc13_14.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%T.loc22_6.1: type, @I.%Self.1: @I.%I.type (%I.type.2)) { @@ -129,13 +129,13 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc22_6.2)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_24.4: type = facet_access_type %Self [symbolic = %.loc22_24.4 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc22_24.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @.1.%.loc22_24.4 (%.1)]() -> @.1.%.loc22_24.4 (%.1) { +// CHECK:STDOUT: fn[%self.param_patt: @.1.%Self.as_type.loc22_24.2 (%Self.as_type)]() -> @.1.%Self.as_type.loc22_24.2 (%Self.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @.1.%.loc22_24.4 (%.1) = name_ref self, %self +// CHECK:STDOUT: %self.ref: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = name_ref self, %self // CHECK:STDOUT: return %self.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -149,8 +149,8 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc13_29.2 => constants.%.2 -// CHECK:STDOUT: %.loc13_29.3 => constants.%.3 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type +// CHECK:STDOUT: %assoc0.loc13_29.2 => constants.%assoc0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@F.%T) { @@ -162,7 +162,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc13_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%T.loc11_13.2) { @@ -180,6 +180,6 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc22_24.4 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc22_24.2 => constants.%Self.as_type // 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 332ad577d7cf6..83cbde225c2b5 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -27,12 +27,12 @@ interface Modifiers { // CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Final.type: type = fn_type @Final [template] // CHECK:STDOUT: %Final: %Final.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Modifiers.type, %Final.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Modifiers.%Final.decl [template] +// CHECK:STDOUT: %Final.assoc_type: type = assoc_entity_type %Modifiers.type, %Final.type [template] +// CHECK:STDOUT: %assoc0: %Final.assoc_type = assoc_entity element0, @Modifiers.%Final.decl [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] // CHECK:STDOUT: %Default: %Default.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Modifiers.type, %Default.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Modifiers.%Default.decl [template] +// CHECK:STDOUT: %Default.assoc_type: type = assoc_entity_type %Modifiers.type, %Default.type [template] +// CHECK:STDOUT: %assoc1: %Default.assoc_type = assoc_entity element1, @Modifiers.%Default.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,14 +45,14 @@ interface Modifiers { // CHECK:STDOUT: interface @Modifiers { // CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] {} {} -// CHECK:STDOUT: %.loc16: %.1 = assoc_entity element0, %Final.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %Final.assoc_type = assoc_entity element0, %Final.decl [template = constants.%assoc0] // CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] {} {} -// CHECK:STDOUT: %.loc20: %.3 = assoc_entity element1, %Default.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc1: %Default.assoc_type = assoc_entity element1, %Default.decl [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Final = %.loc16 -// CHECK:STDOUT: .Default = %.loc20 +// CHECK:STDOUT: .Final = %assoc0 +// CHECK:STDOUT: .Default = %assoc1 // CHECK:STDOUT: witness = (%Final.decl, %Default.decl) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 6c5d689d04cde..778d3a2007c42 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -65,44 +65,44 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Simple.type.1: type = generic_interface_type @Simple [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %Simple: %Simple.type.1 = struct_value () [template] +// CHECK:STDOUT: %Simple.generic: %Simple.type.1 = struct_value () [template] // CHECK:STDOUT: %Simple.type.2: type = facet_type <@Simple, @Simple(%T.1)> [symbolic] // CHECK:STDOUT: %Self.1: %Simple.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %WithAssocFn.type.1: type = generic_interface_type @WithAssocFn [template] -// CHECK:STDOUT: %WithAssocFn: %WithAssocFn.type.1 = struct_value () [template] +// CHECK:STDOUT: %WithAssocFn.generic: %WithAssocFn.type.1 = struct_value () [template] // CHECK:STDOUT: %WithAssocFn.type.2: type = facet_type <@WithAssocFn, @WithAssocFn(%T.1)> [symbolic] // CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @WithAssocFn(%T.1) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %WithAssocFn.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %WithAssocFn.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Simple.type.3: type = facet_type <@Simple, @Simple(%C)> [template] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %interface.1: = interface_witness () [template] // CHECK:STDOUT: %WithAssocFn.type.3: type = facet_type <@WithAssocFn, @WithAssocFn(%C)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @WithAssocFn(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @WithAssocFn.%F.decl [template] -// CHECK:STDOUT: %.8: %WithAssocFn.type.2 = facet_value %C, %C [symbolic] -// CHECK:STDOUT: %.9: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %struct: %X = struct_value () [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, @WithAssocFn.%F.decl [template] +// CHECK:STDOUT: %WithAssocFn.facet: %WithAssocFn.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %X.val: %X = struct_value () [template] // CHECK:STDOUT: %N: %T.1 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T.1 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %WithImplicitArgs.type: type = generic_interface_type @WithImplicitArgs [template] -// CHECK:STDOUT: %WithImplicitArgs: %WithImplicitArgs.type = struct_value () [template] +// CHECK:STDOUT: %WithImplicitArgs.generic: %WithImplicitArgs.type = struct_value () [template] // CHECK:STDOUT: %T.2: %Simple.type.3 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Receive.type: type = fn_type @Receive [template] // CHECK:STDOUT: %Receive: %Receive.type = struct_value () [template] // CHECK:STDOUT: %Pass.type: type = fn_type @Pass [template] // CHECK:STDOUT: %Pass: %Pass.type = struct_value () [template] -// CHECK:STDOUT: %.11: = specific_function %Receive, @Receive(%T.2) [symbolic] +// CHECK:STDOUT: %Receive.specific_fn: = specific_function %Receive, @Receive(%T.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -115,7 +115,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .Receive = %Receive.decl // CHECK:STDOUT: .Pass = %Pass.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Simple.decl: %Simple.type.1 = interface_decl @Simple [template = constants.%Simple] { +// CHECK:STDOUT: %Simple.decl: %Simple.type.1 = interface_decl @Simple [template = constants.%Simple.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_18.1, runtime_param [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { @@ -123,7 +123,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.loc4_18.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_18.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} -// CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.1 = interface_decl @WithAssocFn [template = constants.%WithAssocFn] { +// CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.1 = interface_decl @WithAssocFn [template = constants.%WithAssocFn.generic] { // CHECK:STDOUT: %T.patt.loc8_23.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_23.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_23.1, runtime_param [symbolic = %T.patt.loc8_23.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { @@ -131,7 +131,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.loc8_23.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_23.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %WithImplicitArgs.decl: %WithImplicitArgs.type = interface_decl @WithImplicitArgs [template = constants.%WithImplicitArgs] { +// CHECK:STDOUT: %WithImplicitArgs.decl: %WithImplicitArgs.type = interface_decl @WithImplicitArgs [template = constants.%WithImplicitArgs.generic] { // CHECK:STDOUT: %T.patt.loc22_28.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_28.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc22_28.1, runtime_param [symbolic = %T.patt.loc22_28.2 (constants.%T.patt.1)] // CHECK:STDOUT: %N.patt.loc22_38.1: @WithImplicitArgs.%T.loc22_28.2 (%T.1) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)] @@ -147,7 +147,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc24_12.1: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_12.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Simple.type.3 = value_param_pattern %T.patt.loc24_12.1, runtime_param [symbolic = %T.patt.loc24_12.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] // CHECK:STDOUT: %T.param: %Simple.type.3 = value_param runtime_param @@ -157,7 +157,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc25_9.1: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Simple.type.3 = value_param_pattern %T.patt.loc25_9.1, runtime_param [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] // CHECK:STDOUT: %T.param: %Simple.type.3 = value_param runtime_param @@ -191,8 +191,8 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @WithAssocFn(%T.loc8_23.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @WithAssocFn.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc10_14.2: type = assoc_entity_type @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2), @WithAssocFn.%F.type (%F.type.1) [symbolic = %.loc10_14.2 (constants.%.3)] -// CHECK:STDOUT: %.loc10_14.3: @WithAssocFn.%.loc10_14.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.4)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2), @WithAssocFn.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc10_14.2: @WithAssocFn.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] @@ -204,11 +204,11 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_14.1: @WithAssocFn.%.loc10_14.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.4)] +// CHECK:STDOUT: %assoc0.loc10_14.1: @WithAssocFn.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc10_14.1 +// CHECK:STDOUT: .F = %assoc0.loc10_14.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -223,10 +223,10 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %Simple.type { -// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %WithAssocFn.type { @@ -238,39 +238,39 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.9] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type.1 = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn] +// CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type.1 = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %WithAssocFn.type: type = facet_type <@WithAssocFn, @WithAssocFn(constants.%C)> [template = constants.%WithAssocFn.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc20 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@WithAssocFn.%T.loc8_23.1: type, @WithAssocFn.%Self.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2)) { @@ -280,9 +280,9 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %X { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc17_15.2: init %X = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc17_16: init %X = converted %.loc17_15.1, %.loc17_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc17_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc17_15.2: init %X = class_init (), %return [template = constants.%X.val] +// CHECK:STDOUT: %.loc17_16: init %X = converted %.loc17_15.1, %.loc17_15.2 [template = constants.%X.val] // CHECK:STDOUT: return %.loc17_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -303,14 +303,14 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc25_9.2: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %.loc26_3.2 (constants.%.11)] +// CHECK:STDOUT: %Receive.specific_fn.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Simple.type.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive] // CHECK:STDOUT: %T.ref: %Simple.type.3 = name_ref T, %T.loc25_9.1 [symbolic = %T.loc25_9.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %.loc26_3.2 (constants.%.11)] -// CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %.loc26_3.1() +// CHECK:STDOUT: %Receive.specific_fn.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)] +// CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %Receive.specific_fn.loc26_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -355,11 +355,11 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Self.2 => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc10_14.2 => constants.%.6 -// CHECK:STDOUT: %.loc10_14.3 => constants.%.7 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc10_14.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C, constants.%.8) {} +// CHECK:STDOUT: specific @F.1(constants.%C, constants.%WithAssocFn.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @WithImplicitArgs(constants.%T.1, constants.%N) { // CHECK:STDOUT: %T.loc22_28.2 => constants.%T.1 @@ -391,12 +391,12 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.1: type = generic_interface_type @Generic [template] -// CHECK:STDOUT: %Generic: %Generic.type.1 = struct_value () [template] +// CHECK:STDOUT: %Generic.generic: %Generic.type.1 = struct_value () [template] // CHECK:STDOUT: %Generic.type.2: type = facet_type <@Generic, @Generic(%T.1)> [symbolic] // CHECK:STDOUT: %Self: %Generic.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %Generic.type.3: type = facet_type <@Generic, @Generic(%A)> [template] // CHECK:STDOUT: %T.2: %Generic.type.3 = bind_symbolic_name T, 0 [symbolic] @@ -418,7 +418,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl: %Generic.type.1 = interface_decl @Generic [template = constants.%Generic] { +// CHECK:STDOUT: %Generic.decl: %Generic.type.1 = interface_decl @Generic [template = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc4_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_19.1, runtime_param [symbolic = %T.patt.loc4_19.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { @@ -431,7 +431,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc9_6.1: %Generic.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Generic.type.3 = value_param_pattern %T.patt.loc9_6.1, runtime_param [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic] +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [template = constants.%Generic.type.3] // CHECK:STDOUT: %T.param: %Generic.type.3 = value_param runtime_param @@ -441,7 +441,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc10_6.1: %Generic.type.4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: %Generic.type.4 = value_param_pattern %T.patt.loc10_6.1, runtime_param [symbolic = %T.patt.loc10_6.2 (constants.%T.patt.3)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic] +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [template = constants.%Generic.type.4] // CHECK:STDOUT: %T.param: %Generic.type.4 = value_param runtime_param @@ -467,19 +467,19 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_6.1: %Generic.type.3) { 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 787a606ba78fb..47833724e71af 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 @@ -25,14 +25,14 @@ interface I { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%U [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc1: %assoc_type = assoc_entity element1, @I.%U [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type, %G.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element2, @I.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %assoc2: %G.assoc_type = assoc_entity element2, @I.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,9 +51,9 @@ interface I { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_8.2: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc12_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] -// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element1, %U [template = constants.%.4] +// CHECK:STDOUT: %assoc1: %assoc_type = assoc_entity element1, %U [template = constants.%assoc1] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt.loc16_8.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_8.1 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc16_8.2, runtime_param [symbolic = %T.patt.loc16_8.1 (constants.%T.patt)] @@ -61,13 +61,13 @@ interface I { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: %.5 = assoc_entity element2, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %assoc2: %G.assoc_type = assoc_entity element2, %G.decl [template = constants.%assoc2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 -// CHECK:STDOUT: .U = %.loc13 -// CHECK:STDOUT: .G = %.loc16 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .U = %assoc1 +// CHECK:STDOUT: .G = %assoc2 // CHECK:STDOUT: witness = (%F.decl, %U, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index f883094dbb021..681a212814f91 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -33,20 +33,20 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] -// CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.1 = struct_value () [template] // CHECK:STDOUT: %AddWith.type.2: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] // CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %AddWith.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @AddWith.%F.decl [symbolic] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %AddWith.type.2, %F.type [symbolic] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @AddWith.%F.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .AddWith = %AddWith.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %AddWith.decl: %AddWith.type.1 = interface_decl @AddWith [template = constants.%AddWith] { +// CHECK:STDOUT: %AddWith.decl: %AddWith.type.1 = interface_decl @AddWith [template = constants.%AddWith.generic] { // CHECK:STDOUT: %T.patt.loc4_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_19.1, runtime_param [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -64,17 +64,17 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T.loc4_19.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type) [symbolic = %.loc5_9.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_9.3: @AddWith.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type) [symbolic = %F.assoc_type (constants.%F.assoc_type)] +// CHECK:STDOUT: %assoc0.loc5_9.2: @AddWith.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @AddWith.%F.type (%F.type) = fn_decl @F [symbolic = @AddWith.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @AddWith.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] +// CHECK:STDOUT: %assoc0.loc5_9.1: @AddWith.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %.loc5_9.1 +// CHECK:STDOUT: .F = %assoc0.loc5_9.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -100,10 +100,10 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] -// CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.2: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -111,21 +111,21 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %AddWith.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %AddWith.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %AddWith.type.3: type = facet_type <@AddWith, @AddWith(%C)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @AddWith(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.7: %AddWith.type.2 = facet_value %C, %C [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %F.assoc_type.2 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %AddWith.type.1 = import_ref Main//a, inst+7, loaded [template = constants.%AddWith] +// CHECK:STDOUT: %import_ref.1: %AddWith.type.1 = import_ref Main//a, inst+7, loaded [template = constants.%AddWith.generic] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+14, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+20, unloaded // CHECK:STDOUT: %import_ref.4: @AddWith.%F.type (%F.type.1) = import_ref Main//a, inst+16, loaded [symbolic = @AddWith.%F (constants.%F.1)] @@ -141,7 +141,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref.loc7_6: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %AddWith.ref: %AddWith.type.1 = name_ref AddWith, imports.%import_ref.1 [template = constants.%AddWith] +// CHECK:STDOUT: %AddWith.ref: %AddWith.type.1 = name_ref AddWith, imports.%import_ref.1 [template = constants.%AddWith.generic] // CHECK:STDOUT: %C.ref.loc7_19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%C)> [template = constants.%AddWith.type.3] // CHECK:STDOUT: } @@ -156,8 +156,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @AddWith(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @AddWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type.1) [symbolic = %F.assoc_type (constants.%F.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @AddWith.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, imports.%import_ref.5 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -169,19 +169,19 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7_6 as %AddWith.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc7 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(constants.%T: type, constants.%Self.1: @AddWith.%AddWith.type (%AddWith.type.2)) { @@ -215,9 +215,9 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C, constants.%.7) {} +// CHECK:STDOUT: specific @F.1(constants.%C, constants.%AddWith.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index 62892ec8a8346..a39bb89a0c75d 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -53,35 +53,35 @@ interface A(T: type) {} // CHECK:STDOUT: %NotGenericNoParams.type: type = facet_type <@NotGenericNoParams> [template] // CHECK:STDOUT: %Self.1: %NotGenericNoParams.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %NotGenericButParams.type.1: type = generic_interface_type @NotGenericButParams [template] -// CHECK:STDOUT: %NotGenericButParams: %NotGenericButParams.type.1 = struct_value () [template] +// CHECK:STDOUT: %NotGenericButParams.generic: %NotGenericButParams.type.1 = struct_value () [template] // CHECK:STDOUT: %NotGenericButParams.type.2: type = facet_type <@NotGenericButParams> [template] // CHECK:STDOUT: %Self.2: %NotGenericButParams.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericAndParams.type.1: type = generic_interface_type @GenericAndParams.1 [template] -// CHECK:STDOUT: %GenericAndParams.1: %GenericAndParams.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.generic.1: %GenericAndParams.type.1 = struct_value () [template] // CHECK:STDOUT: %GenericAndParams.type.2: type = facet_type <@GenericAndParams.1, @GenericAndParams.1(%T)> [symbolic] // CHECK:STDOUT: %Self.3: %GenericAndParams.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %GenericNoParams.type.1: type = facet_type <@GenericNoParams> [template] // CHECK:STDOUT: %GenericNoParams.type.2: type = facet_type <@GenericNoParams, @GenericNoParams(%T)> [symbolic] // CHECK:STDOUT: %Self.4: %GenericNoParams.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %GenericAndParams.type.3: type = generic_interface_type @GenericAndParams.2, @C(%T) [symbolic] -// CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.3 = struct_value () [symbolic] +// CHECK:STDOUT: %GenericAndParams.generic.2: %GenericAndParams.type.3 = struct_value () [symbolic] // CHECK:STDOUT: %GenericAndParams.type.4: type = facet_type <@GenericAndParams.2, @GenericAndParams.2(%T, %U)> [symbolic] // CHECK:STDOUT: %Self.5: %GenericAndParams.type.4 = bind_symbolic_name Self, 2 [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: %GenericAndParams.type.5: type = facet_type <@GenericAndParams.1, @GenericAndParams.1(%X)> [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.type.6: type = generic_interface_type @GenericAndParams.2, @C(%X) [template] -// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.6 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.generic.3: %GenericAndParams.type.6 = struct_value () [template] // CHECK:STDOUT: %GenericAndParams.type.7: type = facet_type <@GenericAndParams.2, @GenericAndParams.2(%X, %X)> [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,15 +94,15 @@ interface A(T: type) {} // CHECK:STDOUT: .X = %X.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NotGenericNoParams.decl: type = interface_decl @NotGenericNoParams [template = constants.%NotGenericNoParams.type] {} {} -// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type.1 = interface_decl @NotGenericButParams [template = constants.%NotGenericButParams] {} {} -// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = interface_decl @GenericAndParams.1 [template = constants.%GenericAndParams.1] { +// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type.1 = interface_decl @NotGenericButParams [template = constants.%NotGenericButParams.generic] {} {} +// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = interface_decl @GenericAndParams.1 [template = constants.%GenericAndParams.generic.1] { // CHECK:STDOUT: %T.patt.loc6_28.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_28.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_28.1, runtime_param [symbolic = %T.patt.loc6_28.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_28.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_28.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_9.1, runtime_param [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -116,29 +116,29 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type.1 = name_ref NotGenericButParams, file.%NotGenericButParams.decl [template = constants.%NotGenericButParams] +// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type.1 = name_ref NotGenericButParams, file.%NotGenericButParams.decl [template = constants.%NotGenericButParams.generic] // CHECK:STDOUT: %NotGenericButParams.type: type = facet_type <@NotGenericButParams> [template = constants.%NotGenericButParams.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %X.ref.loc16_6: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.1 = name_ref GenericAndParams, file.%GenericAndParams.decl [template = constants.%GenericAndParams.1] +// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.1 = name_ref GenericAndParams, file.%GenericAndParams.decl [template = constants.%GenericAndParams.generic.1] // CHECK:STDOUT: %X.ref.loc16_28: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.1, @GenericAndParams.1(constants.%X)> [template = constants.%GenericAndParams.type.5] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %X.ref.loc17_6: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %X.ref.loc17_13: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.2] // CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%GenericNoParams.type.1] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %X.ref.loc18_6: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %X.ref.loc18_13: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3] -// CHECK:STDOUT: %.loc18_15: %GenericAndParams.type.6 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.3] -// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.6 = name_ref GenericAndParams, %.loc18_15 [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.2] +// CHECK:STDOUT: %.loc18: %GenericAndParams.type.6 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.generic.3] +// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.6 = name_ref GenericAndParams, %.loc18 [template = constants.%GenericAndParams.generic.3] // CHECK:STDOUT: %X.ref.loc18_33: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X)> [template = constants.%GenericAndParams.type.7] // CHECK:STDOUT: } @@ -211,38 +211,38 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %X.ref as %NotGenericNoParams.ref { -// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc14 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %X.ref as %NotGenericButParams.type { -// CHECK:STDOUT: %.loc15: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %X.ref.loc16_6 as %GenericAndParams.type { -// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %X.ref.loc17_6 as %GenericNoParams.ref { -// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: %X.ref.loc18_6 as %GenericAndParams.type { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc18_36 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc8_9.1: type) { @@ -251,33 +251,33 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type: type = generic_interface_type @GenericAndParams.2, @C(%T.loc8_9.2) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.3)] -// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.3) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.2)] +// CHECK:STDOUT: %GenericAndParams.generic: @C.%GenericAndParams.type (%GenericAndParams.type.3) = struct_value () [symbolic = %GenericAndParams.generic (constants.%GenericAndParams.generic.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GenericNoParams.decl: type = interface_decl @GenericNoParams [template = constants.%GenericNoParams.type.1] {} {} -// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.3) = interface_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams (constants.%GenericAndParams.2)] { +// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.3) = interface_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.2)] { // CHECK:STDOUT: %U.patt.loc10_30.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc10_30.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc10_30.1, runtime_param [symbolic = %U.patt.loc10_30.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc10_30.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc10_30.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 +// CHECK:STDOUT: .Self = constants.%C.1 // CHECK:STDOUT: .GenericNoParams = %GenericNoParams.decl // CHECK:STDOUT: .GenericAndParams = %GenericAndParams.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.1(constants.%T) { @@ -329,7 +329,7 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.6 -// CHECK:STDOUT: %GenericAndParams => constants.%GenericAndParams.3 +// CHECK:STDOUT: %GenericAndParams.generic => constants.%GenericAndParams.generic.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.2(constants.%X, constants.%X) { @@ -346,7 +346,7 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] -// CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] +// CHECK:STDOUT: %A.generic: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = facet_type <@A> [template] // CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } @@ -355,7 +355,7 @@ interface A(T: type) {} // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A] {} {} +// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A.generic] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { @@ -370,7 +370,7 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] -// CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] +// CHECK:STDOUT: %A.generic: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = facet_type <@A> [template] // CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } @@ -379,7 +379,7 @@ interface A(T: type) {} // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A] {} {} +// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A.generic] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index 85e780721c9b5..19ac006cf343c 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -55,21 +55,21 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Basic.type: type = facet_type <@Basic> [template] // CHECK:STDOUT: %Self.2: %Basic.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Basic.type, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Basic.%T [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %Basic.type, type [template] +// CHECK:STDOUT: %assoc0.1: %assoc_type.1 = assoc_entity element0, @Basic.%T [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Basic.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Basic.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc1.1: %F.assoc_type.1 = assoc_entity element1, @Basic.%F.decl [template] // CHECK:STDOUT: %ForwardDeclared.type: type = facet_type <@ForwardDeclared> [template] // CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ForwardDeclared.type, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @ForwardDeclared.%T [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %assoc0.2: %assoc_type.2 = assoc_entity element0, @ForwardDeclared.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, @ForwardDeclared.%F.decl [template] -// CHECK:STDOUT: %.9: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %assoc1.2: %F.assoc_type.2 = assoc_entity element1, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %struct_type.f.1: type = struct_type {.f: %ForwardDeclared.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,9 +83,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%Basic.type] {} {} // CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} // CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %.loc20: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%.9] -// CHECK:STDOUT: %f_ref.var: ref %.9 = var f_ref -// CHECK:STDOUT: %f_ref: ref %.9 = bind_name f_ref, %f_ref.var +// CHECK:STDOUT: %struct_type.f: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%struct_type.f.1] +// CHECK:STDOUT: %f_ref.var: ref %struct_type.f.1 = var f_ref +// CHECK:STDOUT: %f_ref: ref %struct_type.f.1 = bind_name f_ref, %f_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -99,28 +99,28 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: interface @Basic { // CHECK:STDOUT: %Self: %Basic.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %T [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element1, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %assoc1: %F.assoc_type.1 = assoc_entity element1, %F.decl [template = constants.%assoc1.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc8 -// CHECK:STDOUT: .F = %.loc9 +// CHECK:STDOUT: .T = %assoc0 +// CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: witness = (%T, %F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { // CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16: %.5 = assoc_entity element0, %T [template = constants.%.6] +// CHECK:STDOUT: %assoc0: %assoc_type.2 = assoc_entity element0, %T [template = constants.%assoc0.2] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: %.7 = assoc_entity element1, %F.decl [template = constants.%.8] +// CHECK:STDOUT: %assoc1: %F.assoc_type.2 = assoc_entity element1, %F.decl [template = constants.%assoc1.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc16 -// CHECK:STDOUT: .F = %.loc17 +// CHECK:STDOUT: .T = %assoc0 +// CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: witness = (%T, %F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,34 +152,34 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [template] // CHECK:STDOUT: %UseForwardDeclared: %UseForwardDeclared.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Basic.type, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %Basic.type, type [template] +// CHECK:STDOUT: %assoc0.1: %assoc_type.1 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Basic.type, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, imports.%import_ref.17 [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ForwardDeclared.type, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %F.assoc_type.1: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %assoc1.1: %F.assoc_type.1 = assoc_entity element1, imports.%import_ref.17 [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %assoc0.2: %assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.19 [template] -// CHECK:STDOUT: %.9: type = ptr_type %ForwardDeclared.type [template] -// CHECK:STDOUT: %.10: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %F.assoc_type.2: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %assoc1.2: %F.assoc_type.2 = assoc_entity element1, imports.%import_ref.19 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared.type [template] +// CHECK:STDOUT: %struct_type.f.1: type = struct_type {.f: %ForwardDeclared.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Empty.type] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%Basic.type] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+20, loaded [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %import_ref.4: ref %.10 = import_ref Main//a, inst+39, loaded +// CHECK:STDOUT: %import_ref.4: ref %struct_type.f.1 = import_ref Main//a, inst+39, loaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+3, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: %.1 = import_ref Main//a, inst+11, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.8: %.3 = import_ref Main//a, inst+18, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.7: %assoc_type.1 = import_ref Main//a, inst+11, loaded [template = constants.%assoc0.1] +// CHECK:STDOUT: %import_ref.8: %F.assoc_type.1 = import_ref Main//a, inst+18, loaded [template = constants.%assoc1.1] // CHECK:STDOUT: %import_ref.9 = import_ref Main//a, inst+9, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//a, inst+13, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst+22, unloaded -// CHECK:STDOUT: %import_ref.12: %.5 = import_ref Main//a, inst+26, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.13: %.7 = import_ref Main//a, inst+32, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.12: %assoc_type.2 = import_ref Main//a, inst+26, loaded [template = constants.%assoc0.2] +// CHECK:STDOUT: %import_ref.13: %F.assoc_type.2 = import_ref Main//a, inst+32, loaded [template = constants.%assoc1.2] // CHECK:STDOUT: %import_ref.14 = import_ref Main//a, inst+24, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//a, inst+28, unloaded // CHECK:STDOUT: } @@ -225,21 +225,21 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %f: %ForwardDeclared.type = bind_name f, %f.param // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] -// CHECK:STDOUT: %T.ref.loc10: %.1 = name_ref T, imports.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %UseBasicT: %.1 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%.2] +// CHECK:STDOUT: %T.ref.loc10: %assoc_type.1 = name_ref T, imports.%import_ref.7 [template = constants.%assoc0.1] +// CHECK:STDOUT: %UseBasicT: %assoc_type.1 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%assoc0.1] // CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] -// CHECK:STDOUT: %F.ref.loc11: %.3 = name_ref F, imports.%import_ref.8 [template = constants.%.4] -// CHECK:STDOUT: %UseBasicF: %.3 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc11: %F.assoc_type.1 = name_ref F, imports.%import_ref.8 [template = constants.%assoc1.1] +// CHECK:STDOUT: %UseBasicF: %F.assoc_type.1 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%assoc1.1] // CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %T.ref.loc13: %.5 = name_ref T, imports.%import_ref.12 [template = constants.%.6] -// CHECK:STDOUT: %UseForwardDeclaredT: %.5 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%.6] +// CHECK:STDOUT: %T.ref.loc13: %assoc_type.2 = name_ref T, imports.%import_ref.12 [template = constants.%assoc0.2] +// CHECK:STDOUT: %UseForwardDeclaredT: %assoc_type.2 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%assoc0.2] // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %F.ref.loc14: %.7 = name_ref F, imports.%import_ref.13 [template = constants.%.8] -// CHECK:STDOUT: %UseForwardDeclaredF: %.7 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%.8] +// CHECK:STDOUT: %F.ref.loc14: %F.assoc_type.2 = name_ref F, imports.%import_ref.13 [template = constants.%assoc1.2] +// CHECK:STDOUT: %UseForwardDeclaredF: %F.assoc_type.2 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%assoc1.2] // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %.loc16: type = ptr_type %ForwardDeclared.type [template = constants.%.9] -// CHECK:STDOUT: %f.var: ref %.9 = var f -// CHECK:STDOUT: %f: ref %.9 = bind_name f, %f.var +// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared.type [template = constants.%ptr] +// CHECK:STDOUT: %f.var: ref %ptr = var f +// CHECK:STDOUT: %f: ref %ptr = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -291,10 +291,10 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %f_ref.ref: ref %.10 = name_ref f_ref, imports.%import_ref.4 -// CHECK:STDOUT: %.loc16_33: ref %ForwardDeclared.type = struct_access %f_ref.ref, element0 -// CHECK:STDOUT: %.loc16_27: %.9 = addr_of %.loc16_33 -// CHECK:STDOUT: assign file.%f.var, %.loc16_27 +// CHECK:STDOUT: %f_ref.ref: ref %struct_type.f.1 = name_ref f_ref, imports.%import_ref.4 +// CHECK:STDOUT: %.loc16: ref %ForwardDeclared.type = struct_access %f_ref.ref, element0 +// CHECK:STDOUT: %addr: %ptr = addr_of %.loc16 +// CHECK:STDOUT: assign file.%f.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 937cba2f529d2..bc12998a115fe 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -418,7 +418,7 @@ private interface Redecl {} // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %.loc8: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } @@ -455,7 +455,7 @@ private interface Redecl {} // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %.loc10: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } @@ -490,7 +490,7 @@ private interface Redecl {} // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %.loc9: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 0c6c923bcbb7d..131b346937f8f 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -17,11 +17,11 @@ interface UseSelf { // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseSelf.type: type = facet_type <@UseSelf> [template] // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %UseSelf.type, %F.type [template] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,39 +34,39 @@ interface UseSelf { // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%.loc12_14.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%.loc12_14.1 (%.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc12_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_25.1: type = facet_access_type %Self.ref.loc12_25 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = %.loc12_14.1 (constants.%.1)] -// CHECK:STDOUT: %self.param: @F.%.loc12_14.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%.loc12_14.1 (%.1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.%.loc12_14.1 (%.1) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%.loc12_14.1 (%.1) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc12_25: type = facet_access_type %Self.ref.loc12_25 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc12_25: type = converted %Self.ref.loc12_25, %Self.as_type.loc12_25 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc12_14.1 (%Self.as_type) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%Self.as_type.loc12_14.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc12 +// CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc12_14.1 (%.1)]() -> @F.%.loc12_14.1 (%.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type)]() -> @F.%Self.as_type.loc12_14.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index d5650d15782d5..032bbe8cb3e82 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -189,16 +189,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %Foo.type.2: type = facet_type <@Foo, @Foo(%a)> [symbolic] // CHECK:STDOUT: %Self.1: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Bar.type.1: type = generic_interface_type @Bar [template] -// CHECK:STDOUT: %Bar: %Bar.type.1 = struct_value () [template] +// CHECK:STDOUT: %Bar.generic: %Bar.type.1 = struct_value () [template] // CHECK:STDOUT: %Bar.type.2: type = facet_type <@Bar, @Bar(%a)> [symbolic] // CHECK:STDOUT: %Self.2: %Bar.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -213,7 +213,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -221,7 +221,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -229,7 +229,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar] { +// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc10_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc10_15.1, runtime_param [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -237,7 +237,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param // CHECK:STDOUT: %a.loc10_15.1: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.loc10_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar] { +// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc10_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc10_15.1, runtime_param [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -282,11 +282,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -313,12 +313,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %Foo.type.2: type = facet_type <@Foo, @Foo(%a)> [symbolic] // CHECK:STDOUT: %Self: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -329,7 +329,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_21.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_21.1, runtime_param [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -337,7 +337,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_21.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_21.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_21.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_21.1, runtime_param [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -365,11 +365,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -386,14 +386,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -404,7 +404,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -412,7 +412,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc14_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_15.1, runtime_param [symbolic = %a.patt.loc14_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -447,11 +447,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -473,12 +473,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %Foo.type.2: type = facet_type <@Foo, @Foo(%a)> [symbolic] // CHECK:STDOUT: %Self: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -489,7 +489,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -497,7 +497,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -525,11 +525,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -546,14 +546,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] -// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] +// CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -566,7 +566,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -574,7 +574,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl: %Bar.type = interface_decl @Bar [template = constants.%Bar] { +// CHECK:STDOUT: %Bar.decl: %Bar.type = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc8_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8_15.1, runtime_param [symbolic = %a.patt.loc8_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -599,11 +599,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -620,20 +620,20 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] -// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] +// CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template] // CHECK:STDOUT: %.type.3: type = generic_interface_type @.2 [template] -// CHECK:STDOUT: %.4: %.type.3 = struct_value () [template] +// CHECK:STDOUT: %.generic.2: %.type.3 = struct_value () [template] // CHECK:STDOUT: %.type.4: type = facet_type <@.2, @.2(%a)> [symbolic] // CHECK:STDOUT: %Self.2: %.type.4 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -641,9 +641,9 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//two_file, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//two_file, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: %Foo.type = import_ref Main//two_file, inst+15, loaded [template = constants.%Foo] -// CHECK:STDOUT: %import_ref.4: %Bar.type = import_ref Main//two_file, inst+26, loaded [template = constants.%Bar] -// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: %Foo.type = import_ref Main//two_file, inst+15, loaded [template = constants.%Foo.generic] +// CHECK:STDOUT: %import_ref.4: %Bar.type = import_ref Main//two_file, inst+26, loaded [template = constants.%Bar.generic] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -656,7 +656,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %.decl.loc12: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl.loc12: %.type.1 = interface_decl @.1 [template = constants.%.generic.1] { // CHECK:STDOUT: %a.patt.loc12_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc12_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc12_15.1, runtime_param [symbolic = %a.patt.loc12_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -664,7 +664,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc12_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc12_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.4] { +// CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.generic.2] { // CHECK:STDOUT: %a.patt.loc21_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc21_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc21_15.1, runtime_param [symbolic = %a.patt.loc21_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -762,16 +762,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%b)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -785,7 +785,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -793,7 +793,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %b.patt.loc15_15.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_15.1, runtime_param [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: } { @@ -828,11 +828,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -854,14 +854,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -875,7 +875,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -883,7 +883,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -918,11 +918,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -944,14 +944,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -965,7 +965,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -973,7 +973,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -1008,11 +1008,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -1034,12 +1034,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1048,7 +1048,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -1066,11 +1066,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { @@ -1082,22 +1082,22 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//alias_two_file, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: %Foo.type = import_ref Main//alias_two_file, inst+13, loaded [template = constants.%Foo] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: %Foo.type = import_ref Main//alias_two_file, inst+13, loaded [template = constants.%Foo.generic] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//alias_two_file, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//alias_two_file, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1111,7 +1111,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc17_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -1170,15 +1170,15 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = const_type %C [template] -// CHECK:STDOUT: %a: %.3 = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %a.patt: %.3 = symbolic_binding_pattern a, 0 [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %const: type = const_type %C [template] +// CHECK:STDOUT: %a: %const = bind_symbolic_name a, 0 [symbolic] +// CHECK:STDOUT: %a.patt: %const = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.generic: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = facet_type <@.1, @.1(%a)> [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -1189,37 +1189,37 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %a.patt.loc6_15.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] +// CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo.generic] { +// CHECK:STDOUT: %a.patt.loc6_15.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param -// CHECK:STDOUT: %a.loc6_15.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %a.loc6_15.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %a.patt.loc17_15.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] -// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { +// CHECK:STDOUT: %a.patt.loc17_15.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc17_26: type = const_type %C [template = constants.%.3] -// CHECK:STDOUT: %.loc17_19: type = const_type %.3 [template = constants.%.3] -// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param -// CHECK:STDOUT: %a.loc17_15.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc17_15.2 (constants.%a)] +// CHECK:STDOUT: %const.loc17_26: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc17_19: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %a.loc17_15.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc17_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Foo(%a.loc6_15.1: %.3) { -// CHECK:STDOUT: %a.loc6_15.2: %.3 = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.2 (constants.%a)] -// CHECK:STDOUT: %a.patt.loc6_15.2: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] +// CHECK:STDOUT: generic interface @Foo(%a.loc6_15.1: %const) { +// CHECK:STDOUT: %a.loc6_15.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.2 (constants.%a)] +// CHECK:STDOUT: %a.patt.loc6_15.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: interface; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @.1(%a.loc17_15.1: %.3) { -// CHECK:STDOUT: %a.loc17_15.2: %.3 = bind_symbolic_name a, 0 [symbolic = %a.loc17_15.2 (constants.%a)] -// CHECK:STDOUT: %a.patt.loc17_15.2: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] +// CHECK:STDOUT: generic interface @.1(%a.loc17_15.1: %const) { +// CHECK:STDOUT: %a.loc17_15.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc17_15.2 (constants.%a)] +// CHECK:STDOUT: %a.patt.loc17_15.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.type: type = facet_type <@.1, @.1(%a.loc17_15.2)> [symbolic = %.type (constants.%.type.2)] @@ -1235,11 +1235,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 4a1e3d1ebb291..97c8f2c913b7b 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -26,30 +26,30 @@ interface I { // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%G.decl [template] +// CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, @I.%G.decl [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element2, @I.%T [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, @I.%T [template] +// CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.3) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.3) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.36: type = assoc_entity_type %I.type, %i32 [template] -// CHECK:STDOUT: %.37: %.36 = assoc_entity element3, @I.%N [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] +// CHECK:STDOUT: %assoc3: %assoc_type.2 = assoc_entity element3, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,7 +73,7 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc13: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -82,18 +82,18 @@ interface I { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed.loc14_11, %.loc14_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%.loc14_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_signed.loc14_19, %.loc14_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%.loc14_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.2: type = value_of_initializer %int.make_type_signed.loc14_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.3: type = converted %int.make_type_signed.loc14_27, %.loc14_27.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed.loc14_11, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%int_32.loc14_19) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14_19, %.loc14_19.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%int_32.loc14_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed.loc14_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed.loc14_27, %.loc14_27.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -101,11 +101,11 @@ interface I { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] -// CHECK:STDOUT: %.loc18_19: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc18_19: init type = call constants.%Int(%.loc18_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc18_24: init type = call constants.%Int(%.loc18_24) [template = constants.%i32] +// CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] +// CHECK:STDOUT: %int_32.loc18_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_19: init type = call constants.%Int(%int_32.loc18_19) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_24: init type = call constants.%Int(%int_32.loc18_24) [template = constants.%i32] // CHECK:STDOUT: %.loc18_27: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_19, %int.make_type_signed.loc18_24) // CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_signed.loc18_19 [template = constants.%i32] // CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_signed.loc18_19, %.loc18_28.1 [template = constants.%i32] @@ -113,27 +113,27 @@ interface I { // CHECK:STDOUT: %.loc18_28.4: type = converted %int.make_type_signed.loc18_24, %.loc18_28.3 [template = constants.%i32] // CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_28.6: %.6 = assoc_entity element2, %T [template = constants.%.7] -// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed.loc19, %.loc19_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17: Core.IntLiteral = int_value 42 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.2(constants.%.3) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.35] -// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] -// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.35] +// CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, %T [template = constants.%assoc2] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed.loc19, %.loc19_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_42) [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_42.2] +// CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int_42, %.loc19_19.1 [template = constants.%int_42.2] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc19_19.6: %.36 = assoc_entity element3, %N [template = constants.%.37] +// CHECK:STDOUT: %assoc3: %assoc_type.2 = assoc_entity element3, %N [template = constants.%assoc3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = %.loc13 -// CHECK:STDOUT: .G = %.loc14 -// CHECK:STDOUT: .T = %.loc18_28.6 -// CHECK:STDOUT: .N = %.loc19_19.6 +// CHECK:STDOUT: .F = %assoc0 +// CHECK:STDOUT: .G = %assoc1 +// CHECK:STDOUT: .T = %assoc2 +// CHECK:STDOUT: .N = %assoc3 // CHECK:STDOUT: witness = (%F.decl, %G.decl, %T, %N) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index e0c0398b4087d..19df3cd53b8ee 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -15,23 +15,23 @@ 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: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,43 +54,43 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_14: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc11_14 br !if.then.loc11_18 else br !if.else.loc11_18 +// CHECK:STDOUT: %true.loc11_14: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc11_14 br !if.then.loc11_18 else br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_18: -// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_29: init type = call constants.%Int(%.loc11_29.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.2: type = value_of_initializer %int.make_type_signed.loc11_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.3: type = converted %int.make_type_signed.loc11_29, %.loc11_29.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_29: init type = call constants.%Int(%int_32.loc11_29) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_signed.loc11_29 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_signed.loc11_29, %.loc11_29.1 [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_26: ref %i32 = var n // CHECK:STDOUT: %n.loc11_26: ref %i32 = bind_name n, %n.var.loc11_26 -// CHECK:STDOUT: %.loc11_35: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.2: = bound_method %.loc11_35, %.loc11_36.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_36.3: = specific_function %.loc11_36.2, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %.loc11_36.3(%.loc11_35) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_36.4: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_36 [template = constants.%.30] -// CHECK:STDOUT: assign %n.var.loc11_26, %.loc11_36.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc11_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_36: = bound_method %int_1, %impl.elem0.loc11_36 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_36: = specific_function %Convert.bound.loc11_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %Convert.specific_fn.loc11_36(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_36: init %i32 = converted %int_1, %int.convert_checked.loc11_36 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %n.var.loc11_26, %.loc11_36 // CHECK:STDOUT: br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11_18: -// CHECK:STDOUT: %.loc11_44: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc11_44 br !if.then.loc11_48 else br !if.else.loc11_48 +// CHECK:STDOUT: %true.loc11_44: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc11_44 br !if.then.loc11_48 else br !if.else.loc11_48 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_48: -// CHECK:STDOUT: %.loc11_59.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_59: init type = call constants.%Int(%.loc11_59.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_59.2: type = value_of_initializer %int.make_type_signed.loc11_59 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_59.3: type = converted %int.make_type_signed.loc11_59, %.loc11_59.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_59: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_59: init type = call constants.%Int(%int_32.loc11_59) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_59.1: type = value_of_initializer %int.make_type_signed.loc11_59 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_59.2: type = converted %int.make_type_signed.loc11_59, %.loc11_59.1 [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_56: ref %i32 = var n // CHECK:STDOUT: %n.loc11_56: ref %i32 = bind_name n, %n.var.loc11_56 -// CHECK:STDOUT: %.loc11_65: Core.IntLiteral = int_value 2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_66.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_66.2: = bound_method %.loc11_65, %.loc11_66.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_66.3: = specific_function %.loc11_66.2, @Convert.2(constants.%.2) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %.loc11_66.3(%.loc11_65) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_66.4: init %i32 = converted %.loc11_65, %int.convert_checked.loc11_66 [template = constants.%.34] -// CHECK:STDOUT: assign %n.var.loc11_56, %.loc11_66.4 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc11_66: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_66: = bound_method %int_2, %impl.elem0.loc11_66 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_66: = specific_function %Convert.bound.loc11_66, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %Convert.specific_fn.loc11_66(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_66: init %i32 = converted %int_2, %int.convert_checked.loc11_66 [template = constants.%int_2.2] +// CHECK:STDOUT: assign %n.var.loc11_56, %.loc11_66 // CHECK:STDOUT: br !if.else.loc11_48 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11_48: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 82b5b50675930..70f9880b45cc6 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -170,8 +170,8 @@ impl i32 as Empty { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -206,13 +206,13 @@ impl i32 as Empty { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_18: %empty_tuple.type = converted %.loc10_17, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc10_18 -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .x = %x -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %empty_tuple.type { @@ -229,8 +229,8 @@ impl i32 as Empty { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -265,13 +265,13 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %empty_tuple.type { @@ -293,15 +293,15 @@ impl i32 as Empty { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %tuple.2: %tuple.type.3 = tuple_value (%empty_tuple, %empty_tuple) [template] // CHECK:STDOUT: %c: %tuple.type.3 = bind_symbolic_name c, 1 [symbolic] -// CHECK:STDOUT: %.5: %empty_tuple.type = tuple_access %b, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem0.1: %empty_tuple.type = tuple_access %b, element0 [symbolic] // CHECK:STDOUT: %tuple.3: %tuple.type.1 = tuple_value (%empty_tuple) [template] -// CHECK:STDOUT: %.6: %empty_tuple.type = tuple_access %c, element0 [symbolic] -// CHECK:STDOUT: %.7: %empty_tuple.type = tuple_access %c, element1 [symbolic] +// CHECK:STDOUT: %tuple.elem0.2: %empty_tuple.type = tuple_access %c, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem1: %empty_tuple.type = tuple_access %c, element1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -359,14 +359,14 @@ impl i32 as Empty { // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc22_37.2, %.loc22_37.3, %.loc22_37.4) [template = constants.%tuple.1] // CHECK:STDOUT: %.loc22_38: %tuple.type.2 = converted %.loc22_37.1, %tuple [template = constants.%tuple.1] // CHECK:STDOUT: %d: %tuple.type.2 = bind_name d, %.loc22_38 -// CHECK:STDOUT: %.loc23: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .d = %d -// CHECK:STDOUT: complete_type_witness = %.loc23 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%b.loc10_8.2: %tuple.type.1) { @@ -375,9 +375,9 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %c.loc11_9.2: %tuple.type.3 = bind_symbolic_name c, 1 [symbolic = %c.loc11_9.2 (constants.%c)] -// CHECK:STDOUT: %.loc14_21.6: %empty_tuple.type = tuple_access %b.loc10_8.1, element0 [symbolic = %.loc14_21.6 (constants.%.5)] -// CHECK:STDOUT: %.loc15_24.10: %empty_tuple.type = tuple_access %c.loc11_9.2, element0 [symbolic = %.loc15_24.10 (constants.%.6)] -// CHECK:STDOUT: %.loc15_24.11: %empty_tuple.type = tuple_access %c.loc11_9.2, element1 [symbolic = %.loc15_24.11 (constants.%.7)] +// CHECK:STDOUT: %tuple.elem0.loc14_21.3: %empty_tuple.type = tuple_access %b.loc10_8.1, element0 [symbolic = %tuple.elem0.loc14_21.3 (constants.%tuple.elem0.1)] +// CHECK:STDOUT: %tuple.elem0.loc15_24.3: %empty_tuple.type = tuple_access %c.loc11_9.2, element0 [symbolic = %tuple.elem0.loc15_24.3 (constants.%tuple.elem0.2)] +// CHECK:STDOUT: %tuple.elem1.loc15_24.3: %empty_tuple.type = tuple_access %c.loc11_9.2, element1 [symbolic = %tuple.elem1.loc15_24.3 (constants.%tuple.elem1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%b.param_patt: %tuple.type.1) { // CHECK:STDOUT: !entry: @@ -412,12 +412,12 @@ impl i32 as Empty { // CHECK:STDOUT: %b1.var: ref %tuple.type.1 = var b1 // CHECK:STDOUT: %b1: ref %tuple.type.1 = bind_name b1, %b1.var // CHECK:STDOUT: %b.ref: %tuple.type.1 = name_ref b, %b.loc10_8.2 [symbolic = %b.loc10_8.1 (constants.%b)] -// CHECK:STDOUT: %.loc14_21.1: %empty_tuple.type = tuple_access %b.ref, element0 [symbolic = %.loc14_21.6 (constants.%.5)] -// CHECK:STDOUT: %.loc14_21.2: ref %empty_tuple.type = tuple_access %b1.var, element0 -// CHECK:STDOUT: %.loc14_21.3: init %empty_tuple.type = tuple_init () to %.loc14_21.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc14_21.4: init %empty_tuple.type = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc14_21.5: init %tuple.type.1 = tuple_init (%.loc14_21.4) to %b1.var [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc14_22: init %tuple.type.1 = converted %b.ref, %.loc14_21.5 [template = constants.%tuple.3] +// CHECK:STDOUT: %tuple.elem0.loc14_21.1: %empty_tuple.type = tuple_access %b.ref, element0 [symbolic = %tuple.elem0.loc14_21.3 (constants.%tuple.elem0.1)] +// CHECK:STDOUT: %tuple.elem0.loc14_21.2: ref %empty_tuple.type = tuple_access %b1.var, element0 +// CHECK:STDOUT: %.loc14_21.1: init %empty_tuple.type = tuple_init () to %tuple.elem0.loc14_21.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.2: init %empty_tuple.type = converted %tuple.elem0.loc14_21.1, %.loc14_21.1 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.3: init %tuple.type.1 = tuple_init (%.loc14_21.2) to %b1.var [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc14_22: init %tuple.type.1 = converted %b.ref, %.loc14_21.3 [template = constants.%tuple.3] // CHECK:STDOUT: assign %b1.var, %.loc14_22 // CHECK:STDOUT: %.loc15_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_19: %empty_tuple.type = tuple_literal () @@ -428,16 +428,16 @@ impl i32 as Empty { // CHECK:STDOUT: %c1.var: ref %tuple.type.3 = var c1 // CHECK:STDOUT: %c1: ref %tuple.type.3 = bind_name c1, %c1.var // CHECK:STDOUT: %c.ref: %tuple.type.3 = name_ref c, %c.loc11_9.1 [symbolic = %c.loc11_9.2 (constants.%c)] -// CHECK:STDOUT: %.loc15_24.1: %empty_tuple.type = tuple_access %c.ref, element0 [symbolic = %.loc15_24.10 (constants.%.6)] -// CHECK:STDOUT: %.loc15_24.2: ref %empty_tuple.type = tuple_access %c1.var, element0 -// CHECK:STDOUT: %.loc15_24.3: init %empty_tuple.type = tuple_init () to %.loc15_24.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_24.4: init %empty_tuple.type = converted %.loc15_24.1, %.loc15_24.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_24.5: %empty_tuple.type = tuple_access %c.ref, element1 [symbolic = %.loc15_24.11 (constants.%.7)] -// CHECK:STDOUT: %.loc15_24.6: ref %empty_tuple.type = tuple_access %c1.var, element1 -// CHECK:STDOUT: %.loc15_24.7: init %empty_tuple.type = tuple_init () to %.loc15_24.6 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_24.8: init %empty_tuple.type = converted %.loc15_24.5, %.loc15_24.7 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_24.9: init %tuple.type.3 = tuple_init (%.loc15_24.4, %.loc15_24.8) to %c1.var [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc15_25: init %tuple.type.3 = converted %c.ref, %.loc15_24.9 [template = constants.%tuple.2] +// CHECK:STDOUT: %tuple.elem0.loc15_24.1: %empty_tuple.type = tuple_access %c.ref, element0 [symbolic = %tuple.elem0.loc15_24.3 (constants.%tuple.elem0.2)] +// CHECK:STDOUT: %tuple.elem0.loc15_24.2: ref %empty_tuple.type = tuple_access %c1.var, element0 +// CHECK:STDOUT: %.loc15_24.1: init %empty_tuple.type = tuple_init () to %tuple.elem0.loc15_24.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.2: init %empty_tuple.type = converted %tuple.elem0.loc15_24.1, %.loc15_24.1 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple.elem1.loc15_24.1: %empty_tuple.type = tuple_access %c.ref, element1 [symbolic = %tuple.elem1.loc15_24.3 (constants.%tuple.elem1)] +// CHECK:STDOUT: %tuple.elem1.loc15_24.2: ref %empty_tuple.type = tuple_access %c1.var, element1 +// CHECK:STDOUT: %.loc15_24.3: init %empty_tuple.type = tuple_init () to %tuple.elem1.loc15_24.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.4: init %empty_tuple.type = converted %tuple.elem1.loc15_24.1, %.loc15_24.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.5: init %tuple.type.3 = tuple_init (%.loc15_24.2, %.loc15_24.4) to %c1.var [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc15_25: init %tuple.type.3 = converted %c.ref, %.loc15_24.5 [template = constants.%tuple.2] // CHECK:STDOUT: assign %c1.var, %.loc15_25 // CHECK:STDOUT: %.loc16_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_19: %empty_tuple.type = tuple_literal () @@ -450,20 +450,20 @@ impl i32 as Empty { // CHECK:STDOUT: %d1.var: ref %tuple.type.2 = var d1 // CHECK:STDOUT: %d1: ref %tuple.type.2 = bind_name d1, %d1.var // CHECK:STDOUT: %d.ref: %tuple.type.2 = name_ref d, @C.%d -// CHECK:STDOUT: %.loc16_28.1: %empty_tuple.type = tuple_access %d.ref, element0 -// CHECK:STDOUT: %.loc16_28.2: ref %empty_tuple.type = tuple_access %d1.var, element0 -// CHECK:STDOUT: %.loc16_28.3: init %empty_tuple.type = tuple_init () to %.loc16_28.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.4: init %empty_tuple.type = converted %.loc16_28.1, %.loc16_28.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.5: %empty_tuple.type = tuple_access %d.ref, element1 -// CHECK:STDOUT: %.loc16_28.6: ref %empty_tuple.type = tuple_access %d1.var, element1 -// CHECK:STDOUT: %.loc16_28.7: init %empty_tuple.type = tuple_init () to %.loc16_28.6 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.8: init %empty_tuple.type = converted %.loc16_28.5, %.loc16_28.7 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.9: %empty_tuple.type = tuple_access %d.ref, element2 -// CHECK:STDOUT: %.loc16_28.10: ref %empty_tuple.type = tuple_access %d1.var, element2 -// CHECK:STDOUT: %.loc16_28.11: init %empty_tuple.type = tuple_init () to %.loc16_28.10 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.12: init %empty_tuple.type = converted %.loc16_28.9, %.loc16_28.11 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_28.13: init %tuple.type.2 = tuple_init (%.loc16_28.4, %.loc16_28.8, %.loc16_28.12) to %d1.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_29: init %tuple.type.2 = converted %d.ref, %.loc16_28.13 [template = constants.%tuple.1] +// CHECK:STDOUT: %tuple.elem0.loc16_28.1: %empty_tuple.type = tuple_access %d.ref, element0 +// CHECK:STDOUT: %tuple.elem0.loc16_28.2: ref %empty_tuple.type = tuple_access %d1.var, element0 +// CHECK:STDOUT: %.loc16_28.1: init %empty_tuple.type = tuple_init () to %tuple.elem0.loc16_28.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.2: init %empty_tuple.type = converted %tuple.elem0.loc16_28.1, %.loc16_28.1 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple.elem1.loc16_28.1: %empty_tuple.type = tuple_access %d.ref, element1 +// CHECK:STDOUT: %tuple.elem1.loc16_28.2: ref %empty_tuple.type = tuple_access %d1.var, element1 +// CHECK:STDOUT: %.loc16_28.3: init %empty_tuple.type = tuple_init () to %tuple.elem1.loc16_28.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.4: init %empty_tuple.type = converted %tuple.elem1.loc16_28.1, %.loc16_28.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple.elem2.loc16_28.1: %empty_tuple.type = tuple_access %d.ref, element2 +// CHECK:STDOUT: %tuple.elem2.loc16_28.2: ref %empty_tuple.type = tuple_access %d1.var, element2 +// CHECK:STDOUT: %.loc16_28.5: init %empty_tuple.type = tuple_init () to %tuple.elem2.loc16_28.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.6: init %empty_tuple.type = converted %tuple.elem2.loc16_28.1, %.loc16_28.5 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.7: init %tuple.type.2 = tuple_init (%.loc16_28.2, %.loc16_28.4, %.loc16_28.6) to %d1.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc16_29: init %tuple.type.2 = converted %d.ref, %.loc16_28.7 [template = constants.%tuple.1] // CHECK:STDOUT: assign %d1.var, %.loc16_29 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -481,8 +481,8 @@ impl i32 as Empty { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -515,13 +515,13 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc14_12.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .x = %x -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %empty_tuple.type { @@ -535,20 +535,20 @@ impl i32 as Empty { // CHECK:STDOUT: --- use_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -571,10 +571,10 @@ impl i32 as Empty { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -582,18 +582,18 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.3: type = converted %int.make_type_signed.loc5, %.loc5_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_21.2: = bound_method %.loc5_20, %.loc5_21.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_21.3: = specific_function %.loc5_21.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_21.3(%.loc5_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc5_21.5: %i32 = converted %.loc5_20, %.loc5_21.4 [template = constants.%.29] -// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc5_21.5 [symbolic = constants.%Zero] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_21.2: %i32 = converted %int_0, %.loc5_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc5_21.2 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: %i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref // CHECK:STDOUT: } @@ -601,26 +601,26 @@ impl i32 as Empty { // CHECK:STDOUT: --- use_in_block.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -642,10 +642,10 @@ impl i32 as Empty { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -653,34 +653,34 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc5 br !if.then else br !if.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc6_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_16.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_16.3: type = converted %int.make_type_signed.loc6, %.loc6_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_23.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_23.2: = bound_method %.loc6_22, %.loc6_23.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_23.3: = specific_function %.loc6_23.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_23.3(%.loc6_22) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_23.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_23.5: %i32 = converted %.loc6_22, %.loc6_23.4 [template = constants.%.30] -// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc6_23.5 [symbolic = constants.%Zero] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_signed.loc6, %.loc6_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_0, %impl.elem0.loc6 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_23.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_23.2: %i32 = converted %int_0, %.loc6_23.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc6_23.2 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: %i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc9_10: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_11.2: = bound_method %.loc9_10, %.loc9_11.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_11.3: = specific_function %.loc9_11.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_11.3(%.loc9_10) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_11.4: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_11.5: %i32 = converted %.loc9_10, %.loc9_11.4 [template = constants.%.34] -// CHECK:STDOUT: return %.loc9_11.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_11.1: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_11.2: %i32 = converted %int_1, %.loc9_11.1 [template = constants.%int_1.2] +// CHECK:STDOUT: return %.loc9_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_return_in_interface.carbon @@ -688,16 +688,16 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %assoc0.1: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.27: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.28: %.27 = assoc_entity element1, @I.%F.decl [template] +// CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %assoc1: %F.assoc_type = assoc_entity element1, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -720,27 +720,27 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc5_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_signed, %.loc5_21.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc5_21.3: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0.1] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, @I.%.loc5_21.3 [template = constants.%.3] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @I.%assoc0 [template = constants.%assoc0.1] // CHECK:STDOUT: %.loc13: type = converted %T.ref, [template = ] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.27 = assoc_entity element1, %F.decl [template = constants.%.28] +// CHECK:STDOUT: %assoc1: %F.assoc_type = assoc_entity element1, %F.decl [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc5_21.3 -// CHECK:STDOUT: .F = %.loc13 +// CHECK:STDOUT: .T = %assoc0 +// CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: witness = (%T, %F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -755,14 +755,14 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I: type = class_type @I [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -783,8 +783,8 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @I { -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc9_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed, %.loc9_21.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_name T, %.loc9_21.2 @@ -796,13 +796,13 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%I // CHECK:STDOUT: .T = %T // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> ; @@ -810,10 +810,10 @@ impl i32 as Empty { // CHECK:STDOUT: --- fail_return_in_package_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -847,8 +847,8 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 @@ -860,19 +860,19 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [template] // CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: = interface_witness () [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.10: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -892,10 +892,10 @@ impl i32 as Empty { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc6_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_6.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_6.3: type = converted %int.make_type_signed.loc6, %.loc6_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_6.2: type = converted %int.make_type_signed.loc6, %.loc6_6.1 [template = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -908,23 +908,23 @@ impl i32 as Empty { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc6_6.3 as %Empty.ref { -// CHECK:STDOUT: %.loc10_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_14.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_14.3: type = converted %int.make_type_signed.loc10, %.loc10_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.2: = bound_method %.loc10_20, %.loc10_21.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_21.3: = specific_function %.loc10_21.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_21.3(%.loc10_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.5: %i32 = converted %.loc10_20, %.loc10_21.4 [template = constants.%.29] -// CHECK:STDOUT: %Zero: %i32 = bind_name Zero, %.loc10_21.5 -// CHECK:STDOUT: %.loc6_19: = interface_witness () [template = constants.%.30] +// CHECK:STDOUT: impl @impl.1: %.loc6_6.2 as %Empty.ref { +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_signed.loc10, %.loc10_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_0, %.loc10_21.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %Zero: %i32 = bind_name Zero, %.loc10_21.2 +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero -// CHECK:STDOUT: witness = %.loc6_19 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index bed13aa7b0619..204a672125d8a 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -18,32 +18,32 @@ fn F() -> i32 { // CHECK:STDOUT: --- convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.36: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.32, %.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,10 +65,10 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -76,12 +76,12 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%.loc12_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_16: init type = call constants.%Int(%.loc12_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_21: init type = call constants.%Int(%.loc12_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%int_32.loc12_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_16: init type = call constants.%Int(%int_32.loc12_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_21: init type = call constants.%Int(%int_32.loc12_21) [template = constants.%i32] // CHECK:STDOUT: %.loc12_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_11, %int.make_type_signed.loc12_16, %int.make_type_signed.loc12_21) // CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_signed.loc12_11 [template = constants.%i32] // CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_signed.loc12_11, %.loc12_24.2 [template = constants.%i32] @@ -92,40 +92,40 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_24.8: type = converted %.loc12_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v // CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_32: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_35: Core.IntLiteral = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_36.1: %tuple.type.3 = tuple_literal (%.loc12_29, %.loc12_32, %.loc12_35) -// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_29, %.loc12_36.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %.loc12_36.4(%.loc12_29) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_36.5: init %i32 = converted %.loc12_29, %int.convert_checked.loc12_36.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_36.6: ref %i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc12_36.7: init %i32 = initialize_from %.loc12_36.5 to %.loc12_36.6 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_36.8: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.9: = bound_method %.loc12_32, %.loc12_36.8 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_36.10: = specific_function %.loc12_36.9, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %.loc12_36.10(%.loc12_32) [template = constants.%.35] -// CHECK:STDOUT: %.loc12_36.11: init %i32 = converted %.loc12_32, %int.convert_checked.loc12_36.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_36.12: ref %i32 = tuple_access %v.var, element1 -// CHECK:STDOUT: %.loc12_36.13: init %i32 = initialize_from %.loc12_36.11 to %.loc12_36.12 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_36.14: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.15: = bound_method %.loc12_35, %.loc12_36.14 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_36.16: = specific_function %.loc12_36.15, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %.loc12_36.16(%.loc12_35) [template = constants.%.38] -// CHECK:STDOUT: %.loc12_36.17: init %i32 = converted %.loc12_35, %int.convert_checked.loc12_36.3 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_36.18: ref %i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc12_36.19: init %i32 = initialize_from %.loc12_36.17 to %.loc12_36.18 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_36.20: init %tuple.type.2 = tuple_init (%.loc12_36.7, %.loc12_36.13, %.loc12_36.19) to %v.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.20 [template = constants.%tuple] +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc12_36.1: %tuple.type.3 = tuple_literal (%int_1.loc12, %int_2, %int_3) +// CHECK:STDOUT: %impl.elem0.loc12_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_36.1: = bound_method %int_1.loc12, %impl.elem0.loc12_36.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_36.1: = specific_function %Convert.bound.loc12_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %Convert.specific_fn.loc12_36.1(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_36.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_36.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc12: ref %i32 = tuple_access %v.var, element0 +// CHECK:STDOUT: %.loc12_36.3: init %i32 = initialize_from %.loc12_36.2 to %tuple.elem0.loc12 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_36.2: = bound_method %int_2, %impl.elem0.loc12_36.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_36.2: = specific_function %Convert.bound.loc12_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %Convert.specific_fn.loc12_36.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_36.4: init %i32 = converted %int_2, %int.convert_checked.loc12_36.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %v.var, element1 +// CHECK:STDOUT: %.loc12_36.5: init %i32 = initialize_from %.loc12_36.4 to %tuple.elem1.loc12 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc12_36.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_36.3: = bound_method %int_3, %impl.elem0.loc12_36.3 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12_36.3: = specific_function %Convert.bound.loc12_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %Convert.specific_fn.loc12_36.3(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_36.6: init %i32 = converted %int_3, %int.convert_checked.loc12_36.3 [template = constants.%int_3.2] +// CHECK:STDOUT: %tuple.elem2.loc12: ref %i32 = tuple_access %v.var, element2 +// CHECK:STDOUT: %.loc12_36.7: init %i32 = initialize_from %.loc12_36.6 to %tuple.elem2.loc12 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_36.8: init %tuple.type.2 = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 -// CHECK:STDOUT: %.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%.loc14_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%.loc14_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] // CHECK:STDOUT: %.loc14_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21) // CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] // CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_11, %.loc14_24.2 [template = constants.%i32] @@ -135,18 +135,18 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc14_24.7: type = converted %int.make_type_signed.loc14_21, %.loc14_24.6 [template = constants.%i32] // CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v -// CHECK:STDOUT: %.loc14_28.1: ref %i32 = tuple_access %v.ref, element0 -// CHECK:STDOUT: %.loc14_28.2: %i32 = bind_value %.loc14_28.1 -// CHECK:STDOUT: %.loc14_28.3: ref %i32 = tuple_access %v.ref, element1 -// CHECK:STDOUT: %.loc14_28.4: %i32 = bind_value %.loc14_28.3 -// CHECK:STDOUT: %.loc14_28.5: ref %i32 = tuple_access %v.ref, element2 -// CHECK:STDOUT: %.loc14_28.6: %i32 = bind_value %.loc14_28.5 -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_28.2, %.loc14_28.4, %.loc14_28.6) +// CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access %v.ref, element0 +// CHECK:STDOUT: %.loc14_28.1: %i32 = bind_value %tuple.elem0.loc14 +// CHECK:STDOUT: %tuple.elem1.loc14: ref %i32 = tuple_access %v.ref, element1 +// CHECK:STDOUT: %.loc14_28.2: %i32 = bind_value %tuple.elem1.loc14 +// CHECK:STDOUT: %tuple.elem2.loc14: ref %i32 = tuple_access %v.ref, element2 +// CHECK:STDOUT: %.loc14_28.3: %i32 = bind_value %tuple.elem2.loc14 +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_28.1, %.loc14_28.2, %.loc14_28.3) // CHECK:STDOUT: %.loc14_29: %tuple.type.2 = converted %v.ref, %tuple // CHECK:STDOUT: %w: %tuple.type.2 = bind_name w, %.loc14_29 // CHECK:STDOUT: %w.ref: %tuple.type.2 = name_ref w, %w -// CHECK:STDOUT: %.loc15_12: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_11: %i32 = tuple_access %w.ref, element1 -// CHECK:STDOUT: return %.loc15_11 +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %tuple.elem1.loc15: %i32 = tuple_access %w.ref, element1 +// CHECK:STDOUT: return %tuple.elem1.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 35fb9312626f7..9da615b4f0561 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -24,22 +24,22 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,30 +62,30 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.29] -// CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.5 -// CHECK:STDOUT: %.loc19_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_10.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_10.3: type = converted %int.make_type_signed.loc19, %.loc19_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_16: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_17.3: = specific_function %.loc19_17.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_17.3(%.loc19_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc19_17.4: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.33] -// CHECK:STDOUT: %.loc19_17.5: %i32 = converted %.loc19_16, %.loc19_17.4 [template = constants.%.33] -// CHECK:STDOUT: %a.loc19: %i32 = bind_name a, %.loc19_17.5 +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_17.1: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_17.2: %i32 = converted %int_1, %.loc12_17.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.2 +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_10.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_10.2: type = converted %int.make_type_signed.loc19, %.loc19_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_17.1: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_17.2: %i32 = converted %int_2, %.loc19_17.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %a.loc19: %i32 = bind_name a, %.loc19_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 3f78074dfe5e6..824702625ea0d 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -31,14 +31,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- fail_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,14 +62,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%.loc12_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %int.make_type_signed.loc12_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.3: type = converted %int.make_type_signed.loc12_9, %.loc12_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_17: init type = call constants.%Int(%.loc12_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_signed.loc12_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_signed.loc12_17, %.loc12_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%int_32.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_signed.loc12_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_signed.loc12_9, %.loc12_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_17: init type = call constants.%Int(%int_32.loc12_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_signed.loc12_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_signed.loc12_17, %.loc12_17.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -79,14 +79,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc13_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc21_14: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_15: %T = converted %.loc21_14, [template = ] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %.loc21: %T = converted %int_5, [template = ] // CHECK:STDOUT: %x: %T = bind_name x, // CHECK:STDOUT: %x.ref: %T = name_ref x, %x // CHECK:STDOUT: %.loc28: %i32 = converted %x.ref, [template = ] diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index e8256c8e037a4..1411f7ed6a18d 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -31,10 +31,10 @@ let a: T = 0; // CHECK:STDOUT: --- fail_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,8 +55,8 @@ let a: T = 0; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 @@ -66,7 +66,7 @@ let a: T = 0; // CHECK:STDOUT: --- fail_implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,7 +91,7 @@ let a: T = 0; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: Core.IntLiteral = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %a: = bind_name a, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index 8716d55f557f4..d8d71ba5d5546 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -24,10 +24,10 @@ fn F() { // CHECK:STDOUT: --- fail_missing_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -47,20 +47,20 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %n: %i32 = bind_name n, // 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: %.loc21_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.3: type = converted %int.make_type_signed, %.loc21_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed, %.loc21_10.1 [template = constants.%i32] // CHECK:STDOUT: %n: %i32 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 237cf2048015f..b897207a54e39 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -86,18 +86,18 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: --- fail_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -122,106 +122,106 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: .i = @__global_init.%i // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.3: type = converted %int.make_type_signed.loc15, %.loc15_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_16.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_16.3: type = converted %int.make_type_signed.loc21, %.loc21_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_14.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_14.3: type = converted %int.make_type_signed.loc27, %.loc27_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc33: init type = call constants.%Int(%.loc33_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc33_16.2: type = value_of_initializer %int.make_type_signed.loc33 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_16.3: type = converted %int.make_type_signed.loc33, %.loc33_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc46: init type = call constants.%Int(%.loc46_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_22.2: type = value_of_initializer %int.make_type_signed.loc46 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_22.3: type = converted %int.make_type_signed.loc46, %.loc46_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc59_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc59: init type = call constants.%Int(%.loc59_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc59_24.2: type = value_of_initializer %int.make_type_signed.loc59 [template = constants.%i32] -// CHECK:STDOUT: %.loc59_24.3: type = converted %int.make_type_signed.loc59, %.loc59_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc72_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc72: init type = call constants.%Int(%.loc72_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc72_26.2: type = value_of_initializer %int.make_type_signed.loc72 [template = constants.%i32] -// CHECK:STDOUT: %.loc72_26.3: type = converted %int.make_type_signed.loc72, %.loc72_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc84_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%.loc84_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc84_28.2: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32] -// CHECK:STDOUT: %.loc84_28.3: type = converted %int.make_type_signed.loc84, %.loc84_28.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_signed.loc15, %.loc15_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_16.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_16.2: type = converted %int.make_type_signed.loc21, %.loc21_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_14.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_14.2: type = converted %int.make_type_signed.loc27, %.loc27_14.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc33: init type = call constants.%Int(%int_32.loc33) [template = constants.%i32] +// CHECK:STDOUT: %.loc33_16.1: type = value_of_initializer %int.make_type_signed.loc33 [template = constants.%i32] +// CHECK:STDOUT: %.loc33_16.2: type = converted %int.make_type_signed.loc33, %.loc33_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc46: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc46: init type = call constants.%Int(%int_32.loc46) [template = constants.%i32] +// CHECK:STDOUT: %.loc46_22.1: type = value_of_initializer %int.make_type_signed.loc46 [template = constants.%i32] +// CHECK:STDOUT: %.loc46_22.2: type = converted %int.make_type_signed.loc46, %.loc46_22.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc59: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc59: init type = call constants.%Int(%int_32.loc59) [template = constants.%i32] +// CHECK:STDOUT: %.loc59_24.1: type = value_of_initializer %int.make_type_signed.loc59 [template = constants.%i32] +// CHECK:STDOUT: %.loc59_24.2: type = converted %int.make_type_signed.loc59, %.loc59_24.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc72: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc72: init type = call constants.%Int(%int_32.loc72) [template = constants.%i32] +// CHECK:STDOUT: %.loc72_26.1: type = value_of_initializer %int.make_type_signed.loc72 [template = constants.%i32] +// CHECK:STDOUT: %.loc72_26.2: type = converted %int.make_type_signed.loc72, %.loc72_26.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc84: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%int_32.loc84) [template = constants.%i32] +// CHECK:STDOUT: %.loc84_28.1: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32] +// CHECK:STDOUT: %.loc84_28.2: type = converted %int.make_type_signed.loc84, %.loc84_28.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_25.2: = bound_method %.loc15_24, %.loc15_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_25.3: = specific_function %.loc15_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_25.3(%.loc15_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_25.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_25.5: %i32 = converted %.loc15_24, %.loc15_25.4 [template = constants.%.29] -// CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_25.5 -// CHECK:STDOUT: %.loc21_22: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_23.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_23.2: = bound_method %.loc21_22, %.loc21_23.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc21_23.3: = specific_function %.loc21_23.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_23.3(%.loc21_22) [template = constants.%.29] -// CHECK:STDOUT: %.loc21_23.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_23.5: %i32 = converted %.loc21_22, %.loc21_23.4 [template = constants.%.29] -// CHECK:STDOUT: %c: %i32 = bind_name c, %.loc21_23.5 -// CHECK:STDOUT: %.loc27_20: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_21.2: = bound_method %.loc27_20, %.loc27_21.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc27_21.3: = specific_function %.loc27_21.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_21.3(%.loc27_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc27_21.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.29] -// CHECK:STDOUT: %.loc27_21.5: %i32 = converted %.loc27_20, %.loc27_21.4 [template = constants.%.29] -// CHECK:STDOUT: %d: %i32 = bind_name d, %.loc27_21.5 -// CHECK:STDOUT: %.loc33_22: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc33_23.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc33_23.2: = bound_method %.loc33_22, %.loc33_23.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc33_23.3: = specific_function %.loc33_23.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %.loc33_23.3(%.loc33_22) [template = constants.%.29] -// CHECK:STDOUT: %.loc33_23.4: %i32 = value_of_initializer %int.convert_checked.loc33 [template = constants.%.29] -// CHECK:STDOUT: %.loc33_23.5: %i32 = converted %.loc33_22, %.loc33_23.4 [template = constants.%.29] -// CHECK:STDOUT: %e: %i32 = bind_name e, %.loc33_23.5 -// CHECK:STDOUT: %.loc46_28: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc46_29.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc46_29.2: = bound_method %.loc46_28, %.loc46_29.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc46_29.3: = specific_function %.loc46_29.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %.loc46_29.3(%.loc46_28) [template = constants.%.29] -// CHECK:STDOUT: %.loc46_29.4: %i32 = value_of_initializer %int.convert_checked.loc46 [template = constants.%.29] -// CHECK:STDOUT: %.loc46_29.5: %i32 = converted %.loc46_28, %.loc46_29.4 [template = constants.%.29] -// CHECK:STDOUT: %f: %i32 = bind_name f, %.loc46_29.5 -// CHECK:STDOUT: %.loc59_30: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc59_31.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc59_31.2: = bound_method %.loc59_30, %.loc59_31.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc59_31.3: = specific_function %.loc59_31.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %.loc59_31.3(%.loc59_30) [template = constants.%.29] -// CHECK:STDOUT: %.loc59_31.4: %i32 = value_of_initializer %int.convert_checked.loc59 [template = constants.%.29] -// CHECK:STDOUT: %.loc59_31.5: %i32 = converted %.loc59_30, %.loc59_31.4 [template = constants.%.29] -// CHECK:STDOUT: %g: %i32 = bind_name g, %.loc59_31.5 -// CHECK:STDOUT: %.loc72_32: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc72_33.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc72_33.2: = bound_method %.loc72_32, %.loc72_33.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc72_33.3: = specific_function %.loc72_33.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %.loc72_33.3(%.loc72_32) [template = constants.%.29] -// CHECK:STDOUT: %.loc72_33.4: %i32 = value_of_initializer %int.convert_checked.loc72 [template = constants.%.29] -// CHECK:STDOUT: %.loc72_33.5: %i32 = converted %.loc72_32, %.loc72_33.4 [template = constants.%.29] -// CHECK:STDOUT: %h: %i32 = bind_name h, %.loc72_33.5 -// CHECK:STDOUT: %.loc84_34: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc84_35.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc84_35.2: = bound_method %.loc84_34, %.loc84_35.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc84_35.3: = specific_function %.loc84_35.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %.loc84_35.3(%.loc84_34) [template = constants.%.29] -// CHECK:STDOUT: %.loc84_35.4: %i32 = value_of_initializer %int.convert_checked.loc84 [template = constants.%.29] -// CHECK:STDOUT: %.loc84_35.5: %i32 = converted %.loc84_34, %.loc84_35.4 [template = constants.%.29] -// CHECK:STDOUT: %i: %i32 = bind_name i, %.loc84_35.5 +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1.loc15, %.loc15_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_25.2 +// CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1.loc21) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc21_23.1: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_1.loc21, %.loc21_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %c: %i32 = bind_name c, %.loc21_23.2 +// CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_1.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_1.loc27) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc27_21.1: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc27_21.2: %i32 = converted %int_1.loc27, %.loc27_21.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %d: %i32 = bind_name d, %.loc27_21.2 +// CHECK:STDOUT: %int_1.loc33: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc33: = bound_method %int_1.loc33, %impl.elem0.loc33 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc33: = specific_function %Convert.bound.loc33, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %Convert.specific_fn.loc33(%int_1.loc33) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc33_23.1: %i32 = value_of_initializer %int.convert_checked.loc33 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc33_23.2: %i32 = converted %int_1.loc33, %.loc33_23.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %e: %i32 = bind_name e, %.loc33_23.2 +// CHECK:STDOUT: %int_1.loc46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc46: = bound_method %int_1.loc46, %impl.elem0.loc46 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc46: = specific_function %Convert.bound.loc46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %Convert.specific_fn.loc46(%int_1.loc46) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc46_29.1: %i32 = value_of_initializer %int.convert_checked.loc46 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc46_29.2: %i32 = converted %int_1.loc46, %.loc46_29.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %f: %i32 = bind_name f, %.loc46_29.2 +// CHECK:STDOUT: %int_1.loc59: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc59: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc59: = bound_method %int_1.loc59, %impl.elem0.loc59 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc59: = specific_function %Convert.bound.loc59, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %Convert.specific_fn.loc59(%int_1.loc59) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc59_31.1: %i32 = value_of_initializer %int.convert_checked.loc59 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc59_31.2: %i32 = converted %int_1.loc59, %.loc59_31.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %g: %i32 = bind_name g, %.loc59_31.2 +// CHECK:STDOUT: %int_1.loc72: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc72: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc72: = bound_method %int_1.loc72, %impl.elem0.loc72 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc72: = specific_function %Convert.bound.loc72, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %Convert.specific_fn.loc72(%int_1.loc72) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc72_33.1: %i32 = value_of_initializer %int.convert_checked.loc72 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc72_33.2: %i32 = converted %int_1.loc72, %.loc72_33.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %h: %i32 = bind_name h, %.loc72_33.2 +// CHECK:STDOUT: %int_1.loc84: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc84: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc84: = bound_method %int_1.loc84, %impl.elem0.loc84 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc84: = specific_function %Convert.bound.loc84, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %Convert.specific_fn.loc84(%int_1.loc84) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc84_35.1: %i32 = value_of_initializer %int.convert_checked.loc84 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc84_35.2: %i32 = converted %int_1.loc84, %.loc84_35.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %i: %i32 = bind_name i, %.loc84_35.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index 6a3165c44a777..9621da627dc5f 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -20,10 +20,10 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,10 +45,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.3: type = converted %int.make_type_signed, %.loc15_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 98c7aee53eed5..1e558014d70d1 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -19,12 +19,12 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,20 +46,20 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc12_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc13: type = ptr_type %T [symbolic = constants.%.2] -// CHECK:STDOUT: %p.var: ref %.2 = var p -// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = constants.%ptr] +// CHECK:STDOUT: %p.var: ref %ptr = var p +// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %a.var: ref %T = var a // CHECK:STDOUT: %a: ref %T = bind_name a, %a.var -// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p -// CHECK:STDOUT: %.loc14_15: %.2 = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %ptr = name_ref p, %p +// CHECK:STDOUT: %.loc14_15: %ptr = bind_value %p.ref // CHECK:STDOUT: %.loc14_14.1: ref %T = deref %.loc14_15 // CHECK:STDOUT: %.loc14_14.2: %T = bind_value %.loc14_14.1 // CHECK:STDOUT: assign %a.var, %.loc14_14.2 diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 0587557570f3c..b389b5e221c0c 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -35,10 +35,10 @@ var b: T = *a; // CHECK:STDOUT: --- fail_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,8 +59,8 @@ var b: T = *a; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] // CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 @@ -88,7 +88,7 @@ var b: T = *a; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, imports.%import_ref -// CHECK:STDOUT: %.loc8: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, imports.%import_ref diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index d2914d073b1f2..52b1622af770e 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -15,18 +15,18 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: --- global.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -47,18 +47,18 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -72,14 +72,14 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_15.2: = bound_method %.loc11_14, %.loc11_15.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_15.3: = specific_function %.loc11_15.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_15.3(%.loc11_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_15.5: %i32 = converted %.loc11_14, %.loc11_15.4 [template = constants.%.29] -// CHECK:STDOUT: %n: %i32 = bind_name n, %.loc11_15.5 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_15.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_15.2: %i32 = converted %int_1, %.loc11_15.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %n: %i32 = bind_name n, %.loc11_15.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 206ac6b4670a7..72ef42b3daf56 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -16,10 +16,10 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- local.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -44,14 +44,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11_9, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_17, %.loc11_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -61,10 +61,10 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b: %i32 = bind_name b, %a.ref // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 1614151e73fb6..ef8d27a4b693b 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -17,20 +17,20 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- shadowed_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,14 +54,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.3: type = converted %int.make_type_signed.loc11_9, %.loc11_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_17, %.loc11_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a.loc11: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -71,18 +71,18 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.29] -// CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.5 +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_17.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_17.2: %i32 = converted %int_1, %.loc12_17.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.2 // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a.loc12 // CHECK:STDOUT: return %a.ref // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 84b4b96bbbbce..51856f93046af 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -43,20 +43,20 @@ var a: i32 = NS.A(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,31 +85,31 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.3: type = converted %int.make_type_signed, %.loc4_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed, %.loc4_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed, %.loc6_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed, %.loc6_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_27: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_28.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_28.2: = bound_method %.loc4_27, %.loc4_28.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_28.3: = specific_function %.loc4_28.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_28.3(%.loc4_27) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc4_28.5: %i32 = converted %.loc4_27, %.loc4_28.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc4_28.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_28.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_28.2: %i32 = converted %int_0, %.loc4_28.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc4_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index a3a5153a2d5da..8a45f378e1ca0 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -23,20 +23,20 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: --- alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -71,10 +71,10 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.3: type = converted %int.make_type_signed, %.loc15_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_signed, %.loc15_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -82,10 +82,10 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.3: type = converted %int.make_type_signed, %.loc17_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_signed, %.loc17_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -96,10 +96,10 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.3: type = converted %int.make_type_signed, %.loc21_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed, %.loc21_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -107,14 +107,14 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.2: = bound_method %.loc15_27, %.loc15_28.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_28.3: = specific_function %.loc15_28.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_28.3(%.loc15_27) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc15_28.5: %i32 = converted %.loc15_27, %.loc15_28.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc15_28.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int_0, %.loc15_28.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc15_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index c0bd1396cbbac..792b21c69d610 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -24,20 +24,20 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: --- fail_decl_in_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,14 +59,14 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %NS: = namespace [template] {} // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %ns: = bind_alias ns, %NS [template = %NS] -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.3: type = converted %int.make_type_signed, %.loc22_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_signed, %.loc22_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -74,13 +74,13 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc22_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_28.2: = bound_method %.loc22_27, %.loc22_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc22_28.3: = specific_function %.loc22_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_28.3(%.loc22_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc22_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc22_28.5: %i32 = converted %.loc22_27, %.loc22_28.4 [template = constants.%.30] -// CHECK:STDOUT: return %.loc22_28.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc22_28.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc22_28.2: %i32 = converted %int_0, %.loc22_28.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc22_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 67d58e40c9464..5bb7936c98443 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -43,14 +43,14 @@ fn D(T:! type).F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,10 +74,10 @@ fn D(T:! type).F() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc24_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_16.3: type = converted %int.make_type_signed, %.loc24_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc24_16.2: type = converted %int.make_type_signed, %.loc24_16.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %B: = namespace [template] {} @@ -88,7 +88,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %x: %T = bind_name x, %x.param // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc39_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc39_6.2 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 361e1e9a5195e..71ebbd73907c4 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -45,8 +45,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,23 +69,23 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %struct: %A = struct_value () [template] +// CHECK:STDOUT: %A.val: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,7 +99,7 @@ fn Run() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Other//a, inst+7, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Other//a, inst+7, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Other//a, inst+5, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,11 +128,11 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -143,9 +143,9 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: %A { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_27.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc8_27.2: init %A = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc8_28: init %A = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc8_27.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_27.2: init %A = class_init (), %return [template = constants.%A.val] +// CHECK:STDOUT: %.loc8_28: init %A = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%A.val] // CHECK:STDOUT: return %.loc8_28 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,8 +157,8 @@ fn Run() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -173,7 +173,7 @@ fn Run() { // CHECK:STDOUT: import Other//a // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %F.type = import_ref Other//b, inst+23, loaded [template = constants.%F] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//b, inst+16, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//b, inst+16, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//b, inst+17, unloaded // CHECK:STDOUT: %import_ref.4: = import_ref Other//b, inst+4, loaded // CHECK:STDOUT: %NS1: = namespace %import_ref.4, [template] { diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 9f5978df45e19..ad6f48dfacec4 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -35,21 +35,21 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,10 +81,10 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.3: type = converted %int.make_type_signed.loc18, %.loc18_15.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_signed.loc18, %.loc18_15.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -98,35 +98,35 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref.loc20: %A.type.2 = name_ref A, file.%A.decl.loc14 [template = constants.%A.2] // CHECK:STDOUT: %A.call: init %empty_tuple.type = 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: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc22_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_12.3: type = converted %int.make_type_signed.loc22, %.loc22_12.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_12.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_12.2: type = converted %int.make_type_signed.loc22, %.loc22_12.1 [template = constants.%i32] // CHECK:STDOUT: %A.var: ref %i32 = var A // CHECK:STDOUT: %A: ref %i32 = bind_name A, %A.var -// CHECK:STDOUT: %.loc22_18: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc22_19.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_19.2: = bound_method %.loc22_18, %.loc22_19.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc22_19.3: = specific_function %.loc22_19.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_19.3(%.loc22_18) [template = constants.%.30] -// CHECK:STDOUT: %.loc22_19.4: init %i32 = converted %.loc22_18, %int.convert_checked.loc22 [template = constants.%.30] -// CHECK:STDOUT: assign %A.var, %.loc22_19.4 +// CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_0.loc22, %impl.elem0.loc22 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_0.loc22) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc22_19: init %i32 = converted %int_0.loc22, %int.convert_checked.loc22 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %A.var, %.loc22_19 // CHECK:STDOUT: %A.ref.loc25: ref %i32 = name_ref A, %A // CHECK:STDOUT: %.loc25: %i32 = bind_value %A.ref.loc25 // CHECK:STDOUT: return %.loc25 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc27_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc27_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_11.2: = bound_method %.loc27_10, %.loc27_11.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc27_11.3: = specific_function %.loc27_11.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_11.3(%.loc27_10) [template = constants.%.30] -// CHECK:STDOUT: %.loc27_11.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.30] -// CHECK:STDOUT: %.loc27_11.5: %i32 = converted %.loc27_10, %.loc27_11.4 [template = constants.%.30] -// CHECK:STDOUT: return %.loc27_11.5 +// CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc27_11.1: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc27_11.2: %i32 = converted %int_0.loc27, %.loc27_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc27_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index a469a3cfea666..bb106a5dc6386 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -34,12 +34,12 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] @@ -110,14 +110,14 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: return %.loc11_25 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: return %true // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: return %.loc12_25 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: return %true // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @And() -> bool { @@ -126,34 +126,34 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 -// CHECK:STDOUT: %.loc15_14.3: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc15_14.2 br !and.rhs else br !and.result(%.loc15_14.3) +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %.loc15_14.2 br !and.rhs else br !and.result(%false) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: // 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 -// CHECK:STDOUT: br !and.result(%.loc15_14.5) +// CHECK:STDOUT: %.loc15_14.3: bool = value_of_initializer %G.call +// CHECK:STDOUT: %.loc15_14.4: bool = converted %G.call, %.loc15_14.3 +// CHECK:STDOUT: br !and.result(%.loc15_14.4) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc15_14.6: bool = block_arg !and.result -// CHECK:STDOUT: return %.loc15_14.6 +// CHECK:STDOUT: %.loc15_14.5: bool = block_arg !and.result +// CHECK:STDOUT: return %.loc15_14.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc19_18.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc19_13 br !and.rhs.loc19 else br !and.result.loc19(%.loc19_18.1) +// CHECK:STDOUT: %true.loc19_13: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %false.loc19: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %true.loc19_13 br !and.rhs.loc19 else br !and.result.loc19(%false.loc19) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc19: -// CHECK:STDOUT: %.loc19_22: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: br !and.result.loc19(%.loc19_22) +// CHECK:STDOUT: %true.loc19_22: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: br !and.result.loc19(%true.loc19_22) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc19: -// CHECK:STDOUT: %.loc19_18.2: bool = block_arg !and.result.loc19 [template = constants.%.1] -// CHECK:STDOUT: if %.loc19_18.2 br !if.expr.then.loc19 else br !if.expr.else.loc19 +// CHECK:STDOUT: %.loc19_18: bool = block_arg !and.result.loc19 [template = constants.%true] +// CHECK:STDOUT: if %.loc19_18 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: // CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] @@ -170,19 +170,19 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_47: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %a.var, %.loc19_47 -// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc20_18.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc20_13 br !and.rhs.loc20 else br !and.result.loc20(%.loc20_18.1) +// CHECK:STDOUT: %true.loc19_47: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true.loc19_47 +// CHECK:STDOUT: %true.loc20: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %false.loc20_18: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %true.loc20 br !and.rhs.loc20 else br !and.result.loc20(%false.loc20_18) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc20: -// CHECK:STDOUT: %.loc20_22: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: br !and.result.loc20(%.loc20_22) +// CHECK:STDOUT: %false.loc20_22: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !and.result.loc20(%false.loc20_22) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc20: -// CHECK:STDOUT: %.loc20_18.2: bool = block_arg !and.result.loc20 [template = constants.%.2] -// CHECK:STDOUT: if %.loc20_18.2 br !if.expr.then.loc20 else br !if.expr.else.loc20 +// CHECK:STDOUT: %.loc20_18: bool = block_arg !and.result.loc20 [template = constants.%false] +// CHECK:STDOUT: if %.loc20_18 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: // CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] @@ -203,17 +203,17 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc20_49.2: init %empty_tuple.type = tuple_init () to %b.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc20_50: init %empty_tuple.type = converted %.loc20_49.1, %.loc20_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %b.var, %.loc20_50 -// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc21_19.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc21_13 br !and.rhs.loc21 else br !and.result.loc21(%.loc21_19.1) +// CHECK:STDOUT: %false.loc21_13: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %false.loc21_19: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc21_13 br !and.rhs.loc21 else br !and.result.loc21(%false.loc21_19) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc21: -// CHECK:STDOUT: %.loc21_23: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: br !and.result.loc21(%.loc21_23) +// CHECK:STDOUT: %true.loc21: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: br !and.result.loc21(%true.loc21) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc21: -// CHECK:STDOUT: %.loc21_19.2: bool = block_arg !and.result.loc21 [template = constants.%.2] -// CHECK:STDOUT: if %.loc21_19.2 br !if.expr.then.loc21 else br !if.expr.else.loc21 +// CHECK:STDOUT: %.loc21_19: bool = block_arg !and.result.loc21 [template = constants.%false] +// CHECK:STDOUT: if %.loc21_19 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: // CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] @@ -234,17 +234,17 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc21_49.2: init %empty_tuple.type = tuple_init () to %c.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc21_50: init %empty_tuple.type = converted %.loc21_49.1, %.loc21_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %c.var, %.loc21_50 -// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc22_19.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc22_13 br !and.rhs.loc22 else br !and.result.loc22(%.loc22_19.1) +// CHECK:STDOUT: %false.loc22_13: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %false.loc22_19: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc22_13 br !and.rhs.loc22 else br !and.result.loc22(%false.loc22_19) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc22: -// CHECK:STDOUT: %.loc22_23: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: br !and.result.loc22(%.loc22_23) +// CHECK:STDOUT: %false.loc22_23: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !and.result.loc22(%false.loc22_23) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc22: -// CHECK:STDOUT: %.loc22_19.2: bool = block_arg !and.result.loc22 [template = constants.%.2] -// CHECK:STDOUT: if %.loc22_19.2 br !if.expr.then.loc22 else br !if.expr.else.loc22 +// CHECK:STDOUT: %.loc22_19: bool = block_arg !and.result.loc22 [template = constants.%false] +// CHECK:STDOUT: if %.loc22_19 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] @@ -270,17 +270,17 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc26_19.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc26_13 br !and.rhs else br !and.result(%.loc26_19.1) +// CHECK:STDOUT: %false.loc26_13: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %false.loc26_19: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc26_13 br !and.rhs else br !and.result(%false.loc26_19) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: // CHECK:STDOUT: %x.ref: bool = name_ref x, %x // CHECK:STDOUT: br !and.result(%x.ref) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc26_19.2: bool = block_arg !and.result [template = constants.%.2] -// CHECK:STDOUT: if %.loc26_19.2 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %.loc26_19: bool = block_arg !and.result [template = constants.%false] +// CHECK:STDOUT: if %.loc26_19 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %bool.make_type.loc26: init type = call constants.%Bool() [template = bool] diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index a8a77251ca5d3..1d46afbf9268f 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -31,56 +31,56 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 9 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.37: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.40: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.39, %.42) [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.44: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.45: = bound_method %.44, %Convert.14 [template] -// CHECK:STDOUT: %.46: = specific_function %.45, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.47: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.49: = bound_method %.48, %Convert.14 [template] -// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.51: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.52: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.54: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.52 = struct_value (%.39, %.42) [template] -// CHECK:STDOUT: %.55: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.56: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.57: = bound_method %.56, %Convert.14 [template] -// CHECK:STDOUT: %.58: = specific_function %.57, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.59: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.60: bool = bool_literal true [template] -// CHECK:STDOUT: %.61: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.62: = bound_method %.61, %Convert.14 [template] -// CHECK:STDOUT: %.63: = specific_function %.62, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.64: %i32 = int_value 10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,31 +103,31 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_18.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.2: = bound_method %.loc12_16, %.loc12_18.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_18.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_18.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.29] -// CHECK:STDOUT: assign %a.var, %.loc12_18.4 +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc12_18: init %i32 = converted %int_12, %int.convert_checked.loc12 [template = constants.%int_12.2] +// CHECK:STDOUT: assign %a.var, %.loc12_18 // CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc13_7: Core.IntLiteral = int_value 9 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_5.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_5.2: = bound_method %.loc13_7, %.loc13_5.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_5.3: = specific_function %.loc13_5.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_5.3(%.loc13_7) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_5.4: init %i32 = converted %.loc13_7, %int.convert_checked.loc13 [template = constants.%.33] -// CHECK:STDOUT: assign %a.ref.loc13, %.loc13_5.4 -// CHECK:STDOUT: %.loc15_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_11: init type = call constants.%Int(%.loc15_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%.loc15_16) [template = constants.%i32] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_9, %impl.elem0.loc13 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_9) [template = constants.%int_9.2] +// CHECK:STDOUT: %.loc13: init %i32 = converted %int_9, %int.convert_checked.loc13 [template = constants.%int_9.2] +// CHECK:STDOUT: assign %a.ref.loc13, %.loc13 +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_11: init type = call constants.%Int(%int_32.loc15_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%int_32.loc15_16) [template = constants.%i32] // CHECK:STDOUT: %.loc15_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc15_11, %int.make_type_signed.loc15_16) // CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed.loc15_11 [template = constants.%i32] // CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed.loc15_11, %.loc15_19.2 [template = constants.%i32] @@ -136,138 +136,138 @@ fn Main() { // CHECK:STDOUT: %.loc15_19.6: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_28.1: %tuple.type.3 = tuple_literal (%.loc15_24, %.loc15_27) -// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_24, %.loc15_28.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %.loc15_28.4(%.loc15_24) [template = constants.%.39] -// CHECK:STDOUT: %.loc15_28.5: init %i32 = converted %.loc15_24, %int.convert_checked.loc15_28.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc15_28.6: ref %i32 = tuple_access %b.var, element0 -// CHECK:STDOUT: %.loc15_28.7: init %i32 = initialize_from %.loc15_28.5 to %.loc15_28.6 [template = constants.%.39] -// CHECK:STDOUT: %.loc15_28.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.9: = bound_method %.loc15_27, %.loc15_28.8 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_28.10: = specific_function %.loc15_28.9, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %.loc15_28.10(%.loc15_27) [template = constants.%.42] -// CHECK:STDOUT: %.loc15_28.11: init %i32 = converted %.loc15_27, %int.convert_checked.loc15_28.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc15_28.12: ref %i32 = tuple_access %b.var, element1 -// CHECK:STDOUT: %.loc15_28.13: init %i32 = initialize_from %.loc15_28.11 to %.loc15_28.12 [template = constants.%.42] -// CHECK:STDOUT: %.loc15_28.14: init %tuple.type.2 = tuple_init (%.loc15_28.7, %.loc15_28.13) to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_29: init %tuple.type.2 = converted %.loc15_28.1, %.loc15_28.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc15_28.1: %tuple.type.3 = tuple_literal (%int_1.loc15, %int_2.loc15) +// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_28.1: = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc15_28.1: = specific_function %Convert.bound.loc15_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %Convert.specific_fn.loc15_28.1(%int_1.loc15) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_28.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc15: ref %i32 = tuple_access %b.var, element0 +// CHECK:STDOUT: %.loc15_28.3: init %i32 = initialize_from %.loc15_28.2 to %tuple.elem0.loc15 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc15_28.2: = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc15_28.2: = specific_function %Convert.bound.loc15_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %Convert.specific_fn.loc15_28.2(%int_2.loc15) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_28.4: init %i32 = converted %int_2.loc15, %int.convert_checked.loc15_28.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc15: ref %i32 = tuple_access %b.var, element1 +// CHECK:STDOUT: %.loc15_28.5: init %i32 = initialize_from %.loc15_28.4 to %tuple.elem1.loc15 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc15_28.6: init %tuple.type.2 = tuple_init (%.loc15_28.3, %.loc15_28.5) to %b.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc15_29: init %tuple.type.2 = converted %.loc15_28.1, %.loc15_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %b.var, %.loc15_29 // CHECK:STDOUT: %b.ref.loc16: ref %tuple.type.2 = name_ref b, %b -// CHECK:STDOUT: %.loc16_5: Core.IntLiteral = int_value 0 [template = constants.%.43] -// CHECK:STDOUT: %.loc16_4: ref %i32 = tuple_access %b.ref.loc16, element0 -// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 3 [template = constants.%.44] -// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_9, %.loc16_7.1 [template = constants.%.45] -// CHECK:STDOUT: %.loc16_7.3: = specific_function %.loc16_7.2, @Convert.2(constants.%.1) [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_7.3(%.loc16_9) [template = constants.%.47] -// CHECK:STDOUT: %.loc16_7.4: init %i32 = converted %.loc16_9, %int.convert_checked.loc16 [template = constants.%.47] -// CHECK:STDOUT: assign %.loc16_4, %.loc16_7.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple.elem0.loc16: ref %i32 = tuple_access %b.ref.loc16, element0 +// CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_3.loc16, %impl.elem0.loc16 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_3.loc16) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc16: init %i32 = converted %int_3.loc16, %int.convert_checked.loc16 [template = constants.%int_3.2] +// CHECK:STDOUT: assign %tuple.elem0.loc16, %.loc16 // CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, %b -// CHECK:STDOUT: %.loc17_5: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_4: ref %i32 = tuple_access %b.ref.loc17, element1 -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 4 [template = constants.%.48] -// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_9, %.loc17_7.1 [template = constants.%.49] -// CHECK:STDOUT: %.loc17_7.3: = specific_function %.loc17_7.2, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_7.3(%.loc17_9) [template = constants.%.51] -// CHECK:STDOUT: %.loc17_7.4: init %i32 = converted %.loc17_9, %int.convert_checked.loc17 [template = constants.%.51] -// CHECK:STDOUT: assign %.loc17_4, %.loc17_7.4 -// CHECK:STDOUT: %.loc19_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_15: init type = call constants.%Int(%.loc19_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_15.2: type = value_of_initializer %int.make_type_signed.loc19_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_15.3: type = converted %int.make_type_signed.loc19_15, %.loc19_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19_24: init type = call constants.%Int(%.loc19_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_signed.loc19_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.3: type = converted %int.make_type_signed.loc19_24, %.loc19_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.52] -// CHECK:STDOUT: %c.var: ref %.52 = var c -// CHECK:STDOUT: %c: ref %.52 = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_37: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_45: Core.IntLiteral = int_value 2 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_46.1: %.54 = struct_literal (%.loc19_37, %.loc19_45) -// CHECK:STDOUT: %.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_46.3: = bound_method %.loc19_37, %.loc19_46.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc19_46.4: = specific_function %.loc19_46.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %.loc19_46.4(%.loc19_37) [template = constants.%.39] -// CHECK:STDOUT: %.loc19_46.5: init %i32 = converted %.loc19_37, %int.convert_checked.loc19_46.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc19_46.6: ref %i32 = struct_access %c.var, element0 -// CHECK:STDOUT: %.loc19_46.7: init %i32 = initialize_from %.loc19_46.5 to %.loc19_46.6 [template = constants.%.39] -// CHECK:STDOUT: %.loc19_46.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_46.9: = bound_method %.loc19_45, %.loc19_46.8 [template = constants.%.40] -// CHECK:STDOUT: %.loc19_46.10: = specific_function %.loc19_46.9, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %.loc19_46.10(%.loc19_45) [template = constants.%.42] -// CHECK:STDOUT: %.loc19_46.11: init %i32 = converted %.loc19_45, %int.convert_checked.loc19_46.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc19_46.12: ref %i32 = struct_access %c.var, element1 -// CHECK:STDOUT: %.loc19_46.13: init %i32 = initialize_from %.loc19_46.11 to %.loc19_46.12 [template = constants.%.42] -// CHECK:STDOUT: %.loc19_46.14: init %.52 = struct_init (%.loc19_46.7, %.loc19_46.13) to %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_47: init %.52 = converted %.loc19_46.1, %.loc19_46.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %tuple.elem1.loc17: ref %i32 = tuple_access %b.ref.loc17, element1 +// CHECK:STDOUT: %int_4.loc17: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_4.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc17: init %i32 = converted %int_4.loc17, %int.convert_checked.loc17 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %tuple.elem1.loc17, %.loc17 +// CHECK:STDOUT: %int_32.loc19_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_15: init type = call constants.%Int(%int_32.loc19_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_15.1: type = value_of_initializer %int.make_type_signed.loc19_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_15.2: type = converted %int.make_type_signed.loc19_15, %.loc19_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_24: init type = call constants.%Int(%int_32.loc19_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed.loc19_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed.loc19_24, %.loc19_24.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %c.var: ref %struct_type.a.b.1 = var c +// CHECK:STDOUT: %c: ref %struct_type.a.b.1 = bind_name c, %c.var +// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc19_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc19, %int_2.loc19) +// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_46.1: = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc19_46.1: = specific_function %Convert.bound.loc19_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %Convert.specific_fn.loc19_46.1(%int_1.loc19) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_46.2: init %i32 = converted %int_1.loc19, %int.convert_checked.loc19_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc19_46.3: ref %i32 = struct_access %c.var, element0 +// CHECK:STDOUT: %.loc19_46.4: init %i32 = initialize_from %.loc19_46.2 to %.loc19_46.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc19_46.2: = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc19_46.2: = specific_function %Convert.bound.loc19_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %Convert.specific_fn.loc19_46.2(%int_2.loc19) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_46.5: init %i32 = converted %int_2.loc19, %int.convert_checked.loc19_46.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_46.6: ref %i32 = struct_access %c.var, element1 +// CHECK:STDOUT: %.loc19_46.7: init %i32 = initialize_from %.loc19_46.5 to %.loc19_46.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc19_46.8: init %struct_type.a.b.1 = struct_init (%.loc19_46.4, %.loc19_46.7) to %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_47: init %struct_type.a.b.1 = converted %.loc19_46.1, %.loc19_46.8 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_47 -// CHECK:STDOUT: %c.ref.loc20: ref %.52 = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc20: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0 -// CHECK:STDOUT: %.loc20_9: Core.IntLiteral = int_value 3 [template = constants.%.44] -// CHECK:STDOUT: %.loc20_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_7.2: = bound_method %.loc20_9, %.loc20_7.1 [template = constants.%.45] -// CHECK:STDOUT: %.loc20_7.3: = specific_function %.loc20_7.2, @Convert.2(constants.%.1) [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %.loc20_7.3(%.loc20_9) [template = constants.%.47] -// CHECK:STDOUT: %.loc20_7.4: init %i32 = converted %.loc20_9, %int.convert_checked.loc20 [template = constants.%.47] -// CHECK:STDOUT: assign %.loc20_4, %.loc20_7.4 -// CHECK:STDOUT: %c.ref.loc21: ref %.52 = name_ref c, %c +// CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc20: = bound_method %int_3.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc20: = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %Convert.specific_fn.loc20(%int_3.loc20) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc20_7: init %i32 = converted %int_3.loc20, %int.convert_checked.loc20 [template = constants.%int_3.2] +// CHECK:STDOUT: assign %.loc20_4, %.loc20_7 +// CHECK:STDOUT: %c.ref.loc21: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1 -// CHECK:STDOUT: %.loc21_9: Core.IntLiteral = int_value 4 [template = constants.%.48] -// CHECK:STDOUT: %.loc21_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_7.2: = bound_method %.loc21_9, %.loc21_7.1 [template = constants.%.49] -// CHECK:STDOUT: %.loc21_7.3: = specific_function %.loc21_7.2, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_7.3(%.loc21_9) [template = constants.%.51] -// CHECK:STDOUT: %.loc21_7.4: init %i32 = converted %.loc21_9, %int.convert_checked.loc21 [template = constants.%.51] -// CHECK:STDOUT: assign %.loc21_4, %.loc21_7.4 -// CHECK:STDOUT: %.loc23_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_10) [template = constants.%i32] +// CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_4.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc21_7: init %i32 = converted %int_4.loc21, %int.convert_checked.loc21 [template = constants.%int_4.2] +// CHECK:STDOUT: assign %.loc21_4, %.loc21_7 +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] // CHECK:STDOUT: %.loc23_13.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] // CHECK:STDOUT: %.loc23_13.2: type = converted %int.make_type_signed.loc23, %.loc23_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_13.3: type = ptr_type %i32 [template = constants.%.55] -// CHECK:STDOUT: %p.var: ref %.55 = var p -// CHECK:STDOUT: %p: ref %.55 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %p.var: ref %ptr.3 = var p +// CHECK:STDOUT: %p: ref %ptr.3 = bind_name p, %p.var // CHECK:STDOUT: %a.ref.loc23: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc23_17: %.55 = addr_of %a.ref.loc23 -// CHECK:STDOUT: assign %p.var, %.loc23_17 -// CHECK:STDOUT: %p.ref.loc24: ref %.55 = name_ref p, %p -// CHECK:STDOUT: %.loc24_4: %.55 = bind_value %p.ref.loc24 +// CHECK:STDOUT: %addr.loc23: %ptr.3 = addr_of %a.ref.loc23 +// CHECK:STDOUT: assign %p.var, %addr.loc23 +// CHECK:STDOUT: %p.ref.loc24: ref %ptr.3 = name_ref p, %p +// CHECK:STDOUT: %.loc24_4: %ptr.3 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4 -// CHECK:STDOUT: %.loc24_8: Core.IntLiteral = int_value 5 [template = constants.%.56] -// CHECK:STDOUT: %.loc24_6.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_6.2: = bound_method %.loc24_8, %.loc24_6.1 [template = constants.%.57] -// CHECK:STDOUT: %.loc24_6.3: = specific_function %.loc24_6.2, @Convert.2(constants.%.1) [template = constants.%.58] -// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %.loc24_6.3(%.loc24_8) [template = constants.%.59] -// CHECK:STDOUT: %.loc24_6.4: init %i32 = converted %.loc24_8, %int.convert_checked.loc24 [template = constants.%.59] -// CHECK:STDOUT: assign %.loc24_3, %.loc24_6.4 -// CHECK:STDOUT: %.loc26_8: bool = bool_literal true [template = constants.%.60] -// CHECK:STDOUT: if %.loc26_8 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc24: = bound_method %int_5, %impl.elem0.loc24 [template = constants.%Convert.bound.7] +// CHECK:STDOUT: %Convert.specific_fn.loc24: = specific_function %Convert.bound.loc24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] +// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %Convert.specific_fn.loc24(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc24_6: init %i32 = converted %int_5, %int.convert_checked.loc24 [template = constants.%int_5.2] +// CHECK:STDOUT: assign %.loc24_3, %.loc24_6 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %p.ref.loc26: ref %.55 = name_ref p, %p -// CHECK:STDOUT: %.loc26_18: %.55 = bind_value %p.ref.loc26 +// CHECK:STDOUT: %p.ref.loc26: ref %ptr.3 = name_ref p, %p +// CHECK:STDOUT: %.loc26_18: %ptr.3 = 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: %.55 = addr_of %a.ref.loc26 -// CHECK:STDOUT: br !if.expr.result(%.loc26_25) +// CHECK:STDOUT: %addr.loc26: %ptr.3 = addr_of %a.ref.loc26 +// CHECK:STDOUT: br !if.expr.result(%addr.loc26) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_5: %.55 = block_arg !if.expr.result +// CHECK:STDOUT: %.loc26_5: %ptr.3 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5 -// CHECK:STDOUT: %.loc26_31: Core.IntLiteral = int_value 10 [template = constants.%.61] -// CHECK:STDOUT: %.loc26_29.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_29.2: = bound_method %.loc26_31, %.loc26_29.1 [template = constants.%.62] -// CHECK:STDOUT: %.loc26_29.3: = specific_function %.loc26_29.2, @Convert.2(constants.%.1) [template = constants.%.63] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_29.3(%.loc26_31) [template = constants.%.64] -// CHECK:STDOUT: %.loc26_29.4: init %i32 = converted %.loc26_31, %int.convert_checked.loc26 [template = constants.%.64] -// CHECK:STDOUT: assign %.loc26_3, %.loc26_29.4 +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_10, %impl.elem0.loc26 [template = constants.%Convert.bound.8] +// CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc26_29: init %i32 = converted %int_10, %int.convert_checked.loc26 [template = constants.%int_10.2] +// CHECK:STDOUT: assign %.loc26_3, %.loc26_29 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index cd17898b662f8..b402b8b799e8c 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 @@ -44,21 +44,21 @@ var or_: F(true or true); // CHECK:STDOUT: --- fail_and_or_not_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.3: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%.3] +// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%true] // CHECK:STDOUT: %F.call: init type = call .inst+76.loc42_10(%.loc42_17) // CHECK:STDOUT: %.loc42_24.1: type = value_of_initializer %F.call // CHECK:STDOUT: %.loc42_24.2: type = converted %F.call, %.loc42_24.1 @@ -72,15 +72,15 @@ var or_: F(true or true); // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %.loc13_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_signed, %.loc13_20.2 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%.loc13_20.3) +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_signed, %.loc13_20.1 [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result(%.loc13_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc13_29: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc13_29) [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] // CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc13_24.2: type = converted %float.make_type, %.loc13_24.1 [template = f64] // CHECK:STDOUT: br !if.expr.result(%.loc13_24.2) 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 66d87c5e7f6b4..43de5e48f3d32 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 @@ -51,8 +51,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,17 +83,17 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc9_18.1: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: if %.loc9_13 br !and.rhs else br !and.result(%.loc9_18.1) +// CHECK:STDOUT: %true.loc9: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %false.loc9: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %true.loc9 br !and.rhs else br !and.result(%false.loc9) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: // CHECK:STDOUT: %x.ref.loc9: bool = name_ref x, %x // CHECK:STDOUT: br !and.result(%x.ref.loc9) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc9_18.2: bool = block_arg !and.result -// CHECK:STDOUT: if %.loc9_18.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 +// CHECK:STDOUT: %.loc9_18: bool = block_arg !and.result +// CHECK:STDOUT: if %.loc9_18 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: // CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] @@ -110,18 +110,18 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc14_19.1: bool = not %.loc14_13 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_19.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc14_19.1 br !or.rhs else br !or.result(%.loc14_19.2) +// CHECK:STDOUT: %false.loc14: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %.loc14_19.1: bool = not %false.loc14 [template = constants.%true] +// CHECK:STDOUT: %true.loc14: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc14_19.1 br !or.rhs else br !or.result(%true.loc14) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: // CHECK:STDOUT: %x.ref.loc14: bool = name_ref x, %x // CHECK:STDOUT: br !or.result(%x.ref.loc14) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc14_19.3: bool = block_arg !or.result -// CHECK:STDOUT: if %.loc14_19.3 br !if.expr.then.loc14 else br !if.expr.else.loc14 +// CHECK:STDOUT: %.loc14_19.2: bool = block_arg !or.result +// CHECK:STDOUT: if %.loc14_19.2 br !if.expr.then.loc14 else br !if.expr.else.loc14 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc14: // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] @@ -149,8 +149,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition.type: type = fn_type @KnownValueButNonConstantCondition [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition: %KnownValueButNonConstantCondition.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal false [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -182,16 +182,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: fn @KnownValueButNonConstantCondition(%x.param_patt: bool) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref.loc11: bool = name_ref x, %x -// CHECK:STDOUT: %.loc11_15.1: bool = bool_literal false [template = constants.%.1] -// CHECK:STDOUT: if %x.ref.loc11 br !and.rhs else br !and.result(%.loc11_15.1) +// CHECK:STDOUT: %false.loc11_15: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %x.ref.loc11 br !and.rhs else br !and.result(%false.loc11_15) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %.loc11_19: bool = bool_literal false [template = constants.%.1] -// CHECK:STDOUT: br !and.result(%.loc11_19) +// CHECK:STDOUT: %false.loc11_19: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !and.result(%false.loc11_19) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc11_15.2: bool = block_arg !and.result -// CHECK:STDOUT: if %.loc11_15.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 +// CHECK:STDOUT: %.loc11_15: bool = block_arg !and.result +// CHECK:STDOUT: if %.loc11_15 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] @@ -210,16 +210,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: %x.ref.loc15: bool = name_ref x, %x // CHECK:STDOUT: %.loc15_15.1: bool = not %x.ref.loc15 -// CHECK:STDOUT: %.loc15_15.2: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc15_15.1 br !or.rhs else br !or.result(%.loc15_15.2) +// CHECK:STDOUT: %true.loc15_15: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc15_15.1 br !or.rhs else br !or.result(%true.loc15_15) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %.loc15_18: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: br !or.result(%.loc15_18) +// CHECK:STDOUT: %true.loc15_18: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: br !or.result(%true.loc15_18) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc15_15.3: bool = block_arg !or.result -// CHECK:STDOUT: if %.loc15_15.3 br !if.expr.then.loc15 else br !if.expr.else.loc15 +// CHECK:STDOUT: %.loc15_15.2: bool = block_arg !or.result +// CHECK:STDOUT: if %.loc15_15.2 br !if.expr.then.loc15 else br !if.expr.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc15: // CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] 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 b40950b13eb1b..d678ec4052b9e 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: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] +// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,12 +47,12 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [template = ] -// CHECK:STDOUT: %.loc16: Core.IntLiteral = int_value 42 [template = constants.%.1] +// CHECK:STDOUT: %int_42.loc16: Core.IntLiteral = int_value 42 [template = constants.%int_42] // CHECK:STDOUT: assign %undeclared.ref, // CHECK:STDOUT: %also_undeclared.ref: = name_ref also_undeclared, [template = ] -// CHECK:STDOUT: %.loc20_3: ref = deref -// CHECK:STDOUT: %.loc20_22: Core.IntLiteral = int_value 42 [template = constants.%.1] -// CHECK:STDOUT: assign %.loc20_3, +// CHECK:STDOUT: %.loc20: ref = deref +// CHECK:STDOUT: %int_42.loc20: Core.IntLiteral = int_value 42 [template = constants.%int_42] +// CHECK:STDOUT: assign %.loc20, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 452d112dfbada..3227454354cc4 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 @@ -59,49 +59,49 @@ fn Main() { // CHECK:STDOUT: --- fail_assignment_to_non_assignable.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.31, %.32) [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%.2, %.3) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%int_3.1, %int_4) [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%int_1.1, %int_2.1) [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.39: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%.30, %.41) [template] -// CHECK:STDOUT: %.42: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.43: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct.1: %.43 = struct_value (%.31, %.32) [template] -// CHECK:STDOUT: %struct.2: %.43 = struct_value (%.2, %.3) [template] -// CHECK:STDOUT: %.45: bool = bool_literal true [template] -// CHECK:STDOUT: %.46: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.50: = bound_method %.49, %Convert.14 [template] -// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.52: %i32 = int_value 10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct.1: %struct_type.x.y = struct_value (%int_3.1, %int_4) [template] +// CHECK:STDOUT: %struct.2: %struct_type.x.y = struct_value (%int_1.1, %int_2.1) [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -124,10 +124,10 @@ fn Main() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -138,140 +138,140 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_3: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_7: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: assign %.loc18_3, %.loc18_7 +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: assign %int_1.loc18, %int_2.loc18 // 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_9: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_7.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_7.2: = bound_method %.loc23_9, %.loc23_7.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc23_7.3: = specific_function %.loc23_7.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_7.3(%.loc23_9) [template = constants.%.30] -// CHECK:STDOUT: %.loc23_7.4: init %i32 = converted %.loc23_9, %int.convert_checked.loc23 [template = constants.%.30] -// CHECK:STDOUT: assign %F.call, %.loc23_7.4 -// CHECK:STDOUT: %.loc28_4: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc28_7: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc28_8.1: %tuple.type.1 = tuple_literal (%.loc28_4, %.loc28_7) -// CHECK:STDOUT: %.loc28_13: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc28_16: Core.IntLiteral = int_value 4 [template = constants.%.32] -// CHECK:STDOUT: %.loc28_17.1: %tuple.type.1 = tuple_literal (%.loc28_13, %.loc28_16) -// CHECK:STDOUT: %.loc28_17.2: Core.IntLiteral = tuple_access %.loc28_8.1, element0 -// CHECK:STDOUT: %.loc28_17.3: init Core.IntLiteral = initialize_from %.loc28_13 to %.loc28_17.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc28_17.4: Core.IntLiteral = tuple_access %.loc28_8.1, element1 -// CHECK:STDOUT: %.loc28_17.5: init Core.IntLiteral = initialize_from %.loc28_16 to %.loc28_17.4 [template = constants.%.32] -// CHECK:STDOUT: %.loc28_17.6: init %tuple.type.1 = tuple_init (%.loc28_17.3, %.loc28_17.5) to %.loc28_8.1 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc28_10: init %tuple.type.1 = converted %.loc28_17.1, %.loc28_17.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_1.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_1.loc23) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc23: init %i32 = converted %int_1.loc23, %int.convert_checked.loc23 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %F.call, %.loc23 +// CHECK:STDOUT: %int_1.loc28: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc28: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc28_8.1: %tuple.type.1 = tuple_literal (%int_1.loc28, %int_2.loc28) +// CHECK:STDOUT: %int_3.loc28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4.loc28: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc28_17.1: %tuple.type.1 = tuple_literal (%int_3.loc28, %int_4.loc28) +// CHECK:STDOUT: %tuple.elem0.loc28: Core.IntLiteral = tuple_access %.loc28_8.1, element0 +// CHECK:STDOUT: %.loc28_17.2: init Core.IntLiteral = initialize_from %int_3.loc28 to %tuple.elem0.loc28 [template = constants.%int_3.1] +// CHECK:STDOUT: %tuple.elem1.loc28: Core.IntLiteral = tuple_access %.loc28_8.1, element1 +// CHECK:STDOUT: %.loc28_17.3: init Core.IntLiteral = initialize_from %int_4.loc28 to %tuple.elem1.loc28 [template = constants.%int_4] +// CHECK:STDOUT: %.loc28_17.4: init %tuple.type.1 = tuple_init (%.loc28_17.2, %.loc28_17.3) to %.loc28_8.1 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc28_10: init %tuple.type.1 = converted %.loc28_17.1, %.loc28_17.4 [template = constants.%tuple.1] // CHECK:STDOUT: assign %.loc28_8.1, %.loc28_10 -// CHECK:STDOUT: %tuple.loc28: %tuple.type.1 = tuple_value (%.loc28_4, %.loc28_7) [template = constants.%tuple.2] +// CHECK:STDOUT: %tuple.loc28: %tuple.type.1 = tuple_value (%int_1.loc28, %int_2.loc28) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc28_8.2: %tuple.type.1 = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc29_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%.loc29_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_10.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_10.3: type = converted %int.make_type_signed.loc29, %.loc29_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] +// CHECK:STDOUT: %.loc29_10.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] +// CHECK:STDOUT: %.loc29_10.2: type = converted %int.make_type_signed.loc29, %.loc29_10.1 [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc29_16: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc29_17.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_17.2: = bound_method %.loc29_16, %.loc29_17.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc29_17.3: = specific_function %.loc29_17.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_17.3(%.loc29_16) [template = constants.%.37] -// CHECK:STDOUT: %.loc29_17.4: init %i32 = converted %.loc29_16, %int.convert_checked.loc29 [template = constants.%.37] -// CHECK:STDOUT: assign %n.var, %.loc29_17.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc29_17: init %i32 = converted %int_0, %int.convert_checked.loc29 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc29_17 // 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: %tuple.type.2 = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) -// CHECK:STDOUT: %.loc34_13: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc34_16: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc34_17.1: %tuple.type.1 = tuple_literal (%.loc34_13, %.loc34_16) -// CHECK:STDOUT: %.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_17.3: = bound_method %.loc34_13, %.loc34_17.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc34_17.4: = specific_function %.loc34_17.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %.loc34_17.4(%.loc34_13) [template = constants.%.30] -// CHECK:STDOUT: %.loc34_17.5: init %i32 = converted %.loc34_13, %int.convert_checked.loc34_17.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc34_17.6: %i32 = tuple_access %.loc34_8.1, element0 -// CHECK:STDOUT: %.loc34_17.7: init %i32 = initialize_from %.loc34_17.5 to %.loc34_17.6 [template = constants.%.30] -// CHECK:STDOUT: %.loc34_17.8: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_17.9: = bound_method %.loc34_16, %.loc34_17.8 [template = constants.%.39] -// CHECK:STDOUT: %.loc34_17.10: = specific_function %.loc34_17.9, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %.loc34_17.10(%.loc34_16) [template = constants.%.41] -// CHECK:STDOUT: %.loc34_17.11: init %i32 = converted %.loc34_16, %int.convert_checked.loc34_17.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc34_17.12: %i32 = tuple_access %.loc34_8.1, element1 -// CHECK:STDOUT: %.loc34_17.13: init %i32 = initialize_from %.loc34_17.11 to %.loc34_17.12 [template = constants.%.41] -// CHECK:STDOUT: %.loc34_17.14: init %tuple.type.2 = tuple_init (%.loc34_17.7, %.loc34_17.13) to %.loc34_8.1 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc34_10: init %tuple.type.2 = converted %.loc34_17.1, %.loc34_17.14 [template = constants.%tuple.3] +// CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc34: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc34_17.1: %tuple.type.1 = tuple_literal (%int_1.loc34, %int_2.loc34) +// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc34_17.1: = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc34_17.1: = specific_function %Convert.bound.loc34_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %Convert.specific_fn.loc34_17.1(%int_1.loc34) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc34_17.2: init %i32 = converted %int_1.loc34, %int.convert_checked.loc34_17.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc34: %i32 = tuple_access %.loc34_8.1, element0 +// CHECK:STDOUT: %.loc34_17.3: init %i32 = initialize_from %.loc34_17.2 to %tuple.elem0.loc34 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc34_17.2: = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc34_17.2: = specific_function %Convert.bound.loc34_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %Convert.specific_fn.loc34_17.2(%int_2.loc34) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc34_17.4: init %i32 = converted %int_2.loc34, %int.convert_checked.loc34_17.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc34: %i32 = tuple_access %.loc34_8.1, element1 +// CHECK:STDOUT: %.loc34_17.5: init %i32 = initialize_from %.loc34_17.4 to %tuple.elem1.loc34 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc34_17.6: init %tuple.type.2 = tuple_init (%.loc34_17.3, %.loc34_17.5) to %.loc34_8.1 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc34_10: init %tuple.type.2 = converted %.loc34_17.1, %.loc34_17.6 [template = constants.%tuple.3] // 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: %tuple.type.2 = tuple_value (%.loc34_4, %.loc34_7) // CHECK:STDOUT: %.loc34_8.2: %tuple.type.2 = converted %.loc34_8.1, %tuple.loc34 -// CHECK:STDOUT: %.loc39_3: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc39_3: init type = call constants.%Int(%.loc39_3) [template = constants.%i32] -// CHECK:STDOUT: %.loc39_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc39_9: init type = call constants.%Int(%.loc39_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc39_3: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc39_3: init type = call constants.%Int(%int_32.loc39_3) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc39_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc39_9: init type = call constants.%Int(%int_32.loc39_9) [template = constants.%i32] // CHECK:STDOUT: %.loc39_12.1: type = value_of_initializer %int.make_type_signed.loc39_9 [template = constants.%i32] // CHECK:STDOUT: %.loc39_12.2: type = converted %int.make_type_signed.loc39_9, %.loc39_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc39_12.3: type = ptr_type %i32 [template = constants.%.42] -// CHECK:STDOUT: assign %int.make_type_signed.loc39_3, %.loc39_12.3 -// CHECK:STDOUT: %.loc44_9: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_17: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_18.1: %.43 = struct_literal (%.loc44_9, %.loc44_17) -// CHECK:STDOUT: %.loc44_28: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc44_36: Core.IntLiteral = int_value 4 [template = constants.%.32] -// CHECK:STDOUT: %.loc44_37.1: %.43 = struct_literal (%.loc44_28, %.loc44_36) +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: assign %int.make_type_signed.loc39_3, %ptr +// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc44_18.1: %struct_type.x.y = struct_literal (%int_1.loc44, %int_2.loc44) +// CHECK:STDOUT: %int_3.loc44: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4.loc44: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc44_37.1: %struct_type.x.y = struct_literal (%int_3.loc44, %int_4.loc44) // CHECK:STDOUT: %.loc44_37.2: Core.IntLiteral = struct_access %.loc44_18.1, element0 -// CHECK:STDOUT: %.loc44_37.3: init Core.IntLiteral = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc44_37.3: init Core.IntLiteral = initialize_from %int_3.loc44 to %.loc44_37.2 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc44_37.4: Core.IntLiteral = struct_access %.loc44_18.1, element1 -// CHECK:STDOUT: %.loc44_37.5: init Core.IntLiteral = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.32] -// CHECK:STDOUT: %.loc44_37.6: init %.43 = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc44_20: init %.43 = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_37.5: init Core.IntLiteral = initialize_from %int_4.loc44 to %.loc44_37.4 [template = constants.%int_4] +// CHECK:STDOUT: %.loc44_37.6: init %struct_type.x.y = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_20: init %struct_type.x.y = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] // CHECK:STDOUT: assign %.loc44_18.1, %.loc44_20 -// CHECK:STDOUT: %struct: %.43 = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc44_18.2: %.43 = converted %.loc44_18.1, %struct [template = constants.%struct.2] -// CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.45] -// CHECK:STDOUT: if %.loc49_7 br !if.expr.then.loc49 else br !if.expr.else.loc49 +// CHECK:STDOUT: %struct: %struct_type.x.y = struct_value (%int_1.loc44, %int_2.loc44) [template = constants.%struct.2] +// CHECK:STDOUT: %.loc44_18.2: %struct_type.x.y = converted %.loc44_18.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %true.loc49: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc49 br !if.expr.then.loc49 else br !if.expr.else.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc49: -// CHECK:STDOUT: %.loc49_17: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc49_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc49: init type = call constants.%Int(%.loc49_12.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_12.2: type = value_of_initializer %int.make_type_signed.loc49 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_12.3: type = converted %int.make_type_signed.loc49, %.loc49_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_12.4: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_12.5: = bound_method %.loc49_17, %.loc49_12.4 [template = constants.%.28] -// CHECK:STDOUT: %.loc49_12.6: = specific_function %.loc49_12.5, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %.loc49_12.6(%.loc49_17) [template = constants.%.30] -// CHECK:STDOUT: %.loc49_12.7: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%.30] -// CHECK:STDOUT: %.loc49_12.8: %i32 = converted %.loc49_17, %.loc49_12.7 [template = constants.%.30] -// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.8) +// CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_32.loc49: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc49: init type = call constants.%Int(%int_32.loc49) [template = constants.%i32] +// CHECK:STDOUT: %.loc49_12.1: type = value_of_initializer %int.make_type_signed.loc49 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_12.2: type = converted %int.make_type_signed.loc49, %.loc49_12.1 [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc49_12: = bound_method %int_1.loc49, %impl.elem0.loc49_12 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc49_12: = specific_function %Convert.bound.loc49_12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %Convert.specific_fn.loc49_12(%int_1.loc49) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc49_12.3: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc49_12.4: %i32 = converted %int_1.loc49, %.loc49_12.3 [template = constants.%int_1.2] +// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.4) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: -// CHECK:STDOUT: %.loc49_24: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc49_19.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_19.2: = bound_method %.loc49_24, %.loc49_19.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc49_19.3: = specific_function %.loc49_19.2, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %.loc49_19.3(%.loc49_24) [template = constants.%.41] -// CHECK:STDOUT: %.loc49_19.4: %i32 = value_of_initializer %int.convert_checked.loc49_19 [template = constants.%.41] -// CHECK:STDOUT: %.loc49_19.5: %i32 = converted %.loc49_24, %.loc49_19.4 [template = constants.%.41] -// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_19.5) +// CHECK:STDOUT: %int_2.loc49: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc49_19: = bound_method %int_2.loc49, %impl.elem0.loc49_19 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc49_19: = specific_function %Convert.bound.loc49_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %Convert.specific_fn.loc49_19(%int_2.loc49) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc49_19.1: %i32 = value_of_initializer %int.convert_checked.loc49_19 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc49_19.2: %i32 = converted %int_2.loc49, %.loc49_19.1 [template = constants.%int_2.2] +// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_19.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc49: -// CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%.30] -// CHECK:STDOUT: %.loc49_29: Core.IntLiteral = int_value 3 [template = constants.%.31] -// CHECK:STDOUT: %.loc49_27.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_27.2: = bound_method %.loc49_29, %.loc49_27.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc49_27.3: = specific_function %.loc49_27.2, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %.loc49_27.3(%.loc49_29) [template = constants.%.48] -// CHECK:STDOUT: %.loc49_27.4: init %i32 = converted %.loc49_29, %int.convert_checked.loc49_27 [template = constants.%.48] -// CHECK:STDOUT: assign %.loc49_4, %.loc49_27.4 -// CHECK:STDOUT: %.loc52_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%.loc52_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc52_10.2: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] -// CHECK:STDOUT: %.loc52_10.3: type = converted %int.make_type_signed.loc52, %.loc52_10.2 [template = constants.%i32] +// CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%int_1.2] +// CHECK:STDOUT: %int_3.loc49: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc49_27: = bound_method %int_3.loc49, %impl.elem0.loc49_27 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc49_27: = specific_function %Convert.bound.loc49_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %Convert.specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc49_27: init %i32 = converted %int_3.loc49, %int.convert_checked.loc49_27 [template = constants.%int_3.2] +// CHECK:STDOUT: assign %.loc49_4, %.loc49_27 +// CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%int_32.loc52) [template = constants.%i32] +// CHECK:STDOUT: %.loc52_10.1: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] +// CHECK:STDOUT: %.loc52_10.2: type = converted %int.make_type_signed.loc52, %.loc52_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc56_7: bool = bool_literal true [template = constants.%.45] -// CHECK:STDOUT: if %.loc56_7 br !if.expr.then.loc56 else br !if.expr.else.loc56 +// CHECK:STDOUT: %true.loc56: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc56 br !if.expr.then.loc56 else br !if.expr.else.loc56 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc56: // CHECK:STDOUT: %a.ref.loc56_17: ref %i32 = name_ref a, %a @@ -285,13 +285,13 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc56: // CHECK:STDOUT: %.loc56_4: %i32 = block_arg !if.expr.result.loc56 -// CHECK:STDOUT: %.loc56_29: Core.IntLiteral = int_value 10 [template = constants.%.49] -// CHECK:STDOUT: %.loc56_27.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc56_27.2: = bound_method %.loc56_29, %.loc56_27.1 [template = constants.%.50] -// CHECK:STDOUT: %.loc56_27.3: = specific_function %.loc56_27.2, @Convert.2(constants.%.1) [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %.loc56_27.3(%.loc56_29) [template = constants.%.52] -// CHECK:STDOUT: %.loc56_27.4: init %i32 = converted %.loc56_29, %int.convert_checked.loc56 [template = constants.%.52] -// CHECK:STDOUT: assign %.loc56_4, %.loc56_27.4 +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] +// CHECK:STDOUT: %impl.elem0.loc56: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc56: = bound_method %int_10, %impl.elem0.loc56 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %Convert.specific_fn.loc56: = specific_function %Convert.bound.loc56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %Convert.specific_fn.loc56(%int_10) [template = constants.%int_10.2] +// CHECK:STDOUT: %.loc56_27: init %i32 = converted %int_10, %int.convert_checked.loc56 [template = constants.%int_10.2] +// CHECK:STDOUT: assign %.loc56_4, %.loc56_27 // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 49e040638940d..66a2ba6133b25 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -26,26 +26,26 @@ fn Main() { // CHECK:STDOUT: --- fail_redundant_compound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,10 +68,10 @@ fn Main() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -80,31 +80,31 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc11_25.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_25.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_25.2: %i32 = converted %int_0, %.loc11_25.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc11_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed, %.loc14_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_17.2: = bound_method %.loc14_16, %.loc14_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_17.3(%.loc14_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_17.4: init %i32 = converted %.loc14_16, %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: assign %a.var, %.loc14_17.4 +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc14_17: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: assign %a.var, %.loc14_17 // CHECK:STDOUT: %a.ref.loc19_3: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_7: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_10: ref %i32 = name_ref a, %a diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 83b7b33334067..792ab5be51c0e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -25,7 +25,7 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,8 +53,8 @@ fn Main() { // CHECK:STDOUT: %.loc18_10.2: type = converted %bool.make_type, %.loc18_10.1 [template = bool] // CHECK:STDOUT: %x.var: ref bool = var x // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var -// CHECK:STDOUT: %.loc18_21: Core.IntLiteral = int_value 12 [template = constants.%.1] -// CHECK:STDOUT: %.loc18_17.1: bool = converted %.loc18_21, [template = ] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12] +// CHECK:STDOUT: %.loc18_17.1: bool = converted %int_12, [template = ] // CHECK:STDOUT: %.loc18_17.2: = not [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return 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 0aa5a7f1a9b95..b9159fa3ff905 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -24,19 +24,19 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.30: f64 = float_literal 5.6000000000000005 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,22 +59,22 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %a.var, %.loc12_17.4 +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: assign %a.var, %.loc12_17 // CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_5: %i32 = converted %.loc19_7, [template = ] +// CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [template = constants.%float] +// CHECK:STDOUT: %.loc19: %i32 = converted %float, [template = ] // CHECK:STDOUT: assign %a.ref, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index 38846bc248d47..fb16090423dcb 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -24,14 +24,14 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_type_mismatch_once.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 3.4000000000000004 [template] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,10 +53,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -64,9 +64,9 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_10: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_15: f64 = float_literal 3.4000000000000004 [template = constants.%.3] -// CHECK:STDOUT: %.loc21_21: Core.IntLiteral = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %int_12.loc21_10: Core.IntLiteral = int_value 12 [template = constants.%int_12] +// CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [template = constants.%float] +// CHECK:STDOUT: %int_12.loc21_21: Core.IntLiteral = int_value 12 [template = constants.%int_12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 01490770a06a1..3af3394a67679 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -18,14 +18,14 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_unimplemented_op.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 34 [template] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,10 +47,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -58,8 +58,8 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_15: Core.IntLiteral = int_value 34 [template = constants.%.3] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12] +// CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template = constants.%int_34] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index a177d0f32523d..af800fc395623 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -34,14 +34,14 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] @@ -110,14 +110,14 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: return %.loc11_25 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: return %true // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: return %.loc12_25 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: return %true // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Or() -> bool { @@ -127,35 +127,35 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 // CHECK:STDOUT: %.loc15_14.3: bool = not %.loc15_14.2 -// CHECK:STDOUT: %.loc15_14.4: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc15_14.3 br !or.rhs else br !or.result(%.loc15_14.4) +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc15_14.3 br !or.rhs else br !or.result(%true) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: // 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 -// CHECK:STDOUT: br !or.result(%.loc15_14.6) +// CHECK:STDOUT: %.loc15_14.4: bool = value_of_initializer %G.call +// CHECK:STDOUT: %.loc15_14.5: bool = converted %G.call, %.loc15_14.4 +// CHECK:STDOUT: br !or.result(%.loc15_14.5) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc15_14.7: bool = block_arg !or.result -// CHECK:STDOUT: return %.loc15_14.7 +// CHECK:STDOUT: %.loc15_14.6: bool = block_arg !or.result +// CHECK:STDOUT: return %.loc15_14.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc19_18.1: bool = not %.loc19_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_18.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc19_18.1 br !or.rhs.loc19 else br !or.result.loc19(%.loc19_18.2) +// CHECK:STDOUT: %true.loc19_13: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc19_18.1: bool = not %true.loc19_13 [template = constants.%false] +// CHECK:STDOUT: %true.loc19_18: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc19_18.1 br !or.rhs.loc19 else br !or.result.loc19(%true.loc19_18) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc19: -// CHECK:STDOUT: %.loc19_21: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: br !or.result.loc19(%.loc19_21) +// CHECK:STDOUT: %true.loc19_21: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: br !or.result.loc19(%true.loc19_21) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc19: -// CHECK:STDOUT: %.loc19_18.3: bool = block_arg !or.result.loc19 [template = constants.%.1] -// CHECK:STDOUT: if %.loc19_18.3 br !if.expr.then.loc19 else br !if.expr.else.loc19 +// CHECK:STDOUT: %.loc19_18.2: bool = block_arg !or.result.loc19 [template = constants.%true] +// CHECK:STDOUT: if %.loc19_18.2 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: // CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] @@ -172,20 +172,20 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_46: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %a.var, %.loc19_46 -// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc20_18.1: bool = not %.loc20_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc20_18.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc20_18.1 br !or.rhs.loc20 else br !or.result.loc20(%.loc20_18.2) +// CHECK:STDOUT: %true.loc19_46: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true.loc19_46 +// CHECK:STDOUT: %true.loc20_13: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc20_18.1: bool = not %true.loc20_13 [template = constants.%false] +// CHECK:STDOUT: %true.loc20_18: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc20_18.1 br !or.rhs.loc20 else br !or.result.loc20(%true.loc20_18) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc20: -// CHECK:STDOUT: %.loc20_21: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: br !or.result.loc20(%.loc20_21) +// CHECK:STDOUT: %false.loc20: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !or.result.loc20(%false.loc20) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc20: -// CHECK:STDOUT: %.loc20_18.3: bool = block_arg !or.result.loc20 [template = constants.%.1] -// CHECK:STDOUT: if %.loc20_18.3 br !if.expr.then.loc20 else br !if.expr.else.loc20 +// CHECK:STDOUT: %.loc20_18.2: bool = block_arg !or.result.loc20 [template = constants.%true] +// CHECK:STDOUT: if %.loc20_18.2 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: // CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] @@ -202,20 +202,20 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_47: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %b.var, %.loc20_47 -// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc21_19.1: bool = not %.loc21_13 [template = constants.%.1] -// CHECK:STDOUT: %.loc21_19.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc21_19.1 br !or.rhs.loc21 else br !or.result.loc21(%.loc21_19.2) +// CHECK:STDOUT: %true.loc20_47: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %b.var, %true.loc20_47 +// CHECK:STDOUT: %false.loc21: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %.loc21_19.1: bool = not %false.loc21 [template = constants.%true] +// CHECK:STDOUT: %true.loc21_19: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc21_19.1 br !or.rhs.loc21 else br !or.result.loc21(%true.loc21_19) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc21: -// CHECK:STDOUT: %.loc21_22: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: br !or.result.loc21(%.loc21_22) +// CHECK:STDOUT: %true.loc21_22: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: br !or.result.loc21(%true.loc21_22) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc21: -// CHECK:STDOUT: %.loc21_19.3: bool = block_arg !or.result.loc21 [template = constants.%.1] -// CHECK:STDOUT: if %.loc21_19.3 br !if.expr.then.loc21 else br !if.expr.else.loc21 +// CHECK:STDOUT: %.loc21_19.2: bool = block_arg !or.result.loc21 [template = constants.%true] +// CHECK:STDOUT: if %.loc21_19.2 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: // CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] @@ -232,20 +232,20 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = bool] // CHECK:STDOUT: %c.var: ref bool = var c // CHECK:STDOUT: %c: ref bool = bind_name c, %c.var -// CHECK:STDOUT: %.loc21_47: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %c.var, %.loc21_47 -// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc22_19.1: bool = not %.loc22_13 [template = constants.%.1] -// CHECK:STDOUT: %.loc22_19.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc22_19.1 br !or.rhs.loc22 else br !or.result.loc22(%.loc22_19.2) +// CHECK:STDOUT: %true.loc21_47: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %c.var, %true.loc21_47 +// CHECK:STDOUT: %false.loc22_13: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %.loc22_19.1: bool = not %false.loc22_13 [template = constants.%true] +// CHECK:STDOUT: %true.loc22: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc22_19.1 br !or.rhs.loc22 else br !or.result.loc22(%true.loc22) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc22: -// CHECK:STDOUT: %.loc22_22: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: br !or.result.loc22(%.loc22_22) +// CHECK:STDOUT: %false.loc22_22: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !or.result.loc22(%false.loc22_22) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc22: -// CHECK:STDOUT: %.loc22_19.3: bool = block_arg !or.result.loc22 [template = constants.%.2] -// CHECK:STDOUT: if %.loc22_19.3 br !if.expr.then.loc22 else br !if.expr.else.loc22 +// CHECK:STDOUT: %.loc22_19.2: bool = block_arg !or.result.loc22 [template = constants.%false] +// CHECK:STDOUT: if %.loc22_19.2 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] @@ -271,18 +271,18 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26_13: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc26_18.1: bool = not %.loc26_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc26_18.2: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc26_18.1 br !or.rhs else br !or.result(%.loc26_18.2) +// CHECK:STDOUT: %true.loc26_13: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc26_18.1: bool = not %true.loc26_13 [template = constants.%false] +// CHECK:STDOUT: %true.loc26_18: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %.loc26_18.1 br !or.rhs else br !or.result(%true.loc26_18) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: // CHECK:STDOUT: %x.ref: bool = name_ref x, %x // CHECK:STDOUT: br !or.result(%x.ref) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc26_18.3: bool = block_arg !or.result [template = constants.%.1] -// CHECK:STDOUT: if %.loc26_18.3 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %.loc26_18.2: bool = block_arg !or.result [template = constants.%true] +// CHECK:STDOUT: if %.loc26_18.2 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %bool.make_type.loc26: init type = call constants.%Bool() [template = bool] @@ -299,8 +299,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc26_43: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %a.var, %.loc26_43 +// CHECK:STDOUT: %true.loc26_43: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true.loc26_43 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 41a6abcf0a2fb..dfc80f429fd5c 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -28,8 +28,8 @@ fn Constant() { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Not.type: type = fn_type @Not [template] // CHECK:STDOUT: %Not: %Not.type = struct_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] @@ -87,8 +87,8 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_17: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc19_13: bool = not %.loc19_17 [template = constants.%.2] +// CHECK:STDOUT: %true.loc19: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc19_13: bool = not %true.loc19 [template = constants.%false] // CHECK:STDOUT: if %.loc19_13 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: @@ -110,8 +110,8 @@ fn Constant() { // CHECK:STDOUT: %.loc19_43.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc19_44: init %empty_tuple.type = converted %.loc19_43.1, %.loc19_43.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc19_44 -// CHECK:STDOUT: %.loc20_17: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc20_13: bool = not %.loc20_17 [template = constants.%.1] +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %.loc20_13: bool = not %false [template = constants.%true] // CHECK:STDOUT: if %.loc20_13 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: @@ -129,19 +129,19 @@ fn Constant() { // CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_43: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: assign %b.var, %.loc20_43 +// CHECK:STDOUT: %true.loc20: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %b.var, %true.loc20 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_26: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: %.loc15_22: bool = not %.loc15_26 [template = constants.%.2] -// CHECK:STDOUT: %not_true: bool = bind_name not_true, %.loc15_22 -// CHECK:STDOUT: %.loc16_27: bool = bool_literal false [template = constants.%.2] -// CHECK:STDOUT: %.loc16_23: bool = not %.loc16_27 [template = constants.%.1] -// CHECK:STDOUT: %not_false: bool = bind_name not_false, %.loc16_23 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc15: bool = not %true [template = constants.%false] +// CHECK:STDOUT: %not_true: bool = bind_name not_true, %.loc15 +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: %.loc16: bool = not %false [template = constants.%true] +// CHECK:STDOUT: %not_false: bool = bind_name not_false, %.loc16 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 6f289696485d8..35ee1d371bfb9 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 57d956f834b2c..146ab34194e9c 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %BitAndAssign.type: type = facet_type <@BitAndAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitAndAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 e2ac1e7e8920d..106f8d0655658 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -28,14 +28,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %BitComplement.type: type = facet_type <@BitComplement> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: } @@ -91,36 +91,36 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C]() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref) to %.loc23_17.2 // 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 239013d2d1107..ebb1336ce71ac 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %BitOr.type: type = facet_type <@BitOr> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %BitOrAssign.type: type = facet_type <@BitOrAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitOrAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 f361866455704..1f948dc7f622d 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %BitXor.type: type = facet_type <@BitXor> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %BitXorAssign.type: type = facet_type <@BitXorAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitXorAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 3a86b2f4cf1b2..8e6e96c41460e 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -27,18 +27,18 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,46 +68,46 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Dec.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc18_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc18: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // 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.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %.3](); +// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %ptr.1](); // 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: %.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: %.loc22_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc22_15.2: init %C = class_init (), %c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 -// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr) // 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 716a42714a227..d03e090004241 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Div.type: type = facet_type <@Div> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %DivAssign.type: type = facet_type <@DivAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %DivAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 3c7c0d7b132ea..c18ed8d278f1e 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -86,8 +86,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -97,7 +97,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] @@ -211,20 +211,20 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = %.loc6 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Equal.1[%self.param_patt: %C](%other.param_patt: %C) -> bool; @@ -235,9 +235,9 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] -// CHECK:STDOUT: %.loc12_12.2: = bound_method %a.ref, %.loc12_12.1 -// CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Equal.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %Equal.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %Equal.call: init bool = call %Equal.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call // CHECK:STDOUT: %.loc12_16.2: bool = converted %Equal.call, %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -247,9 +247,9 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%NotEqual.1] -// CHECK:STDOUT: %.loc16_12.2: = bound_method %a.ref, %.loc16_12.1 -// CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem1: %NotEqual.type.2 = interface_witness_access constants.%interface, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %NotEqual.bound: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: %NotEqual.call: init bool = call %NotEqual.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call // CHECK:STDOUT: %.loc16_16.2: bool = converted %NotEqual.call, %.loc16_16.1 // CHECK:STDOUT: return %.loc16_16.2 @@ -259,8 +259,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] @@ -330,11 +330,11 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestEqual(%a.param_patt: %D, %b.param_patt: %D) -> bool { @@ -355,8 +355,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -366,7 +366,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] // CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] @@ -483,28 +483,28 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = %.loc7 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Equal.1[%self.param_patt: %C](%other.param_patt: %C) -> bool; @@ -515,10 +515,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] -// CHECK:STDOUT: %.loc23_12.2: = bound_method %a.ref, %.loc23_12.1 +// CHECK:STDOUT: %impl.elem0: %Equal.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %Equal.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [template = ] -// CHECK:STDOUT: %Equal.call: init bool = call %.loc23_12.2(%a.ref, ) +// CHECK:STDOUT: %Equal.call: init bool = call %Equal.bound(%a.ref, ) // CHECK:STDOUT: %.loc23_16.1: bool = value_of_initializer %Equal.call // CHECK:STDOUT: %.loc23_16.2: bool = converted %Equal.call, %.loc23_16.1 // CHECK:STDOUT: return %.loc23_16.2 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 7cf4bc33be7cd..b84d2365b18e0 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -44,20 +44,20 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] @@ -119,63 +119,63 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %Inc.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc16_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc16: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // 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.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc15 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc19_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc19: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.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: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc18 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %.3](); +// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %ptr.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.3](%other.param_patt: %C); +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.1](%other.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @TestIncNonRef(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc30_3.2: = bound_method %a.ref, %.loc30_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc30_3.2() +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -183,9 +183,9 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc40_5.2: = bound_method %a.ref, %.loc40_5.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc40_5.2(, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(, %b.ref) // 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 cdbc08e9ae3ea..14c53c587abff 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -45,15 +45,15 @@ fn TestRef(b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %TestUnary.type: type = fn_type @TestUnary [template] // CHECK:STDOUT: %TestUnary: %TestUnary.type = struct_value () [template] // CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [template] // CHECK:STDOUT: %TestBinary: %TestBinary.type = struct_value () [template] // CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [template] // CHECK:STDOUT: %TestRef: %TestRef.type = struct_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,11 +119,11 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestUnary(%a.param_patt: %C) -> %return: %C { @@ -144,9 +144,9 @@ fn TestRef(b: C) { // CHECK:STDOUT: %C.ref.loc32: 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: %.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: %.loc32_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc32_15.2: init %C = class_init (), %a.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc32_16: init %C = converted %.loc32_15.1, %.loc32_15.2 [template = constants.%C.val] // 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 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 5e1f970d8e3c6..3c22fcb61fc93 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 @@ -52,26 +52,26 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -154,65 +154,65 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc16 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc20_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc20: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc19 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C); +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.1](%other.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @Test(%a.param_patt: %C, %b.param_patt: %D) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc34_12.2: = bound_method %a.ref, %.loc34_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_21.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc34_14: %C = converted %b.ref, [template = ] -// CHECK:STDOUT: %Op.call: init %C = call %.loc34_12.2(%a.ref, ) to %.loc23_21.2 +// CHECK:STDOUT: %.loc34: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, ) to %.loc23_21.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -221,17 +221,17 @@ fn TestAssign(b: D) { // 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: %.loc38_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc38_15.2: init %C = class_init (), %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc38_16: init %C = converted %.loc38_15.1, %.loc38_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc38_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc38_15.2: init %C = class_init (), %a.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc38_16: init %C = converted %.loc38_15.1, %.loc38_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign %a.var, %.loc38_16 // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc48_5.2: = bound_method %a.ref, %.loc48_5.1 -// CHECK:STDOUT: %.loc48_3: %.6 = addr_of %a.ref -// CHECK:STDOUT: %.loc48_8: %C = converted %b.ref, [template = ] -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc48_5.2(%.loc48_3, ) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %a.ref +// CHECK:STDOUT: %.loc48: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, ) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index e89845279b912..08ab68cbf2c3d 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -35,26 +35,26 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %X, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %X.elem: type = unbound_element_type %X, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%X) [template] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [template] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [template] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [template] @@ -63,11 +63,11 @@ fn Test() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [template] // CHECK:STDOUT: %Source: %Source.type = struct_value () [template] -// CHECK:STDOUT: %.18: = specific_function %Source, @Source(%T) [symbolic] +// CHECK:STDOUT: %Source.specific_fn.1: = specific_function %Source, @Source(%T) [symbolic] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.19: = specific_function %Source, @Source(%X) [template] -// CHECK:STDOUT: %.37: = specific_function %Source, @Source(%i32) [template] +// CHECK:STDOUT: %Source.specific_fn.2: = specific_function %Source, @Source(%X) [template] +// CHECK:STDOUT: %Source.specific_fn.3: = specific_function %Source, @Source(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,7 +77,7 @@ fn Test() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+56, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+56, loaded [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,21 +92,21 @@ fn Test() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%X)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] -// CHECK:STDOUT: %.loc19_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_27) [template = constants.%i32] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc19_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc19_30.2: type = converted %int.make_type_signed, %.loc19_30.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.4] @@ -115,10 +115,10 @@ fn Test() { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_16.3: type = converted %int.make_type_signed, %.loc25_16.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc25_16.2: type = converted %int.make_type_signed, %.loc25_16.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -145,28 +145,28 @@ fn Test() { // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.3 as %ImplicitAs.type { +// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %X = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_20.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_20.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.3: type = converted %int.make_type_signed, %.loc16_20.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_signed, %.loc16_20.1 [template = constants.%i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.12] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc15_32 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %X.ref as %ImplicitAs.type { @@ -177,40 +177,40 @@ fn Test() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc20_28.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc20_28.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.3: type = converted %int.make_type_signed, %.loc20_28.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_signed, %.loc20_28.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %X = value_param runtime_param0 // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.17] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc19_32 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %X.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: .n = %.loc12_8 -// CHECK:STDOUT: complete_type_witness = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: %i32]() -> %return: %X { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %i32 = name_ref self, %self -// CHECK:STDOUT: %.loc16_51.1: %.3 = struct_literal (%self.ref) +// CHECK:STDOUT: %.loc16_51.1: %struct_type.n = struct_literal (%self.ref) // CHECK:STDOUT: %.loc16_51.2: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc16_51.3: init %i32 = initialize_from %self.ref to %.loc16_51.2 // CHECK:STDOUT: %.loc16_51.4: init %X = class_init (%.loc16_51.3), %return @@ -221,7 +221,7 @@ fn Test() { // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] // CHECK:STDOUT: %.loc20_45.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: %i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -236,14 +236,14 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_11.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %.loc27_35.2 (constants.%.18)] +// CHECK:STDOUT: %Source.specific_fn.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %Source.specific_fn.loc27_35.2 (constants.%Source.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @Source.%T.loc27_11.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Source.ref: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %T.ref.loc27_42: type = name_ref T, %T.loc27_11.1 [symbolic = %T.loc27_11.2 (constants.%T)] -// CHECK:STDOUT: %.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %.loc27_35.2 (constants.%.18)] -// CHECK:STDOUT: %Source.call: init @Source.%T.loc27_11.2 (%T) = call %.loc27_35.1() +// CHECK:STDOUT: %Source.specific_fn.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %Source.specific_fn.loc27_35.2 (constants.%Source.specific_fn.1)] +// CHECK:STDOUT: %Source.call: init @Source.%T.loc27_11.2 (%T) = call %Source.specific_fn.loc27_35.1() // CHECK:STDOUT: %.loc27_44.1: @Source.%T.loc27_11.2 (%T) = value_of_initializer %Source.call // CHECK:STDOUT: %.loc27_44.2: @Source.%T.loc27_11.2 (%T) = converted %Source.call, %.loc27_44.1 // CHECK:STDOUT: return %.loc27_44.2 @@ -255,35 +255,35 @@ fn Test() { // CHECK:STDOUT: %Sink_i32.ref: %Sink_i32.type = name_ref Sink_i32, file.%Sink_i32.decl [template = constants.%Sink_i32] // CHECK:STDOUT: %Source.ref.loc30: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.19] +// CHECK:STDOUT: %Source.specific_fn.loc30: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%Source.specific_fn.2] // CHECK:STDOUT: %.loc30_20.1: ref %X = temporary_storage -// CHECK:STDOUT: %Source.call.loc30: init %X = call %.loc30_12() to %.loc30_20.1 -// CHECK:STDOUT: %.loc30_20.2: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] -// CHECK:STDOUT: %.loc30_20.3: = bound_method %Source.call.loc30, %.loc30_20.2 -// CHECK:STDOUT: %.loc30_20.4: ref %X = temporary %.loc30_20.1, %Source.call.loc30 -// CHECK:STDOUT: %.loc30_20.5: %X = bind_value %.loc30_20.4 -// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %.loc30_20.3(%.loc30_20.5) -// CHECK:STDOUT: %.loc30_20.6: %i32 = value_of_initializer %Convert.call.loc30 -// CHECK:STDOUT: %.loc30_20.7: %i32 = converted %Source.call.loc30, %.loc30_20.6 -// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_20.7) +// CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.specific_fn.loc30() to %.loc30_20.1 +// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.5 = interface_witness_access constants.%interface.2, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %Convert.bound.loc30: = bound_method %Source.call.loc30, %impl.elem0.loc30 +// CHECK:STDOUT: %.loc30_20.2: ref %X = temporary %.loc30_20.1, %Source.call.loc30 +// CHECK:STDOUT: %.loc30_20.3: %X = bind_value %.loc30_20.2 +// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %Convert.bound.loc30(%.loc30_20.3) +// CHECK:STDOUT: %.loc30_20.4: %i32 = value_of_initializer %Convert.call.loc30 +// CHECK:STDOUT: %.loc30_20.5: %i32 = converted %Source.call.loc30, %.loc30_20.4 +// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_20.5) // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [template = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc31: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] -// CHECK:STDOUT: %.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc31_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc31_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc31_20.2: type = converted %int.make_type_signed, %.loc31_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%.37] -// CHECK:STDOUT: %Source.call.loc31: init %i32 = call %.loc31_10() -// CHECK:STDOUT: %.loc31_20.3: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc31_20.4: = bound_method %Source.call.loc31, %.loc31_20.3 -// CHECK:STDOUT: %.loc31_20.5: ref %X = temporary_storage -// CHECK:STDOUT: %.loc31_20.6: %i32 = value_of_initializer %Source.call.loc31 -// CHECK:STDOUT: %.loc31_20.7: %i32 = converted %Source.call.loc31, %.loc31_20.6 -// CHECK:STDOUT: %Convert.call.loc31: init %X = call %.loc31_20.4(%.loc31_20.7) to %.loc31_20.5 -// CHECK:STDOUT: %.loc31_20.8: init %X = converted %Source.call.loc31, %Convert.call.loc31 -// CHECK:STDOUT: %.loc31_20.9: ref %X = temporary %.loc31_20.5, %.loc31_20.8 -// CHECK:STDOUT: %.loc31_20.10: %X = bind_value %.loc31_20.9 -// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_20.10) +// CHECK:STDOUT: %Source.specific_fn.loc31: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%Source.specific_fn.3] +// CHECK:STDOUT: %Source.call.loc31: init %i32 = call %Source.specific_fn.loc31() +// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %Convert.bound.loc31: = bound_method %Source.call.loc31, %impl.elem0.loc31 +// CHECK:STDOUT: %.loc31_20.3: ref %X = temporary_storage +// CHECK:STDOUT: %.loc31_20.4: %i32 = value_of_initializer %Source.call.loc31 +// CHECK:STDOUT: %.loc31_20.5: %i32 = converted %Source.call.loc31, %.loc31_20.4 +// CHECK:STDOUT: %Convert.call.loc31: init %X = call %Convert.bound.loc31(%.loc31_20.5) to %.loc31_20.3 +// CHECK:STDOUT: %.loc31_20.6: init %X = converted %Source.call.loc31, %Convert.call.loc31 +// CHECK:STDOUT: %.loc31_20.7: ref %X = temporary %.loc31_20.3, %.loc31_20.6 +// CHECK:STDOUT: %.loc31_20.8: %X = bind_value %.loc31_20.7 +// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_20.8) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -292,7 +292,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.18 +// CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(%T.loc27_11.2) { @@ -305,7 +305,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.19 +// CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%i32) { @@ -313,6 +313,6 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.37 +// CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 357ab34ff8916..0f3ac8a7c2e28 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -27,18 +27,18 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [template] -// CHECK:STDOUT: %.3: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,46 +68,46 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Inc.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc18_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc18: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // 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.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %.3](); +// CHECK:STDOUT: fn @Op.1[addr %self.param_patt: %ptr.1](); // 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: %.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: %.loc22_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc22_15.2: init %C = class_init (), %c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 -// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.1 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 2838029effc03..7e37956dd08a3 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -80,20 +80,20 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ElementType.1: type = class_type @ElementType [template] // CHECK:STDOUT: %SubscriptType.1: type = class_type @SubscriptType [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.3: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.1, %ElementType.1)> [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] -// CHECK:STDOUT: %.10: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] -// CHECK:STDOUT: %struct.2: %SubscriptType.1 = struct_value () [template] -// CHECK:STDOUT: %struct.3: %C = struct_value () [template] +// CHECK:STDOUT: %interface: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %ElementType.val: %ElementType.1 = struct_value () [template] +// CHECK:STDOUT: %SubscriptType.val: %SubscriptType.1 = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,7 +102,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] +// CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -122,7 +122,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.1 [template = constants.%IndexWith] +// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.1 [template = constants.%IndexWith.generic] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.1, constants.%ElementType.1)> [template = constants.%IndexWith.type.3] @@ -151,107 +151,107 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = %.loc8 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ElementType { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%ElementType.1 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SubscriptType { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SubscriptType.1 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %C](%subscript.param_patt: %SubscriptType.1) -> %return: %ElementType.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc10_13.2: init %ElementType.1 = class_init (), %return [template = constants.%struct.1] -// CHECK:STDOUT: %.loc10_14: init %ElementType.1 = converted %.loc10_13.1, %.loc10_13.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc10_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc10_13.2: init %ElementType.1 = class_init (), %return [template = constants.%ElementType.val] +// CHECK:STDOUT: %.loc10_14: init %ElementType.1 = converted %.loc10_13.1, %.loc10_13.2 [template = constants.%ElementType.val] // CHECK:STDOUT: return %.loc10_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_25.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc14_25.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc14_25.2: ref %SubscriptType.1 = temporary_storage -// CHECK:STDOUT: %.loc14_25.3: init %SubscriptType.1 = class_init (), %.loc14_25.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc14_25.3: init %SubscriptType.1 = class_init (), %.loc14_25.2 [template = constants.%SubscriptType.val] // CHECK:STDOUT: %.loc14_25.4: ref %SubscriptType.1 = temporary %.loc14_25.2, %.loc14_25.3 // CHECK:STDOUT: %.loc14_26.1: ref %SubscriptType.1 = converted %.loc14_25.1, %.loc14_25.4 // CHECK:STDOUT: %.loc14_26.2: %SubscriptType.1 = bind_value %.loc14_26.1 // CHECK:STDOUT: %s: %SubscriptType.1 = bind_name s, %.loc14_26.2 -// CHECK:STDOUT: %.loc15_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15_13.1: %empty_struct_type = 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.3] +// CHECK:STDOUT: %.loc15_13.3: init %C = class_init (), %.loc15_13.2 [template = constants.%C.val] // 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: %c: %C = bind_name c, %.loc15_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %s.ref: %SubscriptType.1 = name_ref s, %s -// CHECK:STDOUT: %.loc16_25.1: %At.type.3 = interface_witness_access constants.%.10, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc16_25.2: = bound_method %c.ref, %.loc16_25.1 -// CHECK:STDOUT: %.loc16_25.3: ref %ElementType.1 = temporary_storage -// CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc16_25.2(%c.ref, %s.ref) to %.loc16_25.3 -// CHECK:STDOUT: %.loc16_25.4: ref %ElementType.1 = temporary %.loc16_25.3, %At.call -// CHECK:STDOUT: %.loc16_25.5: %ElementType.1 = bind_value %.loc16_25.4 -// CHECK:STDOUT: %x: %ElementType.1 = bind_name x, %.loc16_25.5 +// CHECK:STDOUT: %impl.elem0: %At.type.3 = interface_witness_access constants.%interface, element0 [template = constants.%At.2] +// CHECK:STDOUT: %At.bound: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %.loc16_25.1: ref %ElementType.1 = temporary_storage +// CHECK:STDOUT: %At.call: init %ElementType.1 = call %At.bound(%c.ref, %s.ref) to %.loc16_25.1 +// CHECK:STDOUT: %.loc16_25.2: ref %ElementType.1 = temporary %.loc16_25.1, %At.call +// CHECK:STDOUT: %.loc16_25.3: %ElementType.1 = bind_value %.loc16_25.2 +// CHECK:STDOUT: %x: %ElementType.1 = bind_name x, %.loc16_25.3 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overloaded_builtin.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.3: type = facet_type <@IndexWith, @IndexWith(%i32, %i32)> [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%i32, %i32) [template] -// CHECK:STDOUT: %.9: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.13: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.38: = bound_method %.12, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.41: = bound_method %.13, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 5 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.40, %.43) [template] -// CHECK:STDOUT: %.44: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.46: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_5.2) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -262,7 +262,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] +// CHECK:STDOUT: %import_ref.2: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -273,10 +273,10 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc4_7: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_7: init type = call constants.%Int(%.loc4_7) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_12: init type = call constants.%Int(%.loc4_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_7: init type = call constants.%Int(%int_32.loc4_7) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_12: init type = call constants.%Int(%int_32.loc4_12) [template = constants.%i32] // CHECK:STDOUT: %.loc4_15.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4_7, %int.make_type_signed.loc4_12) // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4_7 [template = constants.%i32] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4_7, %.loc4_15.2 [template = constants.%i32] @@ -284,31 +284,31 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc4_15.5: type = converted %int.make_type_signed.loc4_12, %.loc4_15.4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_15.6: type = converted %.loc4_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.2 [template = constants.%IndexWith] -// CHECK:STDOUT: %.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%.loc4_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_40: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%.loc4_40) [template = constants.%i32] +// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.2 [template = constants.%IndexWith.generic] +// CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [template = constants.%i32] // CHECK:STDOUT: %.loc4_43.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] // CHECK:STDOUT: %.loc4_43.2: type = converted %int.make_type_signed.loc4_35, %.loc4_43.1 [template = constants.%i32] // CHECK:STDOUT: %.loc4_43.3: type = value_of_initializer %int.make_type_signed.loc4_40 [template = constants.%i32] // CHECK:STDOUT: %.loc4_43.4: type = converted %int.make_type_signed.loc4_40, %.loc4_43.3 [template = constants.%i32] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%i32, constants.%i32)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10_9: init type = call constants.%Int(%.loc10_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc10_14: init type = call constants.%Int(%.loc10_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_9: init type = call constants.%Int(%int_32.loc10_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc10_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc10_14: init type = call constants.%Int(%int_32.loc10_14) [template = constants.%i32] // CHECK:STDOUT: %.loc10_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc10_9, %int.make_type_signed.loc10_14) // CHECK:STDOUT: %.loc10_17.2: type = value_of_initializer %int.make_type_signed.loc10_9 [template = constants.%i32] // CHECK:STDOUT: %.loc10_17.3: type = converted %int.make_type_signed.loc10_9, %.loc10_17.2 [template = constants.%i32] // CHECK:STDOUT: %.loc10_17.4: type = value_of_initializer %int.make_type_signed.loc10_14 [template = constants.%i32] // CHECK:STDOUT: %.loc10_17.5: type = converted %int.make_type_signed.loc10_14, %.loc10_17.4 [template = constants.%i32] // CHECK:STDOUT: %.loc10_17.6: type = converted %.loc10_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc11_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.3: type = converted %int.make_type_signed.loc11, %.loc11_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %.loc4_15.6 as %IndexWith.type { @@ -321,14 +321,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%.loc4_15.6 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%.loc5_32.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed.loc5_32, %.loc5_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%.loc5_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.2: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.3: type = converted %int.make_type_signed.loc5_40, %.loc5_40.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%int_32.loc5_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_32.1: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_signed.loc5_32, %.loc5_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%int_32.loc5_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_signed.loc5_40, %.loc5_40.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %self: %tuple.type.2 = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %i32 = value_param runtime_param1 @@ -336,52 +336,52 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_45: = interface_witness (%At.decl) [template = constants.%.9] +// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = %.loc4_45 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %tuple.type.2](%subscript.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %tuple.type.2 = name_ref self, %self -// CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.11] -// CHECK:STDOUT: %.loc6_16: %i32 = tuple_access %self.ref, element0 -// CHECK:STDOUT: return %.loc6_16 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %self.ref, element0 +// CHECK:STDOUT: return %tuple.elem0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_22: Core.IntLiteral = int_value 1 [template = constants.%.12] -// CHECK:STDOUT: %.loc10_25: Core.IntLiteral = int_value 5 [template = constants.%.13] -// CHECK:STDOUT: %.loc10_26.1: %tuple.type.3 = tuple_literal (%.loc10_22, %.loc10_25) -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_22, %.loc10_26.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %.loc10_26.4(%.loc10_22) [template = constants.%.40] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_22, %.loc10_26.5 [template = constants.%.40] -// CHECK:STDOUT: %.loc10_26.7: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.8: = bound_method %.loc10_25, %.loc10_26.7 [template = constants.%.41] -// CHECK:STDOUT: %.loc10_26.9: = specific_function %.loc10_26.8, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %.loc10_26.9(%.loc10_25) [template = constants.%.43] -// CHECK:STDOUT: %.loc10_26.10: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc10_26.11: %i32 = converted %.loc10_25, %.loc10_26.10 [template = constants.%.43] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc10_26.6, %.loc10_26.11) [template = constants.%tuple] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc10_26.1: %tuple.type.3 = tuple_literal (%int_1, %int_5) +// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_26.1: = bound_method %int_1, %impl.elem0.loc10_26.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_26.1: = specific_function %Convert.bound.loc10_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %Convert.specific_fn.loc10_26.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.2: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc10_26.3: %i32 = converted %int_1, %.loc10_26.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_26.2: = bound_method %int_5, %impl.elem0.loc10_26.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_26.2: = specific_function %Convert.bound.loc10_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %Convert.specific_fn.loc10_26.2(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc10_26.4: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc10_26.5: %i32 = converted %int_5, %.loc10_26.4 [template = constants.%int_5.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc10_26.3, %.loc10_26.5) [template = constants.%tuple] // CHECK:STDOUT: %.loc10_27: %tuple.type.2 = converted %.loc10_26.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %s: %tuple.type.2 = bind_name s, %.loc10_27 // CHECK:STDOUT: %s.ref: %tuple.type.2 = name_ref s, %s -// CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 0 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_16, %.loc11_17.1 [template = constants.%.44] -// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_16) [template = constants.%.46] -// CHECK:STDOUT: %.loc11_17.4: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_17.5: %i32 = converted %.loc11_16, %.loc11_17.4 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_17.6: %At.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc11_17.7: = bound_method %s.ref, %.loc11_17.6 -// CHECK:STDOUT: %At.call: init %i32 = call %.loc11_17.7(%s.ref, %.loc11_17.5) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0, %impl.elem0.loc11_17.1 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_17.1: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_17.2: %i32 = converted %int_0, %.loc11_17.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc11_17.2: %At.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%At.2] +// CHECK:STDOUT: %At.bound: = bound_method %s.ref, %impl.elem0.loc11_17.2 +// CHECK:STDOUT: %At.call: init %i32 = call %At.bound(%s.ref, %.loc11_17.2) // CHECK:STDOUT: %.loc11_18.1: %i32 = value_of_initializer %At.call // CHECK:STDOUT: %.loc11_18.2: %i32 = converted %At.call, %.loc11_18.1 // CHECK:STDOUT: %e: %i32 = bind_name e, %.loc11_18.2 @@ -392,20 +392,20 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ElementType.1: type = class_type @ElementType [template] // CHECK:STDOUT: %SubscriptType.1: type = class_type @SubscriptType [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.3: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.1, %ElementType.1)> [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] -// CHECK:STDOUT: %.10: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] -// CHECK:STDOUT: %struct.2: %C = struct_value () [template] -// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %ElementType.val: %ElementType.1 = struct_value () [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -415,7 +415,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] +// CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -434,7 +434,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.1 [template = constants.%IndexWith] +// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.1 [template = constants.%IndexWith.generic] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.1, constants.%ElementType.1)> [template = constants.%IndexWith.type.3] @@ -462,64 +462,64 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.10] +// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = %.loc8 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ElementType { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%ElementType.1 -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SubscriptType { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SubscriptType.1 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %C](%subscript.param_patt: %SubscriptType.1) -> %return: %ElementType.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc10_13.2: init %ElementType.1 = class_init (), %return [template = constants.%struct.1] -// CHECK:STDOUT: %.loc10_14: init %ElementType.1 = converted %.loc10_13.1, %.loc10_13.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc10_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc10_13.2: init %ElementType.1 = class_init (), %return [template = constants.%ElementType.val] +// CHECK:STDOUT: %.loc10_14: init %ElementType.1 = converted %.loc10_13.1, %.loc10_13.2 [template = constants.%ElementType.val] // CHECK:STDOUT: return %.loc10_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc14_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc14_13.2: ref %C = temporary_storage -// CHECK:STDOUT: %.loc14_13.3: init %C = class_init (), %.loc14_13.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc14_13.3: init %C = class_init (), %.loc14_13.2 [template = constants.%C.val] // CHECK:STDOUT: %.loc14_13.4: ref %C = temporary %.loc14_13.2, %.loc14_13.3 // CHECK:STDOUT: %.loc14_14.1: ref %C = converted %.loc14_13.1, %.loc14_13.4 // CHECK:STDOUT: %.loc14_14.2: %C = bind_value %.loc14_14.1 // CHECK:STDOUT: %c: %C = bind_name c, %.loc14_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc22_24: Core.IntLiteral = int_value 0 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_25.1: %SubscriptType.1 = converted %.loc22_24, [template = ] -// CHECK:STDOUT: %.loc22_25.2: %At.type.3 = interface_witness_access constants.%.10, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc22_25.3: = bound_method %c.ref, %.loc22_25.2 -// CHECK:STDOUT: %.loc22_25.4: ref %ElementType.1 = temporary_storage -// CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc22_25.3(%c.ref, ) to %.loc22_25.4 -// CHECK:STDOUT: %.loc22_25.5: ref %ElementType.1 = temporary %.loc22_25.4, %At.call -// CHECK:STDOUT: %.loc22_25.6: %ElementType.1 = bind_value %.loc22_25.5 -// CHECK:STDOUT: %x: %ElementType.1 = bind_name x, %.loc22_25.6 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc22_25.1: %SubscriptType.1 = converted %int_0, [template = ] +// CHECK:STDOUT: %impl.elem0: %At.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%At.2] +// CHECK:STDOUT: %At.bound: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %.loc22_25.2: ref %ElementType.1 = temporary_storage +// CHECK:STDOUT: %At.call: init %ElementType.1 = call %At.bound(%c.ref, ) to %.loc22_25.2 +// CHECK:STDOUT: %.loc22_25.3: ref %ElementType.1 = temporary %.loc22_25.2, %At.call +// CHECK:STDOUT: %.loc22_25.4: %ElementType.1 = bind_value %.loc22_25.3 +// CHECK:STDOUT: %x: %ElementType.1 = bind_name x, %.loc22_25.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -527,14 +527,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -556,31 +556,31 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_8.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc10_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.3: type = converted %int.make_type_signed, %.loc10_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc6_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_13.2: ref %C = temporary_storage -// CHECK:STDOUT: %.loc6_13.3: init %C = class_init (), %.loc6_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_13.3: init %C = class_init (), %.loc6_13.2 [template = constants.%C.val] // CHECK:STDOUT: %.loc6_13.4: ref %C = temporary %.loc6_13.2, %.loc6_13.3 // CHECK:STDOUT: %.loc6_14.1: ref %C = converted %.loc6_13.1, %.loc6_13.4 // CHECK:STDOUT: %.loc6_14.2: %C = bind_value %.loc6_14.1 // CHECK:STDOUT: %c: %C = bind_name c, %.loc6_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc10: Core.IntLiteral = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %x: %i32 = bind_name x, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 81e4243cb09bc..fd24ccc9d59fa 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %LeftShift.type: type = facet_type <@LeftShift> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %LeftShiftAssign.type: type = facet_type <@LeftShiftAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %LeftShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 4e2a18f3def11..6bad032a1804e 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Mod.type: type = facet_type <@Mod> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %ModAssign.type: type = facet_type <@ModAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %ModAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 fd899dc13bf4f..33fa9d836e8a4 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Mul.type: type = facet_type <@Mul> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %MulAssign.type: type = facet_type <@MulAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %MulAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 4323f636de3da..d1866083a895f 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -28,14 +28,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: } @@ -91,36 +91,36 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C]() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref) to %.loc23_17.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index f68c39f2245ea..75d92d0471323 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -54,12 +54,12 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IndexWith: type = class_type @IndexWith [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,17 +75,17 @@ fn F() { ()[()]; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @IndexWith { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%IndexWith -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_12: Core.IntLiteral = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,8 +94,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -107,8 +107,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_10: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -119,27 +119,27 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType.patt: type = symbolic_binding_pattern SubscriptType, 0 [symbolic] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.2: type = facet_type <@IndexWith, @IndexWith(%SubscriptType)> [symbolic] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @IndexWith.%At.decl [symbolic] +// CHECK:STDOUT: %At.assoc_type.1: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %At.assoc_type.1 = assoc_entity element0, @IndexWith.%At.decl [symbolic] // CHECK:STDOUT: %IndexWith.type.3: type = facet_type <@IndexWith, @IndexWith(%empty_tuple.type)> [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%empty_tuple.type) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @IndexWith.%At.decl [template] -// CHECK:STDOUT: %.6: %IndexWith.type.2 = facet_value %empty_tuple.type, %empty_tuple.type [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %At.assoc_type.2: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %At.assoc_type.2 = assoc_entity element0, @IndexWith.%At.decl [template] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.2 = facet_value %empty_tuple.type, %empty_tuple.type [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%At.2) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.8: = bound_method %empty_tuple, %At.2 [template] +// CHECK:STDOUT: %At.bound: = bound_method %empty_tuple, %At.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -150,7 +150,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Core: = namespace [template] { // CHECK:STDOUT: .IndexWith = %IndexWith.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %IndexWith.decl: %IndexWith.type.1 = interface_decl @IndexWith [template = constants.%IndexWith] { +// CHECK:STDOUT: %IndexWith.decl: %IndexWith.type.1 = interface_decl @IndexWith [template = constants.%IndexWith.generic] { // CHECK:STDOUT: %SubscriptType.patt.loc5_26.1: type = symbolic_binding_pattern SubscriptType, 0 [symbolic = %SubscriptType.patt.loc5_26.2 (constants.%SubscriptType.patt)] // CHECK:STDOUT: %SubscriptType.param_patt: type = value_param_pattern %SubscriptType.patt.loc5_26.1, runtime_param [symbolic = %SubscriptType.patt.loc5_26.2 (constants.%SubscriptType.patt)] // CHECK:STDOUT: } { @@ -161,7 +161,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %.loc9_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %Core.ref: = name_ref Core, file.%Core [template = file.%Core] -// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, file.%IndexWith.decl [template = constants.%IndexWith] +// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, file.%IndexWith.decl [template = constants.%IndexWith.generic] // CHECK:STDOUT: %.loc9_28: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_29: type = converted %.loc9_28, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%empty_tuple.type)> [template = constants.%IndexWith.type.3] @@ -178,38 +178,38 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType.loc5_26.2) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.loc6_52.2: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.loc6_52.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_52.3: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] +// CHECK:STDOUT: %At.assoc_type: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %At.assoc_type (constants.%At.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc6_52.2: @IndexWith.%At.assoc_type (%At.assoc_type.1) = assoc_entity element0, %At.decl [symbolic = %assoc0.loc6_52.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @IndexWith.%IndexWith.type (%IndexWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %At.decl: @IndexWith.%At.type (%At.type.1) = fn_decl @At.1 [symbolic = @IndexWith.%At (constants.%At.1)] { -// CHECK:STDOUT: %self.patt: @At.1.%.loc6_15.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @At.1.%.loc6_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %subscript.patt: @At.1.%SubscriptType (%SubscriptType) = binding_pattern subscript // CHECK:STDOUT: %subscript.param_patt: @At.1.%SubscriptType (%SubscriptType) = value_param_pattern %subscript.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_15.2: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc6_15.3: type = facet_access_type %Self.ref [symbolic = %.loc6_15.1 (constants.%.1)] -// CHECK:STDOUT: %.loc6_15.4: type = converted %Self.ref, %.loc6_15.3 [symbolic = %.loc6_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc6_15.1: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc6_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc6_15.2: type = converted %Self.ref, %Self.as_type.loc6_15.2 [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc5_26.1 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %.loc6_51.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_51.2: type = converted %.loc6_51.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %self.param: @At.1.%.loc6_15.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @At.1.%.loc6_15.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: @At.1.%SubscriptType (%SubscriptType) = value_param runtime_param1 // CHECK:STDOUT: %subscript: @At.1.%SubscriptType (%SubscriptType) = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_52.1: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] +// CHECK:STDOUT: %assoc0.loc6_52.1: @IndexWith.%At.assoc_type (%At.assoc_type.1) = assoc_entity element0, %At.decl [symbolic = %assoc0.loc6_52.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .At = %.loc6_52.1 +// CHECK:STDOUT: .At = %assoc0.loc6_52.1 // CHECK:STDOUT: witness = (%At.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -235,20 +235,20 @@ fn F() { ()[()]; } // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_31: = interface_witness (%At.decl) [template = constants.%.7] +// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = %.loc9_31 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @At.1(@IndexWith.%SubscriptType.loc5_26.1: type, @IndexWith.%Self.1: @IndexWith.%IndexWith.type (%IndexWith.type.2)) { // CHECK:STDOUT: %SubscriptType: type = bind_symbolic_name SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.2)] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc6_15.1: type = facet_access_type %Self [symbolic = %.loc6_15.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc6_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @At.1.%.loc6_15.1 (%.1)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %empty_tuple.type; +// CHECK:STDOUT: fn[%self.param_patt: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %empty_tuple.type; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %empty_tuple.type](%subscript.param_patt: %empty_tuple.type) -> %empty_tuple.type { @@ -266,10 +266,10 @@ fn F() { ()[()]; } // CHECK:STDOUT: %empty_tuple.loc15_11: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_11.2: %empty_tuple.type = converted %.loc15_11.1, %empty_tuple.loc15_11 [template = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple.loc15_14: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_15.1: %empty_tuple.type = converted %.loc15_14, %empty_tuple.loc15_14 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_15.2: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc15_15.3: = bound_method %.loc15_11.2, %.loc15_15.2 [template = constants.%.8] -// CHECK:STDOUT: %At.call: init %empty_tuple.type = call %.loc15_15.3(%.loc15_11.2, %.loc15_15.1) +// CHECK:STDOUT: %.loc15_15: %empty_tuple.type = converted %.loc15_14, %empty_tuple.loc15_14 [template = constants.%empty_tuple] +// CHECK:STDOUT: %impl.elem0: %At.type.3 = interface_witness_access constants.%interface, element0 [template = constants.%At.2] +// CHECK:STDOUT: %At.bound: = bound_method %.loc15_11.2, %impl.elem0 [template = constants.%At.bound] +// CHECK:STDOUT: %At.call: init %empty_tuple.type = call %At.bound(%.loc15_11.2, %.loc15_15) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -287,7 +287,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc6_15.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc6_15.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith(%SubscriptType.loc5_26.2) { @@ -304,14 +304,14 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.loc6_52.2 => constants.%.4 -// CHECK:STDOUT: %.loc6_52.3 => constants.%.5 +// CHECK:STDOUT: %At.assoc_type => constants.%At.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc6_52.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @At.1(constants.%empty_tuple.type, constants.%.6) { +// CHECK:STDOUT: specific @At.1(constants.%empty_tuple.type, constants.%IndexWith.facet) { // CHECK:STDOUT: %SubscriptType => constants.%empty_tuple.type // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.3 -// CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %.loc6_15.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %Self => constants.%IndexWith.facet +// CHECK:STDOUT: %Self.as_type.loc6_15.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 789fd7cab5546..b56f89422b483 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -78,8 +78,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Ordered.type: type = facet_type <@Ordered> [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -95,7 +95,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %LessOrEquivalent.type.2: type = fn_type @LessOrEquivalent.2 [template] // CHECK:STDOUT: %Greater.type.2: type = fn_type @Greater.2 [template] // CHECK:STDOUT: %GreaterOrEquivalent.type.2: type = fn_type @GreaterOrEquivalent.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] @@ -295,22 +295,22 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Less = %Less.decl // CHECK:STDOUT: .LessOrEquivalent = %LessOrEquivalent.decl // CHECK:STDOUT: .Greater = %Greater.decl // CHECK:STDOUT: .GreaterOrEquivalent = %GreaterOrEquivalent.decl -// CHECK:STDOUT: witness = %.loc6 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Less.1[%self.param_patt: %C](%other.param_patt: %C) -> bool; @@ -325,9 +325,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Less.1] -// CHECK:STDOUT: %.loc14_12.2: = bound_method %a.ref, %.loc14_12.1 -// CHECK:STDOUT: %Less.call: init bool = call %.loc14_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Less.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %Less.bound: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %Less.call: init bool = call %Less.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call // CHECK:STDOUT: %.loc14_15.2: bool = converted %Less.call, %.loc14_15.1 // CHECK:STDOUT: return %.loc14_15.2 @@ -337,9 +337,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%LessOrEquivalent.1] -// CHECK:STDOUT: %.loc18_12.2: = bound_method %a.ref, %.loc18_12.1 -// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem1: %LessOrEquivalent.type.2 = interface_witness_access constants.%interface, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %LessOrEquivalent.bound: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %LessOrEquivalent.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call // CHECK:STDOUT: %.loc18_16.2: bool = converted %LessOrEquivalent.call, %.loc18_16.1 // CHECK:STDOUT: return %.loc18_16.2 @@ -349,9 +349,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.5, element2 [template = constants.%Greater.1] -// CHECK:STDOUT: %.loc22_12.2: = bound_method %a.ref, %.loc22_12.1 -// CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem2: %Greater.type.2 = interface_witness_access constants.%interface, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %Greater.bound: = bound_method %a.ref, %impl.elem2 +// CHECK:STDOUT: %Greater.call: init bool = call %Greater.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call // CHECK:STDOUT: %.loc22_15.2: bool = converted %Greater.call, %.loc22_15.1 // CHECK:STDOUT: return %.loc22_15.2 @@ -361,9 +361,9 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.5, element3 [template = constants.%GreaterOrEquivalent.1] -// CHECK:STDOUT: %.loc26_12.2: = bound_method %a.ref, %.loc26_12.1 -// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12.2(%a.ref, %b.ref) +// CHECK:STDOUT: %impl.elem3: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%interface, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %GreaterOrEquivalent.bound: = bound_method %a.ref, %impl.elem3 +// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %GreaterOrEquivalent.bound(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call // CHECK:STDOUT: %.loc26_16.2: bool = converted %GreaterOrEquivalent.call, %.loc26_16.1 // CHECK:STDOUT: return %.loc26_16.2 @@ -373,8 +373,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] @@ -490,11 +490,11 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestLess(%a.param_patt: %D, %b.param_patt: %D) -> bool { diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 8a1cbfff3e5de..6f149bcde1756 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %RightShift.type: type = facet_type <@RightShift> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %RightShiftAssign.type: type = facet_type <@RightShiftAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %RightShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 e36d7e6abfc11..7207092025fce 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -35,21 +35,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Sub.type: type = facet_type <@Sub> [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %SubAssign.type: type = facet_type <@SubAssign> [template] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,53 +139,53 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc17 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %SubAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] +// CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc22 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc15 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %ptr.2](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -194,22 +194,22 @@ fn TestAssign(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: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 +// CHECK:STDOUT: %impl.elem0: %Op.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 +// CHECK:STDOUT: %Op.call: init %C = call %Op.bound(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %ptr.2, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a -// CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref +// CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a +// CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %impl.elem0: %Op.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.bound: = bound_method %.loc31, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc31 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %Op.bound(%addr, %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 18253a9b42825..11c435b9aa4d9 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -20,10 +20,10 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,10 +45,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.3: type = converted %int.make_type_signed, %.loc15_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 71d354849bee6..5479472f294c0 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -44,18 +44,18 @@ fn Main() { // CHECK:STDOUT: --- global.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,29 +74,29 @@ fn Main() { // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.3: type = converted %int.make_type_signed.loc4, %.loc4_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed.loc4, %.loc4_8.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc5_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.3: type = converted %int.make_type_signed.loc5, %.loc5_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_signed.loc5, %.loc5_8.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%x.var, %.loc4_15.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%x.var, %.loc4 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x // CHECK:STDOUT: %.loc5: %i32 = bind_value %x.ref @@ -107,24 +107,24 @@ fn Main() { // CHECK:STDOUT: --- inside_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -143,10 +143,10 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.3: type = converted %int.make_type_signed, %.loc4_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} @@ -154,23 +154,23 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed.loc7, %.loc7_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7, %.loc7_10.1 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc7_16: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_17.2: = bound_method %.loc7_16, %.loc7_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_17.3: = specific_function %.loc7_17.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_17.3(%.loc7_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc7_17.4: init %i32 = converted %.loc7_16, %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: assign %x.var, %.loc7_17.4 -// CHECK:STDOUT: %.loc9_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.3: type = converted %int.make_type_signed.loc9, %.loc9_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc7_17: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %x.var, %.loc7_17 +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed.loc9, %.loc9_10.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] @@ -182,13 +182,13 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%x.var, %.loc4_15.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%x.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,8 +199,8 @@ fn Main() { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -228,12 +228,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} {} -// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .Foo = %Foo.decl -// CHECK:STDOUT: complete_type_witness = %.loc8 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index e99b181bc1cdd..6e1bf77fac7e2 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -63,10 +63,10 @@ import library "var"; // CHECK:STDOUT: --- var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,10 +83,10 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.3: type = converted %int.make_type_signed, %.loc4_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_signed, %.loc4_10.1 [template = constants.%i32] // CHECK:STDOUT: %Foo.var: ref %i32 = var Foo // CHECK:STDOUT: %Foo: ref %i32 = bind_name Foo, %Foo.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index c563a6d6a5f6f..2c138e0c56bae 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -73,7 +73,7 @@ var d: i32 = d_ref; // CHECK:STDOUT: %c_ref.var: ref = var c_ref // CHECK:STDOUT: %c_ref: ref = bind_name c_ref, %c_ref.var // CHECK:STDOUT: %x.ref.loc22: = name_ref x, [template = ] -// CHECK:STDOUT: %.loc22: type = ptr_type [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %d_ref.var: ref = var d_ref // CHECK:STDOUT: %d_ref: ref = bind_name d_ref, %d_ref.var // CHECK:STDOUT: } @@ -81,10 +81,10 @@ var d: i32 = d_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -114,28 +114,28 @@ var d: i32 = d_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc6_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.3: type = converted %int.make_type_signed.loc6, %.loc6_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.3: type = converted %int.make_type_signed.loc7, %.loc7_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.3: type = converted %int.make_type_signed.loc8, %.loc8_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %.loc9_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.3: type = converted %int.make_type_signed.loc9, %.loc9_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index ecc2039e8cf2b..903672b956690 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -25,18 +25,18 @@ var b: i32 = a; // CHECK:STDOUT: --- lib.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,23 +54,23 @@ var b: i32 = a; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.3: type = converted %int.make_type_signed, %.loc4_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%a.var, %.loc4_15.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%a.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -88,61 +88,61 @@ var b: i32 = a; // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.8 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.8 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.15 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.25 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.25 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.32 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.32 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -195,10 +195,10 @@ var b: i32 = a; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.3: type = converted %int.make_type_signed, %.loc4_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -212,8 +212,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.8 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.8 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -232,8 +232,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.25 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.25 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -252,7 +252,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.5 as imports.%import_ref.6 { // CHECK:STDOUT: !members: @@ -269,7 +269,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.9 as imports.%import_ref.10 { // CHECK:STDOUT: !members: @@ -285,7 +285,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -301,7 +301,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.16 as imports.%import_ref.17 { // CHECK:STDOUT: !members: @@ -318,7 +318,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.22 as imports.%import_ref.23 { // CHECK:STDOUT: !members: @@ -335,7 +335,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.26 as imports.%import_ref.27 { // CHECK:STDOUT: !members: @@ -351,7 +351,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -367,7 +367,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.33 as imports.%import_ref.34 { // CHECK:STDOUT: !members: @@ -379,9 +379,9 @@ var b: i32 = a; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -424,9 +424,9 @@ var b: i32 = a; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -516,7 +516,7 @@ var b: i32 = a; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -562,8 +562,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -643,7 +643,7 @@ var b: i32 = a; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -689,8 +689,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { 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 26ebd8b1d7df6..60b245e085420 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -196,9 +196,9 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -211,13 +211,13 @@ alias C = Other.C; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- conflict.carbon @@ -283,13 +283,13 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, inst+7, unloaded // CHECK:STDOUT: } @@ -314,13 +314,13 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, inst+7, unloaded // CHECK:STDOUT: } @@ -345,13 +345,13 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst+10, unloaded // CHECK:STDOUT: } @@ -376,10 +376,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -389,7 +389,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, inst+7, unloaded // CHECK:STDOUT: } @@ -416,12 +416,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.1: %struct_type.x = struct_literal (%.loc6_25.1) // CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -431,10 +431,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -445,7 +445,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, inst+7, unloaded // CHECK:STDOUT: } @@ -472,12 +472,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: %.1 = struct_literal (%.loc7_25.1) +// CHECK:STDOUT: %.loc7_26.1: %struct_type.x = struct_literal (%.loc7_25.1) // CHECK:STDOUT: %.loc7_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_25.2: init %empty_tuple.type = tuple_init () to %.loc7_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_26.3: init %empty_tuple.type = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -487,10 +487,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -501,7 +501,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, inst+7, unloaded // CHECK:STDOUT: } @@ -528,12 +528,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.1: %struct_type.x = struct_literal (%.loc6_25.1) // CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -543,10 +543,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -555,7 +555,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst+10, unloaded // CHECK:STDOUT: } @@ -582,12 +582,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.1: %struct_type.x = struct_literal (%.loc6_25.1) // CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -597,10 +597,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -610,7 +610,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name_copy // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst+10, unloaded // CHECK:STDOUT: } @@ -637,12 +637,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: %.1 = struct_literal (%.loc7_25.1) +// CHECK:STDOUT: %.loc7_26.1: %struct_type.x = struct_literal (%.loc7_25.1) // CHECK:STDOUT: %.loc7_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_25.2: init %empty_tuple.type = tuple_init () to %.loc7_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_26.3: init %empty_tuple.type = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -652,10 +652,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -664,7 +664,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name_indirect // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name_indirect, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name_indirect, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name_indirect, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name_indirect, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name_indirect, inst+10, unloaded // CHECK:STDOUT: } @@ -691,12 +691,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.1: %struct_type.x = struct_literal (%.loc6_25.1) // CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -706,10 +706,10 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -724,7 +724,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst+10, unloaded // CHECK:STDOUT: } @@ -751,12 +751,12 @@ alias C = Other.C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_26.1: %.1 = struct_literal (%.loc11_25.1) +// CHECK:STDOUT: %.loc11_26.1: %struct_type.x = struct_literal (%.loc11_25.1) // CHECK:STDOUT: %.loc11_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc11_25.2: init %empty_tuple.type = tuple_init () to %.loc11_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_26.3: init %empty_tuple.type = converted %.loc11_25.1, %.loc11_25.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_26.4: init %C = class_init (%.loc11_26.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_27: init %C = converted %.loc11_26.1, %.loc11_26.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26.4: init %C = class_init (%.loc11_26.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc11_27: init %C = converted %.loc11_26.1, %.loc11_26.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc11_27 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -829,8 +829,8 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -840,7 +840,7 @@ alias C = Other.C; // CHECK:STDOUT: import Other//conflict // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, inst+11, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst+8, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst+9, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst+10, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_import.carbon b/toolchain/check/testdata/packages/no_prelude/export_import.carbon index f16a258ff06b4..85e508a131d93 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_import.carbon @@ -171,9 +171,9 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -186,13 +186,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon @@ -271,15 +271,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -305,12 +305,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -320,15 +320,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -355,12 +355,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_20.1: %.1 = struct_literal (%.loc11_19.1) +// CHECK:STDOUT: %.loc11_20.1: %struct_type.x = struct_literal (%.loc11_19.1) // CHECK:STDOUT: %.loc11_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc11_19.2: init %empty_tuple.type = tuple_init () to %.loc11_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_20.3: init %empty_tuple.type = converted %.loc11_19.1, %.loc11_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_20.4: init %C = class_init (%.loc11_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_21: init %C = converted %.loc11_20.1, %.loc11_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_20.4: init %C = class_init (%.loc11_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc11_21: init %C = converted %.loc11_20.1, %.loc11_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc11_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -370,15 +370,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_export, inst+2, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -405,12 +405,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: %.1 = struct_literal (%.loc4_19.1) +// CHECK:STDOUT: %.loc4_20.1: %struct_type.x = struct_literal (%.loc4_19.1) // CHECK:STDOUT: %.loc4_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc4_19.2: init %empty_tuple.type = tuple_init () to %.loc4_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc4_20.3: init %empty_tuple.type = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc4_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -420,15 +420,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -454,12 +454,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -469,15 +469,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -503,12 +503,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -518,15 +518,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -552,12 +552,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -567,15 +567,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -601,12 +601,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -616,15 +616,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -650,12 +650,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -665,15 +665,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -699,12 +699,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -725,15 +725,15 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -759,12 +759,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -774,16 +774,16 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//use_non_export_then_base, inst+14, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//base, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -810,12 +810,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_28.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_29.1: %.1 = struct_literal (%.loc6_28.1) +// CHECK:STDOUT: %.loc6_29.1: %struct_type.x = struct_literal (%.loc6_28.1) // CHECK:STDOUT: %.loc6_29.2: ref %empty_tuple.type = class_element_access file.%indirect_c.var, element0 // CHECK:STDOUT: %.loc6_28.2: init %empty_tuple.type = tuple_init () to %.loc6_29.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_29.3: init %empty_tuple.type = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_29.4: init %C = class_init (%.loc6_29.3), file.%indirect_c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_30: init %C = converted %.loc6_29.1, %.loc6_29.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_29.4: init %C = class_init (%.loc6_29.3), file.%indirect_c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_30: init %C = converted %.loc6_29.1, %.loc6_29.4 [template = constants.%C.val] // 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 88c5eba13b55d..cb3604a79b965 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon @@ -118,13 +118,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %D, %empty_tuple.type [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -139,25 +139,25 @@ var d: D = {.y = ()}; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %.loc9_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_11.2: type = converted %.loc9_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_8: %.4 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_8: %D.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .y = %.loc9_8 -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export_import.carbon @@ -180,14 +180,14 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref Main//base, inst+11, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -213,14 +213,14 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref Main//base, inst+11, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -259,15 +259,15 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_import_then_name, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export_import_then_name, inst+10, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_import_then_name, inst+11, unloaded // CHECK:STDOUT: } @@ -293,12 +293,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -308,15 +308,15 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_name, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_name, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_name, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export_name, inst+10, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_name, inst+11, unloaded // CHECK:STDOUT: } @@ -342,12 +342,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -357,15 +357,15 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_import_then_name, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export_import_then_name, inst+10, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_import_then_name, inst+11, unloaded // CHECK:STDOUT: } @@ -391,12 +391,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -405,7 +405,7 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -426,7 +426,7 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_19: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_20: %.1 = struct_literal (%.loc10_19) +// CHECK:STDOUT: %.loc10_20: %struct_type.y = struct_literal (%.loc10_19) // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -436,15 +436,15 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_import_then_name, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//export_import_then_name, inst+10, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_import_then_name, inst+11, unloaded // CHECK:STDOUT: } @@ -470,12 +470,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -485,23 +485,23 @@ var d: D = {.y = ()}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %D = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %D.val: %D = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//export_import_then_name, inst+12, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//base, inst+11, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//export_import_then_name, inst+9, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.4 = import_ref Main//export_import_then_name, inst+10, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//export_import_then_name, inst+11, unloaded -// CHECK:STDOUT: %import_ref.6: = import_ref Main//base, inst+18, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//base, inst+18, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.7 = import_ref Main//base, inst+12, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//base, inst+16, unloaded // CHECK:STDOUT: } @@ -539,20 +539,20 @@ var d: D = {.y = ()}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc8_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_20.1: %.1 = struct_literal (%.loc8_19.1) +// CHECK:STDOUT: %.loc8_20.1: %struct_type.x = struct_literal (%.loc8_19.1) // CHECK:STDOUT: %.loc8_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc8_19.2: init %empty_tuple.type = tuple_init () to %.loc8_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_20.3: init %empty_tuple.type = converted %.loc8_19.1, %.loc8_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_20.4: init %C = class_init (%.loc8_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc8_21: init %C = converted %.loc8_20.1, %.loc8_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc8_20.4: init %C = class_init (%.loc8_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc8_21: init %C = converted %.loc8_20.1, %.loc8_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc8_21 // CHECK:STDOUT: %.loc9_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_20.1: %.4 = struct_literal (%.loc9_19.1) +// CHECK:STDOUT: %.loc9_20.1: %struct_type.y = struct_literal (%.loc9_19.1) // CHECK:STDOUT: %.loc9_20.2: ref %empty_tuple.type = class_element_access file.%d.var, element0 // CHECK:STDOUT: %.loc9_19.2: init %empty_tuple.type = tuple_init () to %.loc9_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_20.3: init %empty_tuple.type = converted %.loc9_19.1, %.loc9_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_20.4: init %D = class_init (%.loc9_20.3), file.%d.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc9_21: init %D = converted %.loc9_20.1, %.loc9_20.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc9_20.4: init %D = class_init (%.loc9_20.3), file.%d.var [template = constants.%D.val] +// CHECK:STDOUT: %.loc9_21: init %D = converted %.loc9_20.1, %.loc9_20.4 [template = constants.%D.val] // 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 86212c5d5151c..845732ad2eb2b 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -205,13 +205,13 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %NSC, %empty_tuple.type [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %NSC.elem: type = unbound_element_type %NSC, %empty_tuple.type [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -229,25 +229,25 @@ private export C; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NSC { // CHECK:STDOUT: %.loc10_11.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_11.2: type = converted %.loc10_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_8: %.4 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_8: %NSC.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NSC // CHECK:STDOUT: .y = %.loc10_8 -// CHECK:STDOUT: complete_type_witness = %.loc11 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon @@ -255,11 +255,11 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -269,10 +269,10 @@ private export C; // CHECK:STDOUT: .NSC = file.%NSC // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//base, inst+12, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//base, inst+19, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//base, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//base, inst+13, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//base, inst+17, unloaded // CHECK:STDOUT: } @@ -324,11 +324,11 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -338,10 +338,10 @@ private export C; // CHECK:STDOUT: .NSC = file.%NSC // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//export, inst+22, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export, inst+13, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//export, inst+20, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//export, inst+21, unloaded // CHECK:STDOUT: } @@ -381,14 +381,14 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %NSC.val: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -398,10 +398,10 @@ private export C; // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//export, inst+22, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export, inst+13, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//export, inst+20, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//export, inst+21, unloaded // CHECK:STDOUT: } @@ -440,20 +440,20 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: %.loc7_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: %.4 = struct_literal (%.loc7_26.1) +// CHECK:STDOUT: %.loc7_27.1: %struct_type.y = struct_literal (%.loc7_26.1) // CHECK:STDOUT: %.loc7_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 // CHECK:STDOUT: %.loc7_26.2: init %empty_tuple.type = tuple_init () to %.loc7_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_27.3: init %empty_tuple.type = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%NSC.val] +// CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%NSC.val] // CHECK:STDOUT: assign file.%nsc.var, %.loc7_28 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -463,14 +463,14 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %NSC.val: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -480,10 +480,10 @@ private export C; // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//export_export, inst+22, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export_export, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export_export, inst+13, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//export_export, inst+19, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//export_export, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//export_export, inst+20, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//export_export, inst+21, unloaded // CHECK:STDOUT: } @@ -523,20 +523,20 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: %.1 = struct_literal (%.loc4_19.1) +// CHECK:STDOUT: %.loc4_20.1: %struct_type.x = struct_literal (%.loc4_19.1) // CHECK:STDOUT: %.loc4_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc4_19.2: init %empty_tuple.type = tuple_init () to %.loc4_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc4_20.3: init %empty_tuple.type = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc4_21 // CHECK:STDOUT: %.loc5_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_27.1: %.4 = struct_literal (%.loc5_26.1) +// CHECK:STDOUT: %.loc5_27.1: %struct_type.y = struct_literal (%.loc5_26.1) // CHECK:STDOUT: %.loc5_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 // CHECK:STDOUT: %.loc5_26.2: init %empty_tuple.type = tuple_init () to %.loc5_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_27.3: init %empty_tuple.type = converted %.loc5_26.1, %.loc5_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_27.4: init %NSC = class_init (%.loc5_27.3), file.%nsc.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc5_28: init %NSC = converted %.loc5_27.1, %.loc5_27.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc5_27.4: init %NSC = class_init (%.loc5_27.3), file.%nsc.var [template = constants.%NSC.val] +// CHECK:STDOUT: %.loc5_28: init %NSC = converted %.loc5_27.1, %.loc5_27.4 [template = constants.%NSC.val] // CHECK:STDOUT: assign file.%nsc.var, %.loc5_28 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -546,14 +546,14 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %NSC.val: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -563,10 +563,10 @@ private export C; // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//export_export, inst+22, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export_export, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export_export, inst+13, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//export_export, inst+19, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//export_export, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//export_export, inst+20, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//export_export, inst+21, unloaded // CHECK:STDOUT: } @@ -605,20 +605,20 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: %.loc7_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: %.4 = struct_literal (%.loc7_26.1) +// CHECK:STDOUT: %.loc7_27.1: %struct_type.y = struct_literal (%.loc7_26.1) // CHECK:STDOUT: %.loc7_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 // CHECK:STDOUT: %.loc7_26.2: init %empty_tuple.type = tuple_init () to %.loc7_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_27.3: init %empty_tuple.type = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%NSC.val] +// CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%NSC.val] // CHECK:STDOUT: assign file.%nsc.var, %.loc7_28 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -645,8 +645,8 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Local: type = class_type @Local [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -657,11 +657,11 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Local { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Local -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_export_member.carbon @@ -669,8 +669,8 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -679,7 +679,7 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -704,14 +704,14 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %NSC.val: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -721,10 +721,10 @@ private export C; // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//base, inst+12, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//base, inst+19, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//base, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//base, inst+13, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//base, inst+17, unloaded // CHECK:STDOUT: } @@ -763,20 +763,20 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: %.4 = struct_literal (%.loc8_26.1) +// CHECK:STDOUT: %.loc8_27.1: %struct_type.y = struct_literal (%.loc8_26.1) // CHECK:STDOUT: %.loc8_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 // CHECK:STDOUT: %.loc8_26.2: init %empty_tuple.type = tuple_init () to %.loc8_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.3: init %empty_tuple.type = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%NSC.val] +// CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%NSC.val] // CHECK:STDOUT: assign file.%nsc.var, %.loc8_28 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -786,14 +786,14 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %NSC.val: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -803,10 +803,10 @@ private export C; // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3: type = import_ref Main//export, inst+22, loaded [template = constants.%NSC] -// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst+11, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export, inst+13, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: = import_ref Main//export, inst+19, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//export, inst+20, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//export, inst+21, unloaded // CHECK:STDOUT: } @@ -845,20 +845,20 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.1: %struct_type.x = struct_literal (%.loc7_19.1) // CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 // CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: %.4 = struct_literal (%.loc8_26.1) +// CHECK:STDOUT: %.loc8_27.1: %struct_type.y = struct_literal (%.loc8_26.1) // CHECK:STDOUT: %.loc8_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 // CHECK:STDOUT: %.loc8_26.2: init %empty_tuple.type = tuple_init () to %.loc8_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.3: init %empty_tuple.type = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%NSC.val] +// CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%NSC.val] // CHECK:STDOUT: assign file.%nsc.var, %.loc8_28 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -883,8 +883,8 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -893,7 +893,7 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } @@ -919,15 +919,15 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//repeat_export, inst+14, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//repeat_export, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//repeat_export, inst+11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//repeat_export, inst+12, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//repeat_export, inst+13, unloaded // CHECK:STDOUT: } @@ -953,12 +953,12 @@ private export C; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.1: %struct_type.x = struct_literal (%.loc6_19.1) // CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 // CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -968,8 +968,8 @@ private export C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -978,7 +978,7 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.4: = import_ref Main//base, inst+9, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst+2, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, inst+7, unloaded // CHECK:STDOUT: } 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 f246a4c8a1086..b37ac57fee469 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 @@ -37,10 +37,10 @@ export C.n; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_struct_type [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %empty_struct_type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,29 +51,29 @@ export C.n; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_11.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .n = %.loc5_8 -// CHECK:STDOUT: complete_type_witness = %.loc6 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_b.carbon // CHECK:STDOUT: // 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: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %empty_struct_type} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Foo//a, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: = import_ref Foo//a, inst+10, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.2: = import_ref Foo//a, inst+10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Foo//a, inst+2, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Foo//a, inst+8, unloaded // CHECK:STDOUT: } 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 ed0bd5808774d..3c36ba8a24fb2 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,9 +34,9 @@ export C2(T:! type); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] -// CHECK:STDOUT: %C1.1: %C1.type = struct_value () [template] +// CHECK:STDOUT: %C1.generic: %C1.type = struct_value () [template] // CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %C2.1: %C2.type = struct_value () [template] +// CHECK:STDOUT: %C2.generic: %C2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,14 +44,14 @@ export C2(T:! type); // CHECK:STDOUT: .C1 = %C1.decl // CHECK:STDOUT: .C2 = %C2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [template = constants.%C1.1] { +// CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [template = constants.%C1.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_10.1, runtime_param [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_10.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_10.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [template = constants.%C2.1] { +// CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [template = constants.%C2.generic] { // CHECK:STDOUT: %T.patt.loc5_10.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc5_10.1, runtime_param [symbolic = %T.patt.loc5_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -88,16 +88,16 @@ export C2(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] -// CHECK:STDOUT: %C1.1: %C1.type = struct_value () [template] +// CHECK:STDOUT: %C1.generic: %C1.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %C2.1: %C2.type = struct_value () [template] +// CHECK:STDOUT: %C2.generic: %C2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %C1.type = import_ref Foo//a, inst+7, loaded [template = constants.%C1.1] -// CHECK:STDOUT: %import_ref.2: %C2.type = import_ref Foo//a, inst+18, loaded [template = constants.%C2.1] +// CHECK:STDOUT: %import_ref.1: %C1.type = import_ref Foo//a, inst+7, loaded [template = constants.%C1.generic] +// CHECK:STDOUT: %import_ref.2: %C2.type = import_ref Foo//a, inst+18, loaded [template = constants.%C2.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,10 +106,10 @@ export C2(T:! type); // CHECK:STDOUT: .C2 = %C2 // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C1: %C1.type = export C1, imports.%import_ref.1 [template = constants.%C1.1] +// CHECK:STDOUT: %C1: %C1.type = export C1, imports.%import_ref.1 [template = constants.%C1.generic] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %C2: %C2.type = export C2, imports.%import_ref.2 [template = constants.%C2.1] +// CHECK:STDOUT: %C2: %C2.type = export C2, imports.%import_ref.2 [template = constants.%C2.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C1(constants.%T: type) { diff --git a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon index edc70b197f077..5990df8b5ff79 100644 --- a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon @@ -168,8 +168,8 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -180,19 +180,19 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C1 { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- c2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C2: type = class_type @C2 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,19 +203,19 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C2 { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- ns.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -229,19 +229,19 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- o1.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %O1: type = class_type @O1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -252,19 +252,19 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @O1 { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%O1 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- o2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %O2: type = class_type @O2 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -275,19 +275,19 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @O2 { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%O2 -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- local_other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Other: type = class_type @Other [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -298,11 +298,11 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Other { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Other -// CHECK:STDOUT: complete_type_witness = %.loc4 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- mix_current_package.carbon @@ -322,19 +322,19 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct.1: %C1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C1.val: %C1 = struct_value () [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] -// CHECK:STDOUT: %struct.2: %C2 = struct_value () [template] +// CHECK:STDOUT: %C2.val: %C2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//mix_current_package, inst+2, loaded [template = constants.%C1] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//c2, inst+1, loaded [template = constants.%C2] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//c1, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//c1, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//c1, inst+2, unloaded -// CHECK:STDOUT: %import_ref.5: = import_ref Main//c2, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Main//c2, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Main//c2, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -369,13 +369,13 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_15.2: init %C1 = class_init (), file.%c1.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc6_16: init %C1 = converted %.loc6_15.1, %.loc6_15.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc6_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_15.2: init %C1 = class_init (), file.%c1.var [template = constants.%C1.val] +// CHECK:STDOUT: %.loc6_16: init %C1 = converted %.loc6_15.1, %.loc6_15.2 [template = constants.%C1.val] // CHECK:STDOUT: assign file.%c1.var, %.loc6_16 -// CHECK:STDOUT: %.loc7_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc7_15.2: init %C2 = class_init (), file.%c2.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_16: init %C2 = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C2 = class_init (), file.%c2.var [template = constants.%C2.val] +// CHECK:STDOUT: %.loc7_16: init %C2 = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%C2.val] // CHECK:STDOUT: assign file.%c2.var, %.loc7_16 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -397,14 +397,14 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C1.val: %C1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//dup_c1, inst+2, loaded [template = constants.%C1] -// CHECK:STDOUT: %import_ref.2: = import_ref Main//c1, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Main//c1, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//c1, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -428,9 +428,9 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_15.2: init %C1 = class_init (), file.%c1.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_16: init %C1 = converted %.loc6_15.1, %.loc6_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_15.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_15.2: init %C1 = class_init (), file.%c1.var [template = constants.%C1.val] +// CHECK:STDOUT: %.loc6_16: init %C1 = converted %.loc6_15.1, %.loc6_15.2 [template = constants.%C1.val] // CHECK:STDOUT: assign file.%c1.var, %.loc6_16 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -455,9 +455,9 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -466,7 +466,7 @@ import Other library "o1"; // CHECK:STDOUT: .C = %import_ref.2 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref Main//use_ns, inst+4, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.3: = import_ref Main//ns, inst+5, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.3: = import_ref Main//ns, inst+5, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//ns, inst+3, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -491,9 +491,9 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_16.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_16.2: init %C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc4_17: init %C = converted %.loc4_16.1, %.loc4_16.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc4_16.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_16.2: init %C = class_init (), file.%c.var [template = constants.%C.val] +// CHECK:STDOUT: %.loc4_17: init %C = converted %.loc4_16.1, %.loc4_16.2 [template = constants.%C.val] // CHECK:STDOUT: assign file.%c.var, %.loc4_17 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -517,11 +517,11 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %O1: type = class_type @O1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct.1: %O1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %O1.val: %O1 = struct_value () [template] // CHECK:STDOUT: %O2: type = class_type @O2 [template] -// CHECK:STDOUT: %struct.2: %O2 = struct_value () [template] +// CHECK:STDOUT: %O2.val: %O2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -532,10 +532,10 @@ import Other library "o1"; // CHECK:STDOUT: import Other//o1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//o1, inst+1, loaded [template = constants.%O1] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//o1, inst+2, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Other//o2, inst+1, loaded [template = constants.%O2] -// CHECK:STDOUT: %import_ref.5: = import_ref Other//o2, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.5: = import_ref Other//o2, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Other//o2, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -572,13 +572,13 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_21.2: init %O1 = class_init (), file.%o1.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc6_22: init %O1 = converted %.loc6_21.1, %.loc6_21.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc6_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_21.2: init %O1 = class_init (), file.%o1.var [template = constants.%O1.val] +// CHECK:STDOUT: %.loc6_22: init %O1 = converted %.loc6_21.1, %.loc6_21.2 [template = constants.%O1.val] // CHECK:STDOUT: assign file.%o1.var, %.loc6_22 -// CHECK:STDOUT: %.loc7_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc7_21.2: init %O2 = class_init (), file.%o2.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_22: init %O2 = converted %.loc7_21.1, %.loc7_21.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_21.2: init %O2 = class_init (), file.%o2.var [template = constants.%O2.val] +// CHECK:STDOUT: %.loc7_22: init %O2 = converted %.loc7_21.1, %.loc7_21.2 [template = constants.%O2.val] // CHECK:STDOUT: assign file.%o2.var, %.loc7_22 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -602,9 +602,9 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %O1: type = class_type @O1 [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %O1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %O1.val: %O1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -613,7 +613,7 @@ import Other library "o1"; // CHECK:STDOUT: import Other//o1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Other//o1, inst+1, loaded [template = constants.%O1] -// CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, inst+4, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, inst+4, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//o1, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -639,9 +639,9 @@ import Other library "o1"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_21.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_21.2: init %O1 = class_init (), file.%o1.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_22: init %O1 = converted %.loc6_21.1, %.loc6_21.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_21.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_21.2: init %O1 = class_init (), file.%o1.var [template = constants.%O1.val] +// CHECK:STDOUT: %.loc6_22: init %O1 = converted %.loc6_21.1, %.loc6_21.2 [template = constants.%O1.val] // CHECK:STDOUT: assign file.%o1.var, %.loc6_22 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon index 908748dfe9a12..af92379b49f8b 100644 --- a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon @@ -88,14 +88,14 @@ var n: {} = i32; // CHECK:STDOUT: --- fail_missing_prelude.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -109,7 +109,7 @@ var n: {} = i32; // CHECK:STDOUT: --- fail_missing_prelude_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -124,7 +124,7 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc10: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -136,10 +136,10 @@ var n: {} = i32; // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T = symbolic_binding_pattern N, 1 [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -151,18 +151,18 @@ var n: {} = i32; // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_8.1, runtime_param [symbolic = %T.patt.loc4_8.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc4_18.1: @Int.%T.loc4_8.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_18.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @Int.%T.loc4_8.2 (%T) = value_param_pattern %N.patt.loc4_18.1, runtime_param [symbolic = %N.patt.loc4_18.2 (constants.%N.patt)] -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_8.1 [symbolic = %T.loc4_8.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc4_29.2: type = converted %.loc4_29.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_29.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc4_29.2: type = converted %.loc4_29.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_8.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_8.2 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc4_8.2 (%T) = value_param runtime_param // CHECK:STDOUT: %N.loc4_18.1: @Int.%T.loc4_8.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_18.2 (constants.%N)] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -174,11 +174,11 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc4_8.2 (%T)) -> %.1 { +// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc4_8.2 (%T)) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_41: %.1 = struct_literal () -// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc4_42: %.1 = converted %.loc4_41, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc4_41: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc4_42: %empty_struct_type = converted %.loc4_41, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc4_42 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -193,8 +193,8 @@ var n: {} = i32; // CHECK:STDOUT: --- use_fake_int.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -202,7 +202,7 @@ var n: {} = i32; // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N.2: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.2: %T = symbolic_binding_pattern N, 1 [symbolic] -// CHECK:STDOUT: %.3: = specific_function %Int, @Int(Core.IntLiteral, %.2) [template] +// CHECK:STDOUT: %Int.specific_fn: = specific_function %Int, @Int(Core.IntLiteral, %int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -218,10 +218,10 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc6_9.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.var: ref %.1 = var n -// CHECK:STDOUT: %n: ref %.1 = bind_name n, %n.var +// CHECK:STDOUT: %.loc6_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %n.var: ref %empty_struct_type = var n +// CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Int(constants.%T: type, constants.%N.1: @Int.%T (%T)) { @@ -232,14 +232,14 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T (%T)) -> %.1; +// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T (%T)) -> %empty_struct_type; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %.1: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%.2) [template = constants.%.3] -// CHECK:STDOUT: %Int.call: init %.1 = call %.1() +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %Int.specific_fn: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%int_32) [template = constants.%Int.specific_fn] +// CHECK:STDOUT: %Int.call: init %empty_struct_type = call %Int.specific_fn() // CHECK:STDOUT: assign file.%n.var, %Int.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -251,11 +251,11 @@ var n: {} = i32; // CHECK:STDOUT: %N.patt => constants.%N.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%.2) { +// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%int_32) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %T.patt => Core.IntLiteral -// CHECK:STDOUT: %N => constants.%.2 -// CHECK:STDOUT: %N.patt => constants.%.2 +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -271,8 +271,8 @@ var n: {} = i32; // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %.2: = specific_function %Int, @Int(Core.IntLiteral, %.1) [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Int.specific_fn: = specific_function %Int, @Int(Core.IntLiteral, %int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -323,9 +323,9 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.1: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%.1) [template = constants.%.2] -// CHECK:STDOUT: %Int.call: init %empty_tuple.type = call %.1() +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %Int.specific_fn: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%int_32) [template = constants.%Int.specific_fn] +// CHECK:STDOUT: %Int.call: init %empty_tuple.type = call %Int.specific_fn() // CHECK:STDOUT: assign file.%n.var, %Int.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -337,11 +337,11 @@ var n: {} = i32; // CHECK:STDOUT: %N.patt.loc8_18.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%.1) { +// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%int_32) { // CHECK:STDOUT: %T.loc8_8.2 => Core.IntLiteral // CHECK:STDOUT: %T.patt.loc8_8.2 => Core.IntLiteral -// CHECK:STDOUT: %N.loc8_18.2 => constants.%.1 -// CHECK:STDOUT: %N.patt.loc8_18.2 => constants.%.1 +// CHECK:STDOUT: %N.loc8_18.2 => constants.%int_32 +// CHECK:STDOUT: %N.patt.loc8_18.2 => constants.%int_32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -353,12 +353,12 @@ var n: {} = i32; // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T = symbolic_binding_pattern N, 1 [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %.3: = specific_function %Int, @Int(Core.IntLiteral, %.2) [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Int.specific_fn: = specific_function %Int, @Int(Core.IntLiteral, %int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -374,23 +374,23 @@ var n: {} = i32; // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_13.1, runtime_param [symbolic = %T.patt.loc7_13.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc7_23.1: @Int.%T.loc7_13.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc7_23.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @Int.%T.loc7_13.2 (%T) = value_param_pattern %N.patt.loc7_23.1, runtime_param [symbolic = %N.patt.loc7_23.2 (constants.%N.patt)] -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_13.1 [symbolic = %T.loc7_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_34.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc7_34.2: type = converted %.loc7_34.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_34.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc7_34.2: type = converted %.loc7_34.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc7_13.2 (%T) = value_param runtime_param // CHECK:STDOUT: %N.loc7_23.1: @Int.%T.loc7_13.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc7_23.2 (constants.%N)] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_9.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.var: ref %.1 = var n -// CHECK:STDOUT: %n: ref %.1 = bind_name n, %n.var +// CHECK:STDOUT: %.loc9_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %n.var: ref %empty_struct_type = var n +// CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Int(%T.loc7_13.1: type, %N.loc7_23.1: @Int.%T.loc7_13.2 (%T)) { @@ -401,20 +401,20 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc7_13.2 (%T)) -> %.1 { +// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc7_13.2 (%T)) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_46: %.1 = struct_literal () -// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc7_47: %.1 = converted %.loc7_46, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc7_46: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc7_47: %empty_struct_type = converted %.loc7_46, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc7_47 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %.1: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%.2) [template = constants.%.3] -// CHECK:STDOUT: %Int.call: init %.1 = call %.1() +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %Int.specific_fn: = specific_function constants.%Int, @Int(Core.IntLiteral, constants.%int_32) [template = constants.%Int.specific_fn] +// CHECK:STDOUT: %Int.call: init %empty_struct_type = call %Int.specific_fn() // CHECK:STDOUT: assign file.%n.var, %Int.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -426,11 +426,11 @@ var n: {} = i32; // CHECK:STDOUT: %N.patt.loc7_23.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%.2) { +// CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%int_32) { // CHECK:STDOUT: %T.loc7_13.2 => Core.IntLiteral // CHECK:STDOUT: %T.patt.loc7_13.2 => Core.IntLiteral -// CHECK:STDOUT: %N.loc7_23.2 => constants.%.2 -// CHECK:STDOUT: %N.patt.loc7_23.2 => constants.%.2 +// CHECK:STDOUT: %N.loc7_23.2 => constants.%int_32 +// CHECK:STDOUT: %N.patt.loc7_23.2 => constants.%int_32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -443,12 +443,12 @@ var n: {} = i32; // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T = symbolic_binding_pattern N, 1 [symbolic] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -457,10 +457,10 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.decl: type = class_decl @Core [template = constants.%Core] {} {} -// 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: %n.var: ref %.1 = var n -// CHECK:STDOUT: %n: ref %.1 = bind_name n, %n.var +// CHECK:STDOUT: %.loc12_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %n.var: ref %empty_struct_type = var n +// CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Core { @@ -469,25 +469,25 @@ var n: {} = i32; // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_10.2, runtime_param [symbolic = %T.patt.loc6_10.1 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc6_20.2: @Int.%T.loc6_10.1 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_20.1 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @Int.%T.loc6_10.1 (%T) = value_param_pattern %N.patt.loc6_20.2, runtime_param [symbolic = %N.patt.loc6_20.1 (constants.%N.patt)] -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_10.2 [symbolic = %T.loc6_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_31.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_31.2: type = converted %.loc6_31.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_31.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc6_31.2: type = converted %.loc6_31.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_10.2: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc6_10.1 (%T) = value_param runtime_param // CHECK:STDOUT: %N.loc6_20.2: @Int.%T.loc6_10.1 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc6_20.1 (constants.%N)] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Core // CHECK:STDOUT: .Int = %Int.decl -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Int(%T.loc6_10.2: type, %N.loc6_20.2: @Int.%T.loc6_10.1 (%T)) { @@ -498,18 +498,18 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc6_10.1 (%T)) -> %.1 { +// CHECK:STDOUT: fn[%T.param_patt: type](%N.param_patt: @Int.%T.loc6_10.1 (%T)) -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_43: %.1 = struct_literal () -// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc6_44: %.1 = converted %.loc6_43, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc6_43: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc6_44: %empty_struct_type = converted %.loc6_43, %empty_struct [template = constants.%empty_struct] // CHECK:STDOUT: return %.loc6_44 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: assign file.%n.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index cde11803ddbb4..4b79a45450d01 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -16,21 +16,21 @@ fn F() -> i32 { // CHECK:STDOUT: --- address_of_deref.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,10 +52,10 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -63,24 +63,24 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %n.var, %.loc12_17.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc12_17 // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_13: %.30 = addr_of %n.ref -// CHECK:STDOUT: %.loc13_12: ref %i32 = deref %.loc13_13 -// CHECK:STDOUT: %.loc13_11: %.30 = addr_of %.loc13_12 -// CHECK:STDOUT: %.loc13_10.1: ref %i32 = deref %.loc13_11 +// CHECK:STDOUT: %addr.loc13_13: %ptr = addr_of %n.ref +// CHECK:STDOUT: %.loc13_12: ref %i32 = deref %addr.loc13_13 +// CHECK:STDOUT: %addr.loc13_11: %ptr = addr_of %.loc13_12 +// CHECK:STDOUT: %.loc13_10.1: ref %i32 = deref %addr.loc13_11 // CHECK:STDOUT: %.loc13_10.2: %i32 = bind_value %.loc13_10.1 // CHECK:STDOUT: return %.loc13_10.2 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 1a5dbc843f62f..054f4afb91551 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -25,32 +25,32 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %struct_type.a.b.1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] -// CHECK:STDOUT: %.37: type = ptr_type %i32 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.33, %.36) [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,78 +73,78 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed.loc12_15, %.loc12_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_24: init type = call constants.%Int(%.loc12_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_signed.loc12_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_signed.loc12_24, %.loc12_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %s.var: ref %.2 = var s -// CHECK:STDOUT: %s: ref %.2 = bind_name s, %s.var -// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_45: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_46.1: %.6 = struct_literal (%.loc12_37, %.loc12_45) -// CHECK:STDOUT: %.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_46.3: = bound_method %.loc12_37, %.loc12_46.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_46.4: = specific_function %.loc12_46.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %.loc12_46.4(%.loc12_37) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %.loc12_37, %int.convert_checked.loc12_46.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element0 -// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_46.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_46.9: = bound_method %.loc12_45, %.loc12_46.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_46.10: = specific_function %.loc12_46.9, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %.loc12_46.10(%.loc12_45) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_46.11: init %i32 = converted %.loc12_45, %int.convert_checked.loc12_46.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_46.12: ref %i32 = struct_access %s.var, element1 -// CHECK:STDOUT: %.loc12_46.13: init %i32 = initialize_from %.loc12_46.11 to %.loc12_46.12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_46.14: init %.2 = struct_init (%.loc12_46.7, %.loc12_46.13) to %s.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_47: init %.2 = converted %.loc12_46.1, %.loc12_46.14 [template = constants.%struct] +// CHECK:STDOUT: %int_32.loc12_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%int_32.loc12_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12_15, %.loc12_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_24: init type = call constants.%Int(%int_32.loc12_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_signed.loc12_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_signed.loc12_24, %.loc12_24.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %s.var: ref %struct_type.a.b.1 = var s +// CHECK:STDOUT: %s: ref %struct_type.a.b.1 = bind_name s, %s.var +// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc12_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc12, %int_2.loc12) +// CHECK:STDOUT: %impl.elem0.loc12_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_46.1: = bound_method %int_1.loc12, %impl.elem0.loc12_46.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc12_46.1: = specific_function %Convert.bound.loc12_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %Convert.specific_fn.loc12_46.1(%int_1.loc12) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_46.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_46.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_46.3: ref %i32 = struct_access %s.var, element0 +// CHECK:STDOUT: %.loc12_46.4: init %i32 = initialize_from %.loc12_46.2 to %.loc12_46.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12_46.2: = bound_method %int_2.loc12, %impl.elem0.loc12_46.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_46.2: = specific_function %Convert.bound.loc12_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %Convert.specific_fn.loc12_46.2(%int_2.loc12) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %int_2.loc12, %int.convert_checked.loc12_46.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element1 +// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_46.8: init %struct_type.a.b.1 = struct_init (%.loc12_46.4, %.loc12_46.7) to %s.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_47: init %struct_type.a.b.1 = converted %.loc12_46.1, %.loc12_46.8 [template = constants.%struct] // CHECK:STDOUT: assign %s.var, %.loc12_47 -// CHECK:STDOUT: %.loc14_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%.loc14_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_signed.loc14_15, %.loc14_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%.loc14_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_24, %.loc14_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc14_28: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %p.var: ref %.3 = var p -// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var -// CHECK:STDOUT: %s.ref.loc14: ref %.2 = name_ref s, %s -// CHECK:STDOUT: %.loc14_32: %.3 = addr_of %s.ref.loc14 -// CHECK:STDOUT: assign %p.var, %.loc14_32 -// CHECK:STDOUT: %.loc15_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%int_32.loc14_15) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_signed.loc14_15, %.loc14_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%int_32.loc14_24) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_signed.loc14_24, %.loc14_24.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %ptr.loc14: type = ptr_type %struct_type.a.b.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %p.var: ref %ptr.1 = var p +// CHECK:STDOUT: %p: ref %ptr.1 = bind_name p, %p.var +// CHECK:STDOUT: %s.ref.loc14: ref %struct_type.a.b.1 = name_ref s, %s +// CHECK:STDOUT: %addr.loc14: %ptr.1 = addr_of %s.ref.loc14 +// CHECK:STDOUT: assign %p.var, %addr.loc14 +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15, %.loc15_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.3: type = ptr_type %i32 [template = constants.%.37] -// CHECK:STDOUT: %q.var: ref %.37 = var q -// CHECK:STDOUT: %q: ref %.37 = bind_name q, %q.var -// CHECK:STDOUT: %s.ref.loc15: ref %.2 = name_ref s, %s +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %q.var: ref %ptr.2 = var q +// CHECK:STDOUT: %q: ref %ptr.2 = bind_name q, %q.var +// CHECK:STDOUT: %s.ref.loc15: ref %struct_type.a.b.1 = name_ref s, %s // CHECK:STDOUT: %.loc15_19: ref %i32 = struct_access %s.ref.loc15, element0 -// CHECK:STDOUT: %.loc15_17: %.37 = addr_of %.loc15_19 -// CHECK:STDOUT: assign %q.var, %.loc15_17 -// CHECK:STDOUT: %.loc16_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_10) [template = constants.%i32] +// CHECK:STDOUT: %addr.loc15: %ptr.2 = addr_of %.loc15_19 +// CHECK:STDOUT: assign %q.var, %addr.loc15 +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed.loc16, %.loc16_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = ptr_type %i32 [template = constants.%.37] -// CHECK:STDOUT: %r.var: ref %.37 = var r -// CHECK:STDOUT: %r: ref %.37 = bind_name r, %r.var -// CHECK:STDOUT: %s.ref.loc16: ref %.2 = name_ref s, %s +// CHECK:STDOUT: %ptr.loc16: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %r.var: ref %ptr.2 = var r +// CHECK:STDOUT: %r: ref %ptr.2 = bind_name r, %r.var +// CHECK:STDOUT: %s.ref.loc16: ref %struct_type.a.b.1 = name_ref s, %s // CHECK:STDOUT: %.loc16_19: ref %i32 = struct_access %s.ref.loc16, element1 -// CHECK:STDOUT: %.loc16_17: %.37 = addr_of %.loc16_19 -// CHECK:STDOUT: assign %r.var, %.loc16_17 -// CHECK:STDOUT: %.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%.loc18_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%.loc18_16) [template = constants.%i32] +// CHECK:STDOUT: %addr.loc16: %ptr.2 = addr_of %.loc16_19 +// CHECK:STDOUT: assign %r.var, %addr.loc16 +// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%int_32.loc18_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%int_32.loc18_16) [template = constants.%i32] // CHECK:STDOUT: %.loc18_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_11, %int.make_type_signed.loc18_16) // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_signed.loc18_11 [template = constants.%i32] // CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_signed.loc18_11, %.loc18_19.2 [template = constants.%i32] @@ -153,50 +153,50 @@ fn F() { // CHECK:STDOUT: %.loc18_19.6: type = converted %.loc18_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t.var: ref %tuple.type.2 = var t // CHECK:STDOUT: %t: ref %tuple.type.2 = bind_name t, %t.var -// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc18_27: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%.loc18_24, %.loc18_27) -// CHECK:STDOUT: %.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_28.3: = bound_method %.loc18_24, %.loc18_28.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc18_28.4: = specific_function %.loc18_28.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %.loc18_28.4(%.loc18_24) [template = constants.%.33] -// CHECK:STDOUT: %.loc18_28.5: init %i32 = converted %.loc18_24, %int.convert_checked.loc18_28.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_28.6: ref %i32 = tuple_access %t.var, element0 -// CHECK:STDOUT: %.loc18_28.7: init %i32 = initialize_from %.loc18_28.5 to %.loc18_28.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_28.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_28.9: = bound_method %.loc18_27, %.loc18_28.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_28.10: = specific_function %.loc18_28.9, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %.loc18_28.10(%.loc18_27) [template = constants.%.36] -// CHECK:STDOUT: %.loc18_28.11: init %i32 = converted %.loc18_27, %int.convert_checked.loc18_28.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_28.12: ref %i32 = tuple_access %t.var, element1 -// CHECK:STDOUT: %.loc18_28.13: init %i32 = initialize_from %.loc18_28.11 to %.loc18_28.12 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_28.14: init %tuple.type.2 = tuple_init (%.loc18_28.7, %.loc18_28.13) to %t.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%int_1.loc18, %int_2.loc18) +// CHECK:STDOUT: %impl.elem0.loc18_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_28.1: = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18_28.1: = specific_function %Convert.bound.loc18_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %Convert.specific_fn.loc18_28.1(%int_1.loc18) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0.loc18: ref %i32 = tuple_access %t.var, element0 +// CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_28.2: = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc18_28.2: = specific_function %Convert.bound.loc18_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %Convert.specific_fn.loc18_28.2(%int_2.loc18) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc18_28.4: init %i32 = converted %int_2.loc18, %int.convert_checked.loc18_28.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc18: ref %i32 = tuple_access %t.var, element1 +// CHECK:STDOUT: %.loc18_28.5: init %i32 = initialize_from %.loc18_28.4 to %tuple.elem1.loc18 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc18_28.6: init %tuple.type.2 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %t.var, %.loc18_29 -// CHECK:STDOUT: %.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_signed.loc19, %.loc19_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_14.3: type = ptr_type %i32 [template = constants.%.37] -// CHECK:STDOUT: %t0.var: ref %.37 = var t0 -// CHECK:STDOUT: %t0: ref %.37 = bind_name t0, %t0.var +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %t0.var: ref %ptr.2 = var t0 +// CHECK:STDOUT: %t0: ref %ptr.2 = bind_name t0, %t0.var // CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.2 = name_ref t, %t -// CHECK:STDOUT: %.loc19_21: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc19_20: ref %i32 = tuple_access %t.ref.loc19, element0 -// CHECK:STDOUT: %.loc19_18: %.37 = addr_of %.loc19_20 -// CHECK:STDOUT: assign %t0.var, %.loc19_18 -// CHECK:STDOUT: %.loc20_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_11) [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple.elem0.loc19: ref %i32 = tuple_access %t.ref.loc19, element0 +// CHECK:STDOUT: %addr.loc19: %ptr.2 = addr_of %tuple.elem0.loc19 +// CHECK:STDOUT: assign %t0.var, %addr.loc19 +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] // CHECK:STDOUT: %.loc20_14.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] // CHECK:STDOUT: %.loc20_14.2: type = converted %int.make_type_signed.loc20, %.loc20_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_14.3: type = ptr_type %i32 [template = constants.%.37] -// CHECK:STDOUT: %t1.var: ref %.37 = var t1 -// CHECK:STDOUT: %t1: ref %.37 = bind_name t1, %t1.var +// CHECK:STDOUT: %ptr.loc20: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %t1.var: ref %ptr.2 = var t1 +// CHECK:STDOUT: %t1: ref %ptr.2 = bind_name t1, %t1.var // CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.2 = name_ref t, %t -// CHECK:STDOUT: %.loc20_21: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc20_20: ref %i32 = tuple_access %t.ref.loc20, element1 -// CHECK:STDOUT: %.loc20_18: %.37 = addr_of %.loc20_20 -// CHECK:STDOUT: assign %t1.var, %.loc20_18 +// CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %tuple.elem1.loc20: ref %i32 = tuple_access %t.ref.loc20, element1 +// CHECK:STDOUT: %addr.loc20: %ptr.2 = addr_of %tuple.elem1.loc20 +// CHECK:STDOUT: assign %t1.var, %addr.loc20 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/arrow.carbon b/toolchain/check/testdata/pointer/arrow.carbon index 4646723f27ff6..bbcea4d407e8a 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -30,10 +30,10 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %Member.type: type = fn_type @Member [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Member: %Member.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = ptr_type %C [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.field: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %ptr.1 [template] +// CHECK:STDOUT: %struct_type.field: type = struct_type {.field: %ptr.1} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -54,13 +54,13 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %ptr.patt: %.1 = binding_pattern ptr -// CHECK:STDOUT: %ptr.param_patt: %.1 = value_param_pattern %ptr.patt, runtime_param0 +// CHECK:STDOUT: %ptr.patt: %ptr.1 = binding_pattern ptr +// CHECK:STDOUT: %ptr.param_patt: %ptr.1 = value_param_pattern %ptr.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.1] -// CHECK:STDOUT: %ptr.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %ptr: %.1 = bind_name ptr, %ptr.param +// CHECK:STDOUT: %ptr.loc16_14: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %ptr.loc16_8: %ptr.1 = bind_name ptr, %ptr.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -74,49 +74,49 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_15: type = ptr_type %C [template = constants.%.1] -// CHECK:STDOUT: %.loc13_12: %.2 = field_decl field, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc13: %C.elem = field_decl field, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .Member = %Member.decl -// CHECK:STDOUT: .field = %.loc13_12 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: .field = %.loc13 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Member[%self.param_patt: %C](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %.1) { +// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ptr.ref.loc17: %.1 = name_ref ptr, %ptr +// CHECK:STDOUT: %ptr.ref.loc17: %ptr.1 = name_ref ptr, %ptr.loc16_8 // 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: %Member.bound.loc17: = 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 %empty_tuple.type = call %.loc17_9(%.loc17_4.2) -// CHECK:STDOUT: %ptr.ref.loc18: %.1 = name_ref ptr, %ptr +// CHECK:STDOUT: %Member.call.loc17: init %empty_tuple.type = call %Member.bound.loc17(%.loc17_4.2) +// CHECK:STDOUT: %ptr.ref.loc18: %ptr.1 = name_ref ptr, %ptr.loc16_8 // 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 %empty_tuple.type = call %.loc18_6.2(%.loc18_6.3) -// CHECK:STDOUT: %ptr.ref.loc20: %.1 = name_ref ptr, %ptr +// CHECK:STDOUT: %Member.bound.loc18: = bound_method %.loc18_6.1, %Member.ref.loc18 +// CHECK:STDOUT: %.loc18_6.2: %C = bind_value %.loc18_6.1 +// CHECK:STDOUT: %Member.call.loc18: init %empty_tuple.type = call %Member.bound.loc18(%.loc18_6.2) +// CHECK:STDOUT: %ptr.ref.loc20: %ptr.1 = name_ref ptr, %ptr.loc16_8 // CHECK:STDOUT: %.loc20_4: ref %C = deref %ptr.ref.loc20 -// CHECK:STDOUT: %field.ref.loc20: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc20_9: ref %.1 = class_element_access %.loc20_4, element0 -// CHECK:STDOUT: %ptr.ref.loc21: %.1 = name_ref ptr, %ptr +// CHECK:STDOUT: %field.ref.loc20: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13] +// CHECK:STDOUT: %.loc20_9: ref %ptr.1 = class_element_access %.loc20_4, element0 +// CHECK:STDOUT: %ptr.ref.loc21: %ptr.1 = name_ref ptr, %ptr.loc16_8 // CHECK:STDOUT: %.loc21_6.1: ref %C = deref %ptr.ref.loc21 -// CHECK:STDOUT: %field.ref.loc21: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc21_6.2: ref %.1 = class_element_access %.loc21_6.1, element0 -// CHECK:STDOUT: %ptr.ref.loc23: %.1 = name_ref ptr, %ptr +// CHECK:STDOUT: %field.ref.loc21: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13] +// CHECK:STDOUT: %.loc21_6.2: ref %ptr.1 = class_element_access %.loc21_6.1, element0 +// CHECK:STDOUT: %ptr.ref.loc23: %ptr.1 = name_ref ptr, %ptr.loc16_8 // CHECK:STDOUT: %.loc23_6.1: ref %C = deref %ptr.ref.loc23 -// CHECK:STDOUT: %field.ref.loc23_6: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_6.2: ref %.1 = class_element_access %.loc23_6.1, element0 -// CHECK:STDOUT: %.loc23_6.3: %.1 = bind_value %.loc23_6.2 +// CHECK:STDOUT: %field.ref.loc23_6: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13] +// CHECK:STDOUT: %.loc23_6.2: ref %ptr.1 = class_element_access %.loc23_6.1, element0 +// CHECK:STDOUT: %.loc23_6.3: %ptr.1 = bind_value %.loc23_6.2 // CHECK:STDOUT: %.loc23_13.1: ref %C = deref %.loc23_6.3 -// CHECK:STDOUT: %field.ref.loc23_13: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_13.2: ref %.1 = class_element_access %.loc23_13.1, element0 +// CHECK:STDOUT: %field.ref.loc23_13: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13] +// CHECK:STDOUT: %.loc23_13.2: ref %ptr.1 = class_element_access %.loc23_13.1, element0 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 97d2368f7f522..3b335ca50ed5f 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -18,21 +18,21 @@ fn F() -> i32 { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,10 +54,10 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -65,31 +65,31 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %n.var, %.loc12_17.4 -// CHECK:STDOUT: %.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10) [template = constants.%i32] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc12_17 +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed.loc13, %.loc13_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = ptr_type %i32 [template = constants.%.30] -// CHECK:STDOUT: %p.var: ref %.30 = var p -// CHECK:STDOUT: %p: ref %.30 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %p.var: ref %ptr = var p +// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_17: %.30 = addr_of %n.ref -// CHECK:STDOUT: assign %p.var, %.loc13_17 -// CHECK:STDOUT: %p.ref: ref %.30 = name_ref p, %p -// CHECK:STDOUT: %.loc15_11: %.30 = bind_value %p.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %n.ref +// CHECK:STDOUT: assign %p.var, %addr +// CHECK:STDOUT: %p.ref: ref %ptr = name_ref p, %p +// CHECK:STDOUT: %.loc15_11: %ptr = 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 4f4c230b13f9d..451fc85f87d6b 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_error.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_error.carbon @@ -50,10 +50,10 @@ fn Test() { // CHECK:STDOUT: fn @Test() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %undeclared.ref.loc16: = name_ref undeclared, [template = ] -// CHECK:STDOUT: %.loc16: = addr_of %undeclared.ref.loc16 [template = ] +// CHECK:STDOUT: %addr.loc16: = addr_of %undeclared.ref.loc16 [template = ] // CHECK:STDOUT: %undeclared.ref.loc24: = name_ref undeclared, [template = ] -// CHECK:STDOUT: %.loc24_5: = addr_of %undeclared.ref.loc24 [template = ] -// CHECK:STDOUT: %.loc24_3: = addr_of [template = ] +// CHECK:STDOUT: %addr.loc24_5: = addr_of %undeclared.ref.loc24 [template = ] +// CHECK:STDOUT: %addr.loc24_3: = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 101d15b837690..cba40d66099f8 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -102,46 +102,46 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: --- fail_address_of_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template] // CHECK:STDOUT: %AddressOfLiteral: %AddressOfLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.4: type = ptr_type Core.IntLiteral [template] -// CHECK:STDOUT: %.5: bool = bool_literal true [template] -// CHECK:STDOUT: %.6: type = ptr_type bool [template] -// CHECK:STDOUT: %.7: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.8: type = ptr_type f64 [template] -// CHECK:STDOUT: %.9: type = ptr_type String [template] -// CHECK:STDOUT: %.10: String = string_literal "Hello" [template] -// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type Core.IntLiteral [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type bool [template] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template] +// CHECK:STDOUT: %ptr.3: type = ptr_type f64 [template] +// CHECK:STDOUT: %ptr.4: type = ptr_type String [template] +// CHECK:STDOUT: %str: String = string_literal "Hello" [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.13: type = ptr_type %tuple.type [template] -// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.15: type = struct_type {.a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.16: type = ptr_type %.15 [template] +// CHECK:STDOUT: %ptr.5: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %ptr.6: type = ptr_type %struct_type.a.2 [template] // CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template] // CHECK:STDOUT: %AddressOfOperator: %AddressOfOperator.type = struct_value () [template] -// CHECK:STDOUT: %.17: bool = bool_literal false [template] -// CHECK:STDOUT: %.18: type = ptr_type %i32 [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %ptr.7: type = ptr_type %i32 [template] // CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template] // CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [template] // CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template] // CHECK:STDOUT: %AddressOfType: %AddressOfType.type = struct_value () [template] -// CHECK:STDOUT: %.19: type = ptr_type type [template] -// CHECK:STDOUT: %.20: type = const_type %i32 [template] -// CHECK:STDOUT: %.21: type = ptr_type %.20 [template] +// CHECK:STDOUT: %ptr.8: type = ptr_type type [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.9: type = ptr_type %const [template] // CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template] // CHECK:STDOUT: %AddressOfTupleElementValue: %AddressOfTupleElementValue.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.11, %.12) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template] // CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template] // CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [template] // CHECK:STDOUT: } @@ -171,24 +171,24 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %struct_type.a.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_16.3: type = converted %int.make_type_signed, %.loc13_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_signed, %.loc13_16.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %return.param: ref %struct_type.a.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %struct_type.a.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AddressOfLiteral.decl: %AddressOfLiteral.type = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} {} // CHECK:STDOUT: %AddressOfOperator.decl: %AddressOfOperator.type = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} {} @@ -199,10 +199,10 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %param.patt: %i32 = binding_pattern param // CHECK:STDOUT: %param.param_patt: %i32 = value_param_pattern %param.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc95_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc95: init type = call constants.%Int(%.loc95_26.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc95_26.2: type = value_of_initializer %int.make_type_signed.loc95 [template = constants.%i32] -// CHECK:STDOUT: %.loc95_26.3: type = converted %int.make_type_signed.loc95, %.loc95_26.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc95: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc95: init type = call constants.%Int(%int_32.loc95) [template = constants.%i32] +// CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_signed.loc95 [template = constants.%i32] +// CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_signed.loc95, %.loc95_26.1 [template = constants.%i32] // CHECK:STDOUT: %param.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %param: %i32 = bind_name param, %param.param // CHECK:STDOUT: } @@ -210,50 +210,50 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @H() -> %.2; +// CHECK:STDOUT: fn @H() -> %struct_type.a.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfLiteral() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_4: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_3: %.4 = addr_of [template = ] -// CHECK:STDOUT: %.loc25_4: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc25_3: %.6 = addr_of [template = ] -// CHECK:STDOUT: %.loc30_4: f64 = float_literal 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc30_3: %.8 = addr_of [template = ] -// CHECK:STDOUT: %.loc35_4: String = string_literal "Hello" [template = constants.%.10] -// CHECK:STDOUT: %.loc35_3: %.9 = addr_of [template = ] -// CHECK:STDOUT: %.loc40_5: Core.IntLiteral = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc40_8: Core.IntLiteral = int_value 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc40_9: %tuple.type = tuple_literal (%.loc40_5, %.loc40_8) -// CHECK:STDOUT: %.loc40_3: %.13 = addr_of [template = ] -// CHECK:STDOUT: %.loc45_10: Core.IntLiteral = int_value 5 [template = constants.%.14] -// CHECK:STDOUT: %.loc45_11: %.15 = struct_literal (%.loc45_10) -// CHECK:STDOUT: %.loc45_3: %.16 = addr_of [template = ] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %addr.loc20: %ptr.1 = addr_of [template = ] +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %addr.loc25: %ptr.2 = addr_of [template = ] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float] +// CHECK:STDOUT: %addr.loc30: %ptr.3 = addr_of [template = ] +// CHECK:STDOUT: %str: String = string_literal "Hello" [template = constants.%str] +// CHECK:STDOUT: %addr.loc35: %ptr.4 = addr_of [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc40: %tuple.type = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %addr.loc40: %ptr.5 = addr_of [template = ] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %.loc45: %struct_type.a.2 = struct_literal (%int_5) +// CHECK:STDOUT: %addr.loc45: %ptr.6 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfOperator() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc53_5: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc53_10.1: bool = bool_literal false [template = constants.%.17] -// CHECK:STDOUT: if %.loc53_5 br !and.rhs else br !and.result(%.loc53_10.1) +// CHECK:STDOUT: %true.loc53: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %false.loc53_10: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %true.loc53 br !and.rhs else br !and.result(%false.loc53_10) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %.loc53_14: bool = bool_literal false [template = constants.%.17] -// CHECK:STDOUT: br !and.result(%.loc53_14) +// CHECK:STDOUT: %false.loc53_14: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: br !and.result(%false.loc53_14) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.17] -// CHECK:STDOUT: %.loc53_3: %.6 = addr_of [template = ] +// CHECK:STDOUT: %.loc53: bool = block_arg !and.result [template = constants.%false] +// CHECK:STDOUT: %addr.loc53: %ptr.2 = 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_6.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %.loc58_6.2: ref %.2 = temporary %.loc58_6.1, %H.call +// CHECK:STDOUT: %H.call: init %struct_type.a.1 = call %H.ref() +// CHECK:STDOUT: %.loc58_6.1: ref %struct_type.a.1 = temporary_storage +// CHECK:STDOUT: %.loc58_6.2: ref %struct_type.a.1 = temporary %.loc58_6.1, %H.call // CHECK:STDOUT: %.loc58_7: ref %i32 = struct_access %.loc58_6.2, element0 -// CHECK:STDOUT: %.loc58_3: %.18 = addr_of [template = ] -// CHECK:STDOUT: %.loc63_9: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc63_5: bool = not %.loc63_9 [template = constants.%.17] -// CHECK:STDOUT: %.loc63_3: %.6 = addr_of [template = ] +// CHECK:STDOUT: %addr.loc58: %ptr.7 = addr_of [template = ] +// CHECK:STDOUT: %true.loc63: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %.loc63: bool = not %true.loc63 [template = constants.%false] +// CHECK:STDOUT: %addr.loc63: %ptr.2 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,50 +261,50 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init %i32 = call %G.ref() -// CHECK:STDOUT: %.loc71: %.18 = addr_of [template = ] +// CHECK:STDOUT: %addr: %ptr.7 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfType() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc79_4: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc79: init type = call constants.%Int(%.loc79_4) [template = constants.%i32] -// CHECK:STDOUT: %.loc79_3: %.19 = addr_of [template = ] -// CHECK:STDOUT: %.loc84_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%.loc84_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc79: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc79: init type = call constants.%Int(%int_32.loc79) [template = constants.%i32] +// CHECK:STDOUT: %addr.loc79: %ptr.8 = addr_of [template = ] +// CHECK:STDOUT: %int_32.loc84: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%int_32.loc84) [template = constants.%i32] // CHECK:STDOUT: %.loc84_5.1: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32] // CHECK:STDOUT: %.loc84_5.2: type = converted %int.make_type_signed.loc84, %.loc84_5.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc84_5.3: type = const_type %i32 [template = constants.%.20] -// CHECK:STDOUT: %.loc84_14: type = ptr_type %.20 [template = constants.%.21] -// CHECK:STDOUT: %.loc84_3: %.19 = addr_of [template = ] +// CHECK:STDOUT: %const: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.9] +// CHECK:STDOUT: %addr.loc84: %ptr.8 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfTupleElementValue() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc92_6: Core.IntLiteral = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc92_9: Core.IntLiteral = int_value 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%.loc92_6, %.loc92_9) -// CHECK:STDOUT: %.loc92_12: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template = constants.%tuple] // CHECK:STDOUT: %.loc92_10.2: %tuple.type = converted %.loc92_10.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %.loc92_11: Core.IntLiteral = tuple_access %.loc92_10.2, element0 [template = constants.%.11] -// CHECK:STDOUT: %.loc92_3: %.4 = addr_of [template = ] +// CHECK:STDOUT: %tuple.elem0: Core.IntLiteral = tuple_access %.loc92_10.2, element0 [template = constants.%int_1] +// CHECK:STDOUT: %addr: %ptr.1 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc99_19: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc99: init type = call constants.%Int(%.loc99_19) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc99: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc99: init type = call constants.%Int(%int_32.loc99) [template = constants.%i32] // CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_signed.loc99 [template = constants.%i32] // CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_signed.loc99, %.loc99_22.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc99_22.3: type = ptr_type %i32 [template = constants.%.18] -// CHECK:STDOUT: %param_addr.var: ref %.18 = var param_addr -// CHECK:STDOUT: %param_addr: ref %.18 = bind_name param_addr, %param_addr.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.7] +// CHECK:STDOUT: %param_addr.var: ref %ptr.7 = var param_addr +// CHECK:STDOUT: %param_addr: ref %ptr.7 = bind_name param_addr, %param_addr.var // CHECK:STDOUT: %param.ref: %i32 = name_ref param, %param -// CHECK:STDOUT: %.loc99_26: %.18 = addr_of [template = ] -// CHECK:STDOUT: assign %param_addr.var, %.loc99_26 +// CHECK:STDOUT: %addr: %ptr.7 = addr_of [template = ] +// CHECK:STDOUT: assign %param_addr.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index 544b50b72617b..7be583666fbd9 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -21,10 +21,10 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: --- fail_deref_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -42,14 +42,14 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: .n2 = @__global_init.%n2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.3: type = converted %int.make_type_signed.loc19, %.loc19_9.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32] +// CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_signed.loc19, %.loc19_9.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 964ee7ddb7028..bd0176ec74272 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -43,16 +43,16 @@ fn Deref(n: i32) { // CHECK:STDOUT: --- fail_deref_not_pointer.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Deref.type: type = fn_type @Deref [template] // CHECK:STDOUT: %Deref: %Deref.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %struct: %.2 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,10 +73,10 @@ fn Deref(n: i32) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed, %.loc11_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed, %.loc11_13.1 [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -98,13 +98,13 @@ fn Deref(n: i32) { // CHECK:STDOUT: %.loc31_4.2: %empty_tuple.type = converted %.loc31_4.1, %empty_tuple.loc31 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc31_5: ref = deref %.loc31_4.2 // CHECK:STDOUT: %foo.ref.loc31: = name_ref foo, [template = ] -// CHECK:STDOUT: %.loc36_5.1: %.2 = struct_literal () -// CHECK:STDOUT: %struct.loc36: %.2 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc36_5.2: %.2 = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct] +// CHECK:STDOUT: %.loc36_5.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct.loc36: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc36_5.2: %empty_struct_type = converted %.loc36_5.1, %empty_struct.loc36 [template = constants.%empty_struct] // CHECK:STDOUT: %.loc36_3: ref = deref %.loc36_5.2 -// CHECK:STDOUT: %.loc40_4.1: %.2 = struct_literal () -// CHECK:STDOUT: %struct.loc40: %.2 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc40_4.2: %.2 = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct] +// CHECK:STDOUT: %.loc40_4.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %empty_struct.loc40: %empty_struct_type = struct_value () [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc40_4.2: %empty_struct_type = converted %.loc40_4.1, %empty_struct.loc40 [template = constants.%empty_struct] // CHECK:STDOUT: %.loc40_5: ref = deref %.loc40_4.2 // CHECK:STDOUT: %foo.ref.loc40: = name_ref foo, [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index df630fdeaaae6..d41a0e589e49d 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -24,10 +24,10 @@ var p2: i32->foo; // CHECK:STDOUT: --- fail_deref_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,18 +45,18 @@ var p2: i32->foo; // CHECK:STDOUT: .p2 = %p2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc18_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_9.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_9.3: type = converted %int.make_type_signed.loc18, %.loc18_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8: ref = deref %.loc18_9.3 +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_signed.loc18, %.loc18_9.1 [template = constants.%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: %.loc22_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_9.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_9.3: type = converted %int.make_type_signed.loc22, %.loc22_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_12: ref = deref %.loc22_9.3 +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_signed.loc22, %.loc22_9.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_12: ref = deref %.loc22_9.2 // CHECK:STDOUT: %foo.ref: = name_ref foo, [template = ] // CHECK:STDOUT: %p2.var: ref = var p2 // CHECK:STDOUT: %p2: ref = bind_name p2, %p2.var diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 5667f9c51ed48..df39aa7761031 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -21,11 +21,11 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_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: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %const.1: type = const_type %empty_struct_type [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %empty_struct_type [template] +// CHECK:STDOUT: %const.2: type = const_type %ptr.2 [template] // CHECK:STDOUT: %ConstMismatch.type: type = fn_type @ConstMismatch [template] // CHECK:STDOUT: %ConstMismatch: %ConstMismatch.type = struct_value () [template] // CHECK:STDOUT: } @@ -45,30 +45,30 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ConstMismatch.decl: %ConstMismatch.type = fn_decl @ConstMismatch [template = constants.%ConstMismatch] { -// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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 %.1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_29: type = ptr_type %.2 [template = constants.%.3] -// 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 %.1 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_35: type = const_type %.4 [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc11_28: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_21: type = converted %.loc11_28, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %const.loc11_21: type = const_type %empty_struct_type [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc11_29: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %.loc11_43: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_44: type = converted %.loc11_43, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %ptr.loc11_44: type = ptr_type %empty_struct_type [template = constants.%ptr.2] +// CHECK:STDOUT: %const.loc11_35: type = const_type %ptr.2 [template = constants.%const.2] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConstMismatch(%p.param_patt: %.3) -> %.5 { +// CHECK:STDOUT: fn @ConstMismatch(%p.param_patt: %ptr.1) -> %const.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p -// CHECK:STDOUT: %.loc18: %.5 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p +// CHECK:STDOUT: %.loc18: %const.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 857a544953f6a..062ab14b7b965 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -24,19 +24,19 @@ var a: i32* = a_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,33 +55,33 @@ var a: i32* = a_ref; // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed.loc4, %.loc4_13.1 [template = constants.%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: %.loc5_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_15.3: type = ptr_type %i32 [template = constants.%.30] -// CHECK:STDOUT: %a_ref.var: ref %.30 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.30 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %a_ref.var: ref %ptr = var a_ref +// CHECK:STDOUT: %a_ref: ref %ptr = bind_name a_ref, %a_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_19: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.2: = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_20.3: = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_20.3(%.loc4_19) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_20.4: init %i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign file.%a_orig.var, %.loc4_20.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.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: %.30 = addr_of %a_orig.ref -// CHECK:STDOUT: assign file.%a_ref.var, %.loc5 +// CHECK:STDOUT: %addr: %ptr = addr_of %a_orig.ref +// CHECK:STDOUT: assign file.%a_ref.var, %addr // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,67 +99,67 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.9 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.9 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.26 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.26 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.33 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.33 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] -// CHECK:STDOUT: %.22: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+20, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.22 = import_ref Implicit//default, inst+332, loaded +// CHECK:STDOUT: %import_ref.2: ref %ptr = import_ref Implicit//default, inst+332, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.37 // CHECK:STDOUT: import Core//prelude @@ -209,13 +209,13 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = ptr_type %i32 [template = constants.%.22] -// CHECK:STDOUT: %a.var: ref %.22 = var a -// CHECK:STDOUT: %a: ref %.22 = bind_name a, %a.var +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: %a.var: ref %ptr = var a +// CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -227,8 +227,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -247,8 +247,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.26 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.26 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -267,7 +267,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 { // CHECK:STDOUT: !members: @@ -284,7 +284,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.10 as imports.%import_ref.11 { // CHECK:STDOUT: !members: @@ -300,7 +300,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 { // CHECK:STDOUT: !members: @@ -316,7 +316,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 { // CHECK:STDOUT: !members: @@ -333,7 +333,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 { // CHECK:STDOUT: !members: @@ -350,7 +350,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.27 as imports.%import_ref.28 { // CHECK:STDOUT: !members: @@ -366,7 +366,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 { // CHECK:STDOUT: !members: @@ -382,7 +382,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 { // CHECK:STDOUT: !members: @@ -394,9 +394,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -439,9 +439,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -482,8 +482,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.22 = name_ref a_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc4: %.22 = bind_value %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %ptr = name_ref a_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc4: %ptr = bind_value %a_ref.ref // CHECK:STDOUT: assign file.%a.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -531,7 +531,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -577,8 +577,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -658,7 +658,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -704,8 +704,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index 3810f9ce527e9..fef8757375fe0 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -16,15 +16,15 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: --- nested_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = const_type %i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = const_type %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: type = const_type %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %const.1: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template] +// CHECK:STDOUT: %const.2: type = const_type %ptr.1 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %const.2 [template] +// CHECK:STDOUT: %const.3: type = const_type %ptr.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -44,39 +44,39 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %const.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %const.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %const.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %const.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%.loc12_29) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%int_32.loc12_29) [template = constants.%i32] // CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_signed.loc12_29 [template = constants.%i32] // CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_signed.loc12_29, %.loc12_23.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_32: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_16: type = const_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_34: type = ptr_type %.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_9: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_47: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_47: init type = call constants.%Int(%.loc12_47) [template = constants.%i32] +// CHECK:STDOUT: %const.loc12_23: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc12_32: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %const.loc12_16: type = const_type %ptr.1 [template = constants.%const.2] +// CHECK:STDOUT: %ptr.loc12_34: type = ptr_type %const.2 [template = constants.%ptr.2] +// CHECK:STDOUT: %const.loc12_9: type = const_type %ptr.2 [template = constants.%const.3] +// CHECK:STDOUT: %int_32.loc12_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_47: init type = call constants.%Int(%int_32.loc12_47) [template = constants.%i32] // CHECK:STDOUT: %.loc12_41.1: type = value_of_initializer %int.make_type_signed.loc12_47 [template = constants.%i32] // CHECK:STDOUT: %.loc12_41.2: type = converted %int.make_type_signed.loc12_47, %.loc12_41.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_41.3: type = const_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %const.loc12_41: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %p.param: %const.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %const.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %const.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %const.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p.param_patt: %.6) -> %.2 { +// CHECK:STDOUT: fn @F(%p.param_patt: %const.3) -> %const.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p -// CHECK:STDOUT: %.loc13_11.1: ref %.4 = deref %p.ref -// CHECK:STDOUT: %.loc13_11.2: %.4 = bind_value %.loc13_11.1 -// CHECK:STDOUT: %.loc13_10.1: ref %.2 = deref %.loc13_11.2 -// CHECK:STDOUT: %.loc13_10.2: %.2 = bind_value %.loc13_10.1 +// CHECK:STDOUT: %p.ref: %const.3 = name_ref p, %p +// CHECK:STDOUT: %.loc13_11.1: ref %const.2 = deref %p.ref +// CHECK:STDOUT: %.loc13_11.2: %const.2 = bind_value %.loc13_11.1 +// CHECK:STDOUT: %.loc13_10.1: ref %const.1 = deref %.loc13_11.2 +// CHECK:STDOUT: %.loc13_10.2: %const.1 = bind_value %.loc13_10.1 // CHECK:STDOUT: return %.loc13_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index 3d84ce847eac2..08ad8c63581c1 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -19,15 +19,15 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template] // CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [template] // CHECK:STDOUT: %Ptr: %Ptr.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = const_type %i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %const: type = const_type %i32 [template] +// CHECK:STDOUT: %ptr.2: type = ptr_type %const [template] // CHECK:STDOUT: %ConstPtr.type: type = fn_type @ConstPtr [template] // CHECK:STDOUT: %ConstPtr: %ConstPtr.type = struct_value () [template] // CHECK:STDOUT: } @@ -48,60 +48,60 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Ptr.decl: %Ptr.type = fn_decl @Ptr [template = constants.%Ptr] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_11, %.loc11_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = ptr_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%.loc11_20) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc11_14: type = ptr_type %i32 [template = constants.%ptr.1] +// CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%int_32.loc11_20) [template = constants.%i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_20 [template = constants.%i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_20, %.loc11_23.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.3: type = ptr_type %i32 [template = constants.%.2] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %ptr.loc11_23: type = ptr_type %i32 [template = constants.%ptr.1] +// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConstPtr.decl: %ConstPtr.type = fn_decl @ConstPtr [template = constants.%ConstPtr] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%.loc15_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%int_32.loc15_22) [template = constants.%i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_signed.loc15_22, %.loc15_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_16.3: type = const_type %i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_25: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%.loc15_38) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_25: type = ptr_type %const [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%int_32.loc15_38) [template = constants.%i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_signed.loc15_38 [template = constants.%i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_signed.loc15_38, %.loc15_32.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_32.3: type = const_type %i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_42: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.2] +// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Ptr(%p.param_patt: %.2) -> %.2 { +// CHECK:STDOUT: fn @Ptr(%p.param_patt: %ptr.1) -> %ptr.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %ptr.2) -> %ptr.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 862bc5f78e984..e095125ac9a94 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -25,20 +25,20 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,10 +66,10 @@ fn F(b: bool) -> i32 { // 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] -// CHECK:STDOUT: %.loc11_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.3: type = converted %int.make_type_signed, %.loc11_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed, %.loc11_18.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -79,13 +79,13 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc12_11.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.2: %i32 = converted %int_0, %.loc12_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc12_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index c7f4e0da3b921..0adc0030b71f1 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -21,13 +21,13 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %ReturnType.type: type = fn_type @ReturnType [template] // CHECK:STDOUT: %ReturnType: %ReturnType.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,8 +67,8 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnType() -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_34: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_34) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc13_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_37.2: type = converted %int.make_type_signed, %.loc13_37.1 [template = constants.%i32] // CHECK:STDOUT: return %.loc13_37.2 @@ -76,7 +76,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_35: Core.IntLiteral = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index 20fa441a0f700..ce79241f2a0d2 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -41,20 +41,20 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: --- fail_let_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16: Core.IntLiteral = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @HalfDozen() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc28: Core.IntLiteral = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index afff7675891e3..e19b524283dd4 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -17,10 +17,10 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_missing_return.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -43,10 +43,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // 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 49469551a86d9..e8142a37904ae 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 @@ -18,10 +18,10 @@ fn Procedure() -> i32 { // CHECK:STDOUT: --- fail_return_var_no_returned_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] // CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] // CHECK:STDOUT: } @@ -44,10 +44,10 @@ fn Procedure() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } 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 48876f46f8a76..23e5b94b4ed82 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -35,36 +35,36 @@ fn G() -> C { // CHECK:STDOUT: --- fail_return_with_returned_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.31: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.32: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.33: = complete_type_witness %.32 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.36: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.37: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.40: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.39, %.42) [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,10 +88,10 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -107,41 +107,41 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc23_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_18: init type = call constants.%Int(%.loc23_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.2: type = value_of_initializer %int.make_type_signed.loc23_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.3: type = converted %int.make_type_signed.loc23_18, %.loc23_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16: %.31 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc23_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23_30: init type = call constants.%Int(%.loc23_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_30.2: type = value_of_initializer %int.make_type_signed.loc23_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_30.3: type = converted %int.make_type_signed.loc23_30, %.loc23_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_28: %.31 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc23_35: = complete_type_witness %.32 [template = constants.%.33] +// CHECK:STDOUT: %int_32.loc23_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_18: init type = call constants.%Int(%int_32.loc23_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_18.1: type = value_of_initializer %int.make_type_signed.loc23_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_18.2: type = converted %int.make_type_signed.loc23_18, %.loc23_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_16: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc23_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23_30: init type = call constants.%Int(%int_32.loc23_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %int.make_type_signed.loc23_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_30.2: type = converted %int.make_type_signed.loc23_30, %.loc23_30.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_28: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %.loc23_16 // CHECK:STDOUT: .b = %.loc23_28 -// CHECK:STDOUT: complete_type_witness = %.loc23_35 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.3: type = converted %int.make_type_signed.loc12, %.loc12_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12, %.loc12_19.1 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_25: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_26.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_26.2: = bound_method %.loc12_25, %.loc12_26.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_26.3: = specific_function %.loc12_26.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_26.3(%.loc12_25) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_26.4: init %i32 = converted %.loc12_25, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: assign %v.var, %.loc12_26.4 -// CHECK:STDOUT: %.loc20: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_26: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc12_26 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -149,25 +149,25 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %return -// CHECK:STDOUT: %.loc25_29: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc25_37: Core.IntLiteral = int_value 2 [template = constants.%.35] -// CHECK:STDOUT: %.loc25_38.1: %.36 = struct_literal (%.loc25_29, %.loc25_37) -// CHECK:STDOUT: %.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_38.3: = bound_method %.loc25_29, %.loc25_38.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc25_38.4: = specific_function %.loc25_38.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %.loc25_38.4(%.loc25_29) [template = constants.%.39] -// CHECK:STDOUT: %.loc25_38.5: init %i32 = converted %.loc25_29, %int.convert_checked.loc25_38.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc25_38.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc25_38.7: init %i32 = initialize_from %.loc25_38.5 to %.loc25_38.6 [template = constants.%.39] -// CHECK:STDOUT: %.loc25_38.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_38.9: = bound_method %.loc25_37, %.loc25_38.8 [template = constants.%.40] -// CHECK:STDOUT: %.loc25_38.10: = specific_function %.loc25_38.9, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %.loc25_38.10(%.loc25_37) [template = constants.%.42] -// CHECK:STDOUT: %.loc25_38.11: init %i32 = converted %.loc25_37, %int.convert_checked.loc25_38.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc25_38.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc25_38.13: init %i32 = initialize_from %.loc25_38.11 to %.loc25_38.12 [template = constants.%.42] -// CHECK:STDOUT: %.loc25_38.14: init %C = class_init (%.loc25_38.7, %.loc25_38.13), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc25_39: init %C = converted %.loc25_38.1, %.loc25_38.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc25_38.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc25_38.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25_38.1: = bound_method %int_1, %impl.elem0.loc25_38.1 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc25_38.1: = specific_function %Convert.bound.loc25_38.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %Convert.specific_fn.loc25_38.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_38.2: init %i32 = converted %int_1, %int.convert_checked.loc25_38.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc25_38.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc25_38.4: init %i32 = initialize_from %.loc25_38.2 to %.loc25_38.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc25_38.2: = bound_method %int_2, %impl.elem0.loc25_38.2 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc25_38.2: = specific_function %Convert.bound.loc25_38.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %Convert.specific_fn.loc25_38.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_38.5: init %i32 = converted %int_2, %int.convert_checked.loc25_38.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_38.6: ref %i32 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc25_38.7: init %i32 = initialize_from %.loc25_38.5 to %.loc25_38.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc25_38.8: init %C = class_init (%.loc25_38.4, %.loc25_38.7), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc25_39: init %C = converted %.loc25_38.1, %.loc25_38.8 [template = constants.%C.val] // CHECK:STDOUT: assign %return, %.loc25_39 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 1eb68845cf359..c4b0ea130c3ac 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -42,25 +42,25 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: --- fail_returned_var_shadow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %SameScope.type: type = fn_type @SameScope [template] // CHECK:STDOUT: %SameScope: %SameScope.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] // CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [template] // CHECK:STDOUT: } @@ -85,10 +85,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed.loc11, %.loc11_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11, %.loc11_19.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -96,10 +96,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc26_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_25.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_25.3: type = converted %int.make_type_signed.loc26, %.loc26_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_25.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_25.2: type = converted %int.make_type_signed.loc26, %.loc26_25.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -107,98 +107,98 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @SameScope() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc12 br !if.then else br !if.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.3: type = converted %int.make_type_signed.loc13, %.loc13_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc13_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.30] -// CHECK:STDOUT: assign %v.var, %.loc13_28.4 -// CHECK:STDOUT: %.loc21_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.3: type = converted %int.make_type_signed.loc21, %.loc21_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_28: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc13_28 +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_signed.loc21, %.loc21_21.1 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc21_27: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_28.2: = bound_method %.loc21_27, %.loc21_28.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc21_28.3: = specific_function %.loc21_28.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_28.3(%.loc21_27) [template = constants.%.34] -// CHECK:STDOUT: %.loc21_28.4: init %i32 = converted %.loc21_27, %int.convert_checked.loc21 [template = constants.%.34] -// CHECK:STDOUT: assign %w.var, %.loc21_28.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1, %impl.elem0.loc21 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc21_28: init %i32 = converted %int_1, %int.convert_checked.loc21 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc21_28 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc23_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_11.2: = bound_method %.loc23_10, %.loc23_11.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc23_11.3: = specific_function %.loc23_11.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_11.3(%.loc23_10) [template = constants.%.30] -// CHECK:STDOUT: %.loc23_11.4: %i32 = value_of_initializer %int.convert_checked.loc23 [template = constants.%.30] -// CHECK:STDOUT: %.loc23_11.5: %i32 = converted %.loc23_10, %.loc23_11.4 [template = constants.%.30] -// CHECK:STDOUT: return %.loc23_11.5 +// CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0.loc23) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc23_11.1: %i32 = value_of_initializer %int.convert_checked.loc23 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc23_11.2: %i32 = converted %int_0.loc23, %.loc23_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc23_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DifferentScopes() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc27: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc27 br !if.then.loc27 else br !if.else.loc27 +// CHECK:STDOUT: %true.loc27: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc27 br !if.then.loc27 else br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc27: -// CHECK:STDOUT: %.loc28_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%.loc28_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_21.2: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_21.3: type = converted %int.make_type_signed.loc28, %.loc28_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] +// CHECK:STDOUT: %.loc28_21.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] +// CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_signed.loc28, %.loc28_21.1 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc28_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc28_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc28_28.2: = bound_method %.loc28_27, %.loc28_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc28_28.3: = specific_function %.loc28_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_28.3(%.loc28_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc28_28.4: init %i32 = converted %.loc28_27, %int.convert_checked.loc28 [template = constants.%.30] -// CHECK:STDOUT: assign %v.var, %.loc28_28.4 -// CHECK:STDOUT: %.loc29: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc29 br !if.then.loc29 else br !if.else.loc29 +// CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc28_28: init %i32 = converted %int_0.loc28, %int.convert_checked.loc28 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc28_28 +// CHECK:STDOUT: %true.loc29: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc29 br !if.then.loc29 else br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc29: -// CHECK:STDOUT: %.loc36_23.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%.loc36_23.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_23.2: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_23.3: type = converted %int.make_type_signed.loc36, %.loc36_23.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] +// CHECK:STDOUT: %.loc36_23.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] +// CHECK:STDOUT: %.loc36_23.2: type = converted %int.make_type_signed.loc36, %.loc36_23.1 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc36_29: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc36_30.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_30.2: = bound_method %.loc36_29, %.loc36_30.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc36_30.3: = specific_function %.loc36_30.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %.loc36_30.3(%.loc36_29) [template = constants.%.34] -// CHECK:STDOUT: %.loc36_30.4: init %i32 = converted %.loc36_29, %int.convert_checked.loc36 [template = constants.%.34] -// CHECK:STDOUT: assign %w.var, %.loc36_30.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc36: = bound_method %int_1, %impl.elem0.loc36 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc36: = specific_function %Convert.bound.loc36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %Convert.specific_fn.loc36(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc36_30: init %i32 = converted %int_1, %int.convert_checked.loc36 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc36_30 // CHECK:STDOUT: br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc29: // CHECK:STDOUT: br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: -// CHECK:STDOUT: %.loc39_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc39_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc39_11.2: = bound_method %.loc39_10, %.loc39_11.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc39_11.3: = specific_function %.loc39_11.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %.loc39_11.3(%.loc39_10) [template = constants.%.30] -// CHECK:STDOUT: %.loc39_11.4: %i32 = value_of_initializer %int.convert_checked.loc39 [template = constants.%.30] -// CHECK:STDOUT: %.loc39_11.5: %i32 = converted %.loc39_10, %.loc39_11.4 [template = constants.%.30] -// CHECK:STDOUT: return %.loc39_11.5 +// CHECK:STDOUT: %int_0.loc39: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc39: = bound_method %int_0.loc39, %impl.elem0.loc39 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc39: = specific_function %Convert.bound.loc39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %Convert.specific_fn.loc39(%int_0.loc39) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc39_11.1: %i32 = value_of_initializer %int.convert_checked.loc39 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc39_11.2: %i32 = converted %int_0.loc39, %.loc39_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc39_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 76ec45446cba1..e85b320b72d79 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -22,16 +22,16 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: --- fail_returned_var_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] // CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %float: f64 = float_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,10 +53,10 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.3: type = converted %int.make_type_signed, %.loc11_18.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed, %.loc11_18.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -64,12 +64,12 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Mismatch() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_19.1) [template = f64] -// CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc18_19.3: type = converted %float.make_type, %.loc18_19.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc18_19.2: type = converted %float.make_type, %.loc18_19.1 [template = f64] // CHECK:STDOUT: %v: f64 = bind_name v, -// CHECK:STDOUT: %.loc18_25: f64 = float_literal 0 [template = constants.%.3] +// CHECK:STDOUT: %float: f64 = float_literal 0 [template = constants.%float] // CHECK:STDOUT: assign , // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 5858ba884b2ca..177171072ceee 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -21,13 +21,13 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,10 +49,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -60,8 +60,8 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_10: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_13: %i32 = converted %.loc18_10, [template = ] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float] +// CHECK:STDOUT: %.loc18: %i32 = converted %float, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index cad3aa0a56a55..08682bc655f9c 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: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -44,7 +44,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18: Core.IntLiteral = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index 83841cf09f188..96bef5e24bfe7 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -21,10 +21,10 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_value_missing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -47,10 +47,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index 83ef8a61ca16b..003e9765c6c4c 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -17,13 +17,13 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: --- fail_var_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,14 +56,14 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: assign file.%x.var, %int.make_type_signed // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index 00f18b7a7bb40..a6fa1789ada58 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -72,25 +72,25 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.7: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -121,7 +121,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.1 = interface_decl @ImplicitAs [template = constants.%ImplicitAs] { +// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.1 = interface_decl @ImplicitAs [template = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %T.patt.loc8_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_22.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_22.1, runtime_param [symbolic = %T.patt.loc8_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -133,9 +133,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc12_17.2: type = converted %int_literal.make_type, %.loc12_17.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] -// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_33) [template = constants.%i32] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc12_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed, %.loc12_36.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] @@ -151,32 +151,32 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T.loc8_22.2) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.loc9_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.loc9_32.2 (constants.%.2)] -// CHECK:STDOUT: %.loc9_32.3: @ImplicitAs.%.loc9_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0.loc9_32.2: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc9_32.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.1) = fn_decl @Convert.1 [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] { -// CHECK:STDOUT: %self.patt: @Convert.1.%.loc9_20.1 (%.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.1.%.loc9_20.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_20.2: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_20.3: type = facet_access_type %Self.ref [symbolic = %.loc9_20.1 (constants.%.1)] -// CHECK:STDOUT: %.loc9_20.4: type = converted %Self.ref, %.loc9_20.3 [symbolic = %.loc9_20.1 (constants.%.1)] +// CHECK:STDOUT: %.loc9_20.1: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc9_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc9_20.2: type = converted %Self.ref, %Self.as_type.loc9_20.2 [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc8_22.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.1.%.loc9_20.1 (%.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.1.%.loc9_20.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_32.1: @ImplicitAs.%.loc9_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.3)] +// CHECK:STDOUT: %assoc0.loc9_32.1: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc9_32.2 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Convert = %.loc9_32.1 +// CHECK:STDOUT: .Convert = %assoc0.loc9_32.1 // CHECK:STDOUT: witness = (%Convert.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -189,20 +189,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc12_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed, %.loc13_31.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_38: = interface_witness (%Convert.decl) [template = constants.%.8] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc12_38 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type"; @@ -213,9 +213,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_20.1: type = facet_access_type %Self [symbolic = %.loc9_20.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type.loc9_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.loc9_20.1 (%.1)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; @@ -234,7 +234,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.loc9_20.1 => constants.%.1 +// CHECK:STDOUT: %Self.as_type.loc9_20.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T.loc8_22.2) { @@ -251,41 +251,41 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.loc9_32.2 => constants.%.5 -// CHECK:STDOUT: %.loc9_32.3 => constants.%.6 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0.loc9_32.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%.7) { +// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%ImplicitAs.facet) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 -// CHECK:STDOUT: %Self => constants.%.7 -// CHECK:STDOUT: %.loc9_20.1 => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet +// CHECK:STDOUT: %Self.as_type.loc9_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- library.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%N) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %D, %i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: %i32, .m: %i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [template] +// CHECK:STDOUT: %struct_type.n.m.1: type = struct_type {.n: %i32, .m: %i32} [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n.m.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.9: type = struct_type {.n: Core.IntLiteral, .m: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %struct_type.n.m.2: type = struct_type {.n: Core.IntLiteral, .m: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -293,88 +293,88 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.13: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.16: %.11 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.3) [template] -// CHECK:STDOUT: %.18: = bound_method %.8, %Convert.3 [template] -// CHECK:STDOUT: %.19: %i32 = int_value 0 [template] -// CHECK:STDOUT: %struct: %D = struct_value (%.19, %.19) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.19) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.3 [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %D.val: %D = struct_value (%int_0.2, %int_0.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_0.2) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.22: %ImplicitAs.type.2 = facet_value %C.3, %C.3 [symbolic] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.26: = bound_method %.25, %Convert.3 [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.27) [template] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %ImplicitAs.facet.1: %ImplicitAs.type.2 = facet_value %C.2, %C.2 [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.3 [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%int_1.2) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.28: %ImplicitAs.type.2 = facet_value %C.4, %C.4 [symbolic] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.3 [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.32) [template] +// CHECK:STDOUT: %ImplicitAs.facet.2: %ImplicitAs.type.2 = facet_value %C.3, %C.3 [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.3 [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%int_2.2) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.33: %ImplicitAs.type.2 = facet_value %C.5, %C.5 [symbolic] -// CHECK:STDOUT: %.34: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.3 [template] -// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.37) [template] +// CHECK:STDOUT: %ImplicitAs.facet.3: %ImplicitAs.type.2 = facet_value %C.4, %C.4 [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.3 [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%int_3.2) [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.38: %ImplicitAs.type.2 = facet_value %C.6, %C.6 [symbolic] -// CHECK:STDOUT: %.39: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.3 [template] -// CHECK:STDOUT: %.42: %i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.42) [template] +// CHECK:STDOUT: %ImplicitAs.facet.4: %ImplicitAs.type.2 = facet_value %C.5, %C.5 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.3 [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%int_4.2) [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.43: %ImplicitAs.type.2 = facet_value %C.7, %C.7 [symbolic] -// CHECK:STDOUT: %.44: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.3 [template] -// CHECK:STDOUT: %.47: %i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.47) [template] +// CHECK:STDOUT: %ImplicitAs.facet.5: %ImplicitAs.type.2 = facet_value %C.6, %C.6 [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_5.1, %Convert.3 [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%int_5.2) [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.48: %ImplicitAs.type.2 = facet_value %C.8, %C.8 [symbolic] -// CHECK:STDOUT: %.49: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %.50: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.51: = bound_method %.50, %Convert.3 [template] -// CHECK:STDOUT: %.52: %i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.52) [template] +// CHECK:STDOUT: %ImplicitAs.facet.6: %ImplicitAs.type.2 = facet_value %C.7, %C.7 [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_6.1, %Convert.3 [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%int_6.2) [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.53: %ImplicitAs.type.2 = facet_value %C.9, %C.9 [symbolic] -// CHECK:STDOUT: %.54: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %.55: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.56: = bound_method %.55, %Convert.3 [template] -// CHECK:STDOUT: %.57: %i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.57) [template] +// CHECK:STDOUT: %ImplicitAs.facet.7: %ImplicitAs.type.2 = facet_value %C.8, %C.8 [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_7.1, %Convert.3 [template] +// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%int_7.2) [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10 [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.58: %ImplicitAs.type.2 = facet_value %C.10, %C.10 [symbolic] -// CHECK:STDOUT: %.59: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %ImplicitAs.facet.8: %ImplicitAs.type.2 = facet_value %C.9, %C.9 [symbolic] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.12) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -383,14 +383,14 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .ImplicitAs = %import_ref.2 // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//default, inst+30, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//default, inst+30, loaded [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+36, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.11) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%.2 (constants.%.16)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//default, inst+52, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+52, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Core//default, inst+71, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.9: type = import_ref Core//default, inst+79, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.10: = import_ref Core//default, inst+103, loaded [template = constants.%.17] +// CHECK:STDOUT: %import_ref.10: = import_ref Core//default, inst+103, loaded [template = constants.%interface.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -401,14 +401,14 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .Make = %Make.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %N.patt.loc6_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc6_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_13.3: type = converted %int.make_type_signed, %.loc6_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed, %.loc6_13.1 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc6_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N)] // CHECK:STDOUT: } @@ -422,114 +422,114 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_8: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_9.2: = bound_method %.loc10_8, %.loc10_9.1 [template = constants.%.18] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_9.2(%.loc10_8) [template = constants.%.19] -// CHECK:STDOUT: %.loc10_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.19] -// CHECK:STDOUT: %.loc10_9.4: %i32 = converted %.loc10_8, %.loc10_9.3 [template = constants.%.19] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.19) [template = constants.%C.3] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_9.2: %i32 = converted %int_0, %.loc10_9.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_0.2) [template = constants.%C.2] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_8: Core.IntLiteral = int_value 1 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_9.2: = bound_method %.loc11_8, %.loc11_9.1 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_9.2(%.loc11_8) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc11_9.4: %i32 = converted %.loc11_8, %.loc11_9.3 [template = constants.%.27] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.4] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_9.2: %i32 = converted %int_1, %.loc11_9.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1.2) [template = constants.%C.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_8: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_9.2: = bound_method %.loc12_8, %.loc12_9.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_9.2(%.loc12_8) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc12_9.4: %i32 = converted %.loc12_8, %.loc12_9.3 [template = constants.%.32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.32) [template = constants.%C.5] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_9.2: %i32 = converted %int_2, %.loc12_9.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_2.2) [template = constants.%C.4] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_8: Core.IntLiteral = int_value 3 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_9.2: = bound_method %.loc13_8, %.loc13_9.1 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_9.2(%.loc13_8) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.37] -// CHECK:STDOUT: %.loc13_9.4: %i32 = converted %.loc13_8, %.loc13_9.3 [template = constants.%.37] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.37) [template = constants.%C.6] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_9.2: %i32 = converted %int_3, %.loc13_9.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_3.2) [template = constants.%C.5] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.6 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_8: Core.IntLiteral = int_value 4 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_9.2: = bound_method %.loc14_8, %.loc14_9.1 [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_9.2(%.loc14_8) [template = constants.%.42] -// CHECK:STDOUT: %.loc14_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.42] -// CHECK:STDOUT: %.loc14_9.4: %i32 = converted %.loc14_8, %.loc14_9.3 [template = constants.%.42] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.42) [template = constants.%C.7] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_9.2: %i32 = converted %int_4, %.loc14_9.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_4.2) [template = constants.%C.6] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.7 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_8: Core.IntLiteral = int_value 5 [template = constants.%.45] -// CHECK:STDOUT: %.loc15_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_9.2: = bound_method %.loc15_8, %.loc15_9.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_9.2(%.loc15_8) [template = constants.%.47] -// CHECK:STDOUT: %.loc15_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.47] -// CHECK:STDOUT: %.loc15_9.4: %i32 = converted %.loc15_8, %.loc15_9.3 [template = constants.%.47] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.47) [template = constants.%C.8] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_9.2: %i32 = converted %int_5, %.loc15_9.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_5.2) [template = constants.%C.7] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.8 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc16_8: Core.IntLiteral = int_value 6 [template = constants.%.50] -// CHECK:STDOUT: %.loc16_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc16_9.2: = bound_method %.loc16_8, %.loc16_9.1 [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_9.2(%.loc16_8) [template = constants.%.52] -// CHECK:STDOUT: %.loc16_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.52] -// CHECK:STDOUT: %.loc16_9.4: %i32 = converted %.loc16_8, %.loc16_9.3 [template = constants.%.52] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.52) [template = constants.%C.9] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_6, %impl.elem0 [template = constants.%Convert.bound.7] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_9.2: %i32 = converted %int_6, %.loc16_9.1 [template = constants.%int_6.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_6.2) [template = constants.%C.8] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.9 [template] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc17_8: Core.IntLiteral = int_value 7 [template = constants.%.55] -// CHECK:STDOUT: %.loc17_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc17_9.2: = bound_method %.loc17_8, %.loc17_9.1 [template = constants.%.56] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_9.2(%.loc17_8) [template = constants.%.57] -// CHECK:STDOUT: %.loc17_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.57] -// CHECK:STDOUT: %.loc17_9.4: %i32 = converted %.loc17_8, %.loc17_9.3 [template = constants.%.57] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.57) [template = constants.%C.10] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_7, %impl.elem0 [template = constants.%Convert.bound.8] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_7) [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc17_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc17_9.2: %i32 = converted %int_7, %.loc17_9.1 [template = constants.%int_7.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_7.2) [template = constants.%C.9] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } @@ -544,8 +544,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.12)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.6 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -562,170 +562,170 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.4 = fn_decl @Convert.3 [template = constants.%Convert.4] { +// CHECK:STDOUT: %self.patt: %C.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %C.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %D = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%C [template = constants.%C.2] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %self.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %C.2 = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %D = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.2] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Convert = %Convert.decl +// CHECK:STDOUT: witness = %interface +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @impl.3: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.6 = fn_decl @Convert.4 [template = constants.%Convert.6] { // CHECK:STDOUT: %self.patt: %C.3 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.3 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%C [template = constants.%C.3] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%C [template = constants.%C.3] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.3 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_33: = interface_witness (%Convert.decl) [template = constants.%.23] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc10_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.6 = fn_decl @Convert.4 [template = constants.%Convert.6] { +// CHECK:STDOUT: impl @impl.4: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.7 = fn_decl @Convert.5 [template = constants.%Convert.7] { // CHECK:STDOUT: %self.patt: %C.4 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.4 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%C [template = constants.%C.4] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%C [template = constants.%C.4] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.4 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.4 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_33: = interface_witness (%Convert.decl) [template = constants.%.29] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc11_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.7 = fn_decl @Convert.5 [template = constants.%Convert.7] { +// CHECK:STDOUT: impl @impl.5: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.8 = fn_decl @Convert.6 [template = constants.%Convert.8] { // CHECK:STDOUT: %self.patt: %C.5 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%C [template = constants.%C.5] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.5.%C [template = constants.%C.5] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.5 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.5 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_33: = interface_witness (%Convert.decl) [template = constants.%.34] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc12_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.5: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.8 = fn_decl @Convert.6 [template = constants.%Convert.8] { +// CHECK:STDOUT: impl @impl.6: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.9 = fn_decl @Convert.7 [template = constants.%Convert.9] { // CHECK:STDOUT: %self.patt: %C.6 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.5.%C [template = constants.%C.6] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.6.%C [template = constants.%C.6] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.6 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.6 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_33: = interface_witness (%Convert.decl) [template = constants.%.39] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc13_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.6: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.9 = fn_decl @Convert.7 [template = constants.%Convert.9] { +// CHECK:STDOUT: impl @impl.7: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.10 = fn_decl @Convert.8 [template = constants.%Convert.10] { // CHECK:STDOUT: %self.patt: %C.7 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.6.%C [template = constants.%C.7] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.7.%C [template = constants.%C.7] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.7 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.7 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_33: = interface_witness (%Convert.decl) [template = constants.%.44] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc14_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.7: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.10 = fn_decl @Convert.8 [template = constants.%Convert.10] { +// CHECK:STDOUT: impl @impl.8: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.11 = fn_decl @Convert.9 [template = constants.%Convert.11] { // CHECK:STDOUT: %self.patt: %C.8 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.8 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.7.%C [template = constants.%C.8] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8.%C [template = constants.%C.8] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.8 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.8 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_33: = interface_witness (%Convert.decl) [template = constants.%.49] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc15_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.8: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.11 = fn_decl @Convert.9 [template = constants.%Convert.11] { +// CHECK:STDOUT: impl @impl.9: %C as %ImplicitAs.type { +// CHECK:STDOUT: %Convert.decl: %Convert.type.12 = fn_decl @Convert.10 [template = constants.%Convert.12] { // CHECK:STDOUT: %self.patt: %C.9 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C.9 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8.%C [template = constants.%C.9] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9.%C [template = constants.%C.9] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.9 = value_param runtime_param0 // CHECK:STDOUT: %self: %C.9 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_33: = interface_witness (%Convert.decl) [template = constants.%.54] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc16_33 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9: %C as %ImplicitAs.type { -// CHECK:STDOUT: %Convert.decl: %Convert.type.12 = fn_decl @Convert.10 [template = constants.%Convert.12] { -// CHECK:STDOUT: %self.patt: %C.10 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %C.10 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %D = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9.%C [template = constants.%C.10] -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %self.param: %C.10 = value_param runtime_param0 -// CHECK:STDOUT: %self: %C.10 = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %D = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17_33: = interface_witness (%Convert.decl) [template = constants.%.59] +// CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = %.loc17_33 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%N.loc6_9.1: %i32) { @@ -735,55 +735,55 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc6_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc6_19 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%.loc7_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_18.2: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_18.3: type = converted %int.make_type_signed.loc7_18, %.loc7_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16: %.4 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc7_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call constants.%Int(%.loc7_30.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.2: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.3: type = converted %int.make_type_signed.loc7_30, %.loc7_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_28: %.4 = field_decl m, element1 [template] -// CHECK:STDOUT: %.loc7_35: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_16: %D.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %int_32.loc7_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call constants.%Int(%int_32.loc7_30) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_28: %D.elem = field_decl m, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.m.1 [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .n = %.loc7_16 // CHECK:STDOUT: .m = %.loc7_28 -// CHECK:STDOUT: complete_type_witness = %.loc7_35 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_31: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_39: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_40.1: %.9 = struct_literal (%.loc8_31, %.loc8_39) -// CHECK:STDOUT: %.loc8_40.2: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_40.3: = bound_method %.loc8_31, %.loc8_40.2 [template = constants.%.18] -// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32 = call %.loc8_40.3(%.loc8_31) [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.4: init %i32 = converted %.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.5: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc8_40.6: init %i32 = initialize_from %.loc8_40.4 to %.loc8_40.5 [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.7: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_40.8: = bound_method %.loc8_39, %.loc8_40.7 [template = constants.%.18] -// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32 = call %.loc8_40.8(%.loc8_39) [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.9: init %i32 = converted %.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.10: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc8_40.11: init %i32 = initialize_from %.loc8_40.9 to %.loc8_40.10 [template = constants.%.19] -// CHECK:STDOUT: %.loc8_40.12: init %D = class_init (%.loc8_40.6, %.loc8_40.11), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc8_41: init %D = converted %.loc8_40.1, %.loc8_40.12 [template = constants.%struct] +// CHECK:STDOUT: %int_0.loc8_31: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc8_39: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc8_40.1: %struct_type.n.m.2 = struct_literal (%int_0.loc8_31, %int_0.loc8_39) +// CHECK:STDOUT: %impl.elem0.loc8_40.1: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc8_40.1: = bound_method %int_0.loc8_31, %impl.elem0.loc8_40.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32 = call %Convert.bound.loc8_40.1(%int_0.loc8_31) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.2: init %i32 = converted %int_0.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc8_40.4: init %i32 = initialize_from %.loc8_40.2 to %.loc8_40.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc8_40.2: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc8_40.2: = bound_method %int_0.loc8_39, %impl.elem0.loc8_40.2 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32 = call %Convert.bound.loc8_40.2(%int_0.loc8_39) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.5: init %i32 = converted %int_0.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.6: ref %i32 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc8_40.7: init %i32 = initialize_from %.loc8_40.5 to %.loc8_40.6 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.8: init %D = class_init (%.loc8_40.4, %.loc8_40.7), %return [template = constants.%D.val] +// CHECK:STDOUT: %.loc8_41: init %D = converted %.loc8_40.1, %.loc8_40.8 [template = constants.%D.val] // CHECK:STDOUT: return %.loc8_41 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -791,14 +791,14 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.10)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.3]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.2]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc10: ref %D = splice_block %return {} @@ -806,7 +806,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %C.4]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %C.3]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc11: ref %D = splice_block %return {} @@ -814,7 +814,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %C.5]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %C.4]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc12: ref %D = splice_block %return {} @@ -822,7 +822,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.6[%self.param_patt: %C.6]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.6[%self.param_patt: %C.5]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc13: ref %D = splice_block %return {} @@ -830,7 +830,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.7[%self.param_patt: %C.7]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.7[%self.param_patt: %C.6]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc14: ref %D = splice_block %return {} @@ -838,7 +838,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.8[%self.param_patt: %C.8]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.8[%self.param_patt: %C.7]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc15: ref %D = splice_block %return {} @@ -846,7 +846,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.9[%self.param_patt: %C.9]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.9[%self.param_patt: %C.8]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc16: ref %D = splice_block %return {} @@ -854,7 +854,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.10[%self.param_patt: %C.10]() -> %return: %D { +// CHECK:STDOUT: fn @Convert.10[%self.param_patt: %C.9]() -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc17: ref %D = splice_block %return {} @@ -886,7 +886,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -898,13 +898,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.19) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.19 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.19 +// CHECK:STDOUT: specific @C(constants.%int_0.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_0.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -918,135 +918,135 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.20 -// CHECK:STDOUT: %.2 => constants.%.21 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.22) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.1) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.22 -// CHECK:STDOUT: %.1 => constants.%C.3 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.1 +// CHECK:STDOUT: %Self.as_type => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.27) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.27 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.27 +// CHECK:STDOUT: specific @C(constants.%int_1.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_1.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_1.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.28) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.2) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.28 -// CHECK:STDOUT: %.1 => constants.%C.4 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.2 +// CHECK:STDOUT: %Self.as_type => constants.%C.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.32) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.32 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.32 +// CHECK:STDOUT: specific @C(constants.%int_2.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_2.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_2.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.33) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.3) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.33 -// CHECK:STDOUT: %.1 => constants.%C.5 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.3 +// CHECK:STDOUT: %Self.as_type => constants.%C.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.37) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.37 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.37 +// CHECK:STDOUT: specific @C(constants.%int_3.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_3.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_3.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.38) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.4) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.38 -// CHECK:STDOUT: %.1 => constants.%C.6 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.4 +// CHECK:STDOUT: %Self.as_type => constants.%C.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.42) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.42 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.42 +// CHECK:STDOUT: specific @C(constants.%int_4.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_4.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_4.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.43) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.5) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.43 -// CHECK:STDOUT: %.1 => constants.%C.7 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.5 +// CHECK:STDOUT: %Self.as_type => constants.%C.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.47) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.47 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.47 +// CHECK:STDOUT: specific @C(constants.%int_5.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_5.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_5.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.48) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.6) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.48 -// CHECK:STDOUT: %.1 => constants.%C.8 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.6 +// CHECK:STDOUT: %Self.as_type => constants.%C.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.52) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.52 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.52 +// CHECK:STDOUT: specific @C(constants.%int_6.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_6.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_6.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.53) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.7) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.53 -// CHECK:STDOUT: %.1 => constants.%C.9 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.7 +// CHECK:STDOUT: %Self.as_type => constants.%C.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.57) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.57 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.57 +// CHECK:STDOUT: specific @C(constants.%int_7.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_7.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_7.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.58) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.8) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%.58 -// CHECK:STDOUT: %.1 => constants.%C.10 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.8 +// CHECK:STDOUT: %Self.as_type => constants.%C.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: %i32, .m: %i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %struct_type.n.m: type = struct_type {.n: %i32, .m: %i32} [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n.m [template] // CHECK:STDOUT: %F0.type: type = fn_type @F0 [template] // CHECK:STDOUT: %F0: %F0.type = struct_value () [template] -// CHECK:STDOUT: %.5: bool = bool_literal false [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] @@ -1054,87 +1054,87 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.14 [symbolic] -// CHECK:STDOUT: %.12: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.14 [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.14 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [template] -// CHECK:STDOUT: %.17: = bound_method %.8, %Convert.3 [template] -// CHECK:STDOUT: %.18: %i32 = int_value 0 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.18) [template] -// CHECK:STDOUT: %struct.1: %C.3 = struct_value () [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.3 [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_0.2) [template] +// CHECK:STDOUT: %C.val.1: %C.2 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.4 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.14 [template] -// CHECK:STDOUT: %.22: %i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.22) [template] -// CHECK:STDOUT: %.23: %i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.23) [template] -// CHECK:STDOUT: %.24: %i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.24) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.25) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.26) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.27) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.28) [template] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.4 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%int_1.1) [template] +// CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%int_2.1) [template] +// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%int_3.1) [template] +// CHECK:STDOUT: %int_4.1: %i32 = int_value 4 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%int_4.1) [template] +// CHECK:STDOUT: %int_5.1: %i32 = int_value 5 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%int_5.1) [template] +// CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%int_6.1) [template] +// CHECK:STDOUT: %int_7.1: %i32 = int_value 7 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%int_7.1) [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.5) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.3 [template] -// CHECK:STDOUT: %struct.2: %C.4 = struct_value () [template] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.2: %C.3 = struct_value () [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.3 [template] -// CHECK:STDOUT: %struct.3: %C.5 = struct_value () [template] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.3: %C.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.3 [template] -// CHECK:STDOUT: %struct.4: %C.6 = struct_value () [template] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.4: %C.5 = struct_value () [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.38: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.3 [template] -// CHECK:STDOUT: %struct.5: %C.7 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %int_4.2: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.5: %C.6 = struct_value () [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.41: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.3 [template] -// CHECK:STDOUT: %struct.6: %C.8 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %int_5.2: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_5.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.6: %C.7 = struct_value () [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.44: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.3 [template] -// CHECK:STDOUT: %struct.7: %C.9 = struct_value () [template] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_6.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.7: %C.8 = struct_value () [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.47: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.49: = bound_method %.48, %Convert.3 [template] -// CHECK:STDOUT: %struct.8: %C.10 = struct_value () [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %int_7.2: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_7.2, %Convert.3 [template] +// CHECK:STDOUT: %C.val.8: %C.9 = struct_value () [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10 [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.50: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.12) [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: } @@ -1152,44 +1152,44 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref P//library, inst+34, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.3: = import_ref P//library, inst+48, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.3: = import_ref P//library, inst+48, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.4 = import_ref P//library, inst+35, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref P//library, inst+41, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref P//library, inst+46, unloaded -// CHECK:STDOUT: %import_ref.7: %C.type = import_ref P//library, inst+25, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.8: = import_ref P//library, inst+32, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.7: %C.type = import_ref P//library, inst+25, loaded [template = constants.%C.generic] +// CHECK:STDOUT: %import_ref.8: = import_ref P//library, inst+32, loaded [template = constants.%complete_type.2] // CHECK:STDOUT: %import_ref.9 = import_ref P//library, inst+30, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst+36, unloaded -// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%.1 (%.10) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.13 = import_ref Core//default, inst+52, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//default, inst+52, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref Core//default, inst+71, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.17: type = import_ref Core//default, inst+79, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.18: = import_ref Core//default, inst+103, loaded [template = constants.%.16] -// CHECK:STDOUT: %import_ref.19: type = import_ref P//library, inst+148, loaded [template = constants.%C.3] +// CHECK:STDOUT: %import_ref.18: = import_ref Core//default, inst+103, loaded [template = constants.%interface.1] +// CHECK:STDOUT: %import_ref.19: type = import_ref P//library, inst+148, loaded [template = constants.%C.2] // CHECK:STDOUT: %import_ref.20: type = import_ref P//library, inst+153, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.21: = import_ref P//library, inst+174, loaded [template = constants.%.29] -// CHECK:STDOUT: %import_ref.22: type = import_ref P//library, inst+191, loaded [template = constants.%C.4] +// CHECK:STDOUT: %import_ref.21: = import_ref P//library, inst+174, loaded [template = constants.%interface.2] +// CHECK:STDOUT: %import_ref.22: type = import_ref P//library, inst+191, loaded [template = constants.%C.3] // CHECK:STDOUT: %import_ref.23: type = import_ref P//library, inst+196, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.24: = import_ref P//library, inst+212, loaded [template = constants.%.32] -// CHECK:STDOUT: %import_ref.25: type = import_ref P//library, inst+228, loaded [template = constants.%C.5] +// CHECK:STDOUT: %import_ref.24: = import_ref P//library, inst+212, loaded [template = constants.%interface.3] +// CHECK:STDOUT: %import_ref.25: type = import_ref P//library, inst+228, loaded [template = constants.%C.4] // CHECK:STDOUT: %import_ref.26: type = import_ref P//library, inst+233, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.27: = import_ref P//library, inst+249, loaded [template = constants.%.35] -// CHECK:STDOUT: %import_ref.28: type = import_ref P//library, inst+265, loaded [template = constants.%C.6] +// CHECK:STDOUT: %import_ref.27: = import_ref P//library, inst+249, loaded [template = constants.%interface.4] +// CHECK:STDOUT: %import_ref.28: type = import_ref P//library, inst+265, loaded [template = constants.%C.5] // CHECK:STDOUT: %import_ref.29: type = import_ref P//library, inst+270, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.30: = import_ref P//library, inst+286, loaded [template = constants.%.38] -// CHECK:STDOUT: %import_ref.31: type = import_ref P//library, inst+302, loaded [template = constants.%C.7] +// CHECK:STDOUT: %import_ref.30: = import_ref P//library, inst+286, loaded [template = constants.%interface.5] +// CHECK:STDOUT: %import_ref.31: type = import_ref P//library, inst+302, loaded [template = constants.%C.6] // CHECK:STDOUT: %import_ref.32: type = import_ref P//library, inst+307, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.33: = import_ref P//library, inst+323, loaded [template = constants.%.41] -// CHECK:STDOUT: %import_ref.34: type = import_ref P//library, inst+339, loaded [template = constants.%C.8] +// CHECK:STDOUT: %import_ref.33: = import_ref P//library, inst+323, loaded [template = constants.%interface.6] +// CHECK:STDOUT: %import_ref.34: type = import_ref P//library, inst+339, loaded [template = constants.%C.7] // CHECK:STDOUT: %import_ref.35: type = import_ref P//library, inst+344, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.36: = import_ref P//library, inst+360, loaded [template = constants.%.44] -// CHECK:STDOUT: %import_ref.37: type = import_ref P//library, inst+376, loaded [template = constants.%C.9] +// CHECK:STDOUT: %import_ref.36: = import_ref P//library, inst+360, loaded [template = constants.%interface.7] +// CHECK:STDOUT: %import_ref.37: type = import_ref P//library, inst+376, loaded [template = constants.%C.8] // CHECK:STDOUT: %import_ref.38: type = import_ref P//library, inst+381, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.39: = import_ref P//library, inst+397, loaded [template = constants.%.47] -// CHECK:STDOUT: %import_ref.40: type = import_ref P//library, inst+413, loaded [template = constants.%C.10] +// CHECK:STDOUT: %import_ref.39: = import_ref P//library, inst+397, loaded [template = constants.%interface.8] +// CHECK:STDOUT: %import_ref.40: type = import_ref P//library, inst+413, loaded [template = constants.%C.9] // CHECK:STDOUT: %import_ref.41: type = import_ref P//library, inst+418, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.42: = import_ref P//library, inst+434, loaded [template = constants.%.50] +// CHECK:STDOUT: %import_ref.42: = import_ref P//library, inst+434, loaded [template = constants.%interface.9] // CHECK:STDOUT: %import_ref.43: %Make.type = import_ref P//library, inst+55, loaded [template = constants.%Make] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1207,10 +1207,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed, %.loc7_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] // CHECK:STDOUT: %P.ref.loc7: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%D] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 @@ -1229,8 +1229,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.10)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.14 [symbolic = %.2 (constants.%.11)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.14 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1310,220 +1310,220 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @F0(%n.param_patt: %i32) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc8_7 br !if.then.loc8 else br !if.else.loc8 +// CHECK:STDOUT: %false.loc8: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc8 br !if.then.loc8 else br !if.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc8: -// CHECK:STDOUT: %.loc8_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc8_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc8_33: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_34.2: = bound_method %.loc8_33, %.loc8_34.1 [template = constants.%.17] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_34.2(%.loc8_33) [template = constants.%.18] -// CHECK:STDOUT: %.loc8_34.3: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.18] -// CHECK:STDOUT: %.loc8_34.4: %i32 = converted %.loc8_33, %.loc8_34.3 [template = constants.%.18] -// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.18) [template = constants.%C.3] -// CHECK:STDOUT: %.loc8_24.2: ref %C.3 = temporary_storage -// CHECK:STDOUT: %.loc8_24.3: init %C.3 = class_init (), %.loc8_24.2 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc8_24.4: ref %C.3 = temporary %.loc8_24.2, %.loc8_24.3 -// CHECK:STDOUT: %.loc8_26.1: ref %C.3 = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %.loc8_35.1: %Convert.type.4 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.5] -// CHECK:STDOUT: %.loc8_35.2: = bound_method %.loc8_26.1, %.loc8_35.1 -// CHECK:STDOUT: %.loc8_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc8_26.2: %C.3 = bind_value %.loc8_26.1 -// CHECK:STDOUT: %Convert.call.loc8: init %D = call %.loc8_35.2(%.loc8_26.2) to %.loc8_35.3 -// CHECK:STDOUT: %.loc8_35.4: init %D = converted %.loc8_26.1, %Convert.call.loc8 -// CHECK:STDOUT: return %.loc8_35.4 to %return +// CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc8_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc8_34: = bound_method %int_0, %impl.elem0.loc8_34 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.bound.loc8_34(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_0, %.loc8_34.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%int_0.2) [template = constants.%C.2] +// CHECK:STDOUT: %.loc8_24.2: ref %C.2 = temporary_storage +// CHECK:STDOUT: %.loc8_24.3: init %C.2 = class_init (), %.loc8_24.2 [template = constants.%C.val.1] +// CHECK:STDOUT: %.loc8_24.4: ref %C.2 = temporary %.loc8_24.2, %.loc8_24.3 +// CHECK:STDOUT: %.loc8_26.1: ref %C.2 = converted %.loc8_24.1, %.loc8_24.4 +// CHECK:STDOUT: %impl.elem0.loc8_35: %Convert.type.4 = interface_witness_access constants.%interface.2, element0 [template = constants.%Convert.5] +// CHECK:STDOUT: %Convert.bound.loc8_35: = bound_method %.loc8_26.1, %impl.elem0.loc8_35 +// CHECK:STDOUT: %.loc8_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc8_26.2: %C.2 = bind_value %.loc8_26.1 +// CHECK:STDOUT: %Convert.call.loc8: init %D = call %Convert.bound.loc8_35(%.loc8_26.2) to %.loc8_35.1 +// CHECK:STDOUT: %.loc8_35.2: init %D = converted %.loc8_26.1, %Convert.call.loc8 +// CHECK:STDOUT: return %.loc8_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc8: -// CHECK:STDOUT: %.loc9_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc9_7 br !if.then.loc9 else br !if.else.loc9 +// CHECK:STDOUT: %false.loc9: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc9 br !if.then.loc9 else br !if.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc9: -// CHECK:STDOUT: %.loc9_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc9_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_33: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc9_34.2: = bound_method %.loc9_33, %.loc9_34.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_34.2(%.loc9_33) [template = constants.%.22] -// CHECK:STDOUT: %.loc9_34.3: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.22] -// CHECK:STDOUT: %.loc9_34.4: %i32 = converted %.loc9_33, %.loc9_34.3 [template = constants.%.22] -// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.22) [template = constants.%C.4] -// CHECK:STDOUT: %.loc9_24.2: ref %C.4 = temporary_storage -// CHECK:STDOUT: %.loc9_24.3: init %C.4 = class_init (), %.loc9_24.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc9_24.4: ref %C.4 = temporary %.loc9_24.2, %.loc9_24.3 -// CHECK:STDOUT: %.loc9_26.1: ref %C.4 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %.loc9_35.1: %Convert.type.4 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc9_35.2: = bound_method %.loc9_26.1, %.loc9_35.1 -// CHECK:STDOUT: %.loc9_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc9_26.2: %C.4 = bind_value %.loc9_26.1 -// CHECK:STDOUT: %Convert.call.loc9: init %D = call %.loc9_35.2(%.loc9_26.2) to %.loc9_35.3 -// CHECK:STDOUT: %.loc9_35.4: init %D = converted %.loc9_26.1, %Convert.call.loc9 -// CHECK:STDOUT: return %.loc9_35.4 to %return +// CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc9_34: = bound_method %int_1, %impl.elem0.loc9_34 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.bound.loc9_34(%int_1) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_1, %.loc9_34.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%int_1.1) [template = constants.%C.3] +// CHECK:STDOUT: %.loc9_24.2: ref %C.3 = temporary_storage +// CHECK:STDOUT: %.loc9_24.3: init %C.3 = class_init (), %.loc9_24.2 [template = constants.%C.val.2] +// CHECK:STDOUT: %.loc9_24.4: ref %C.3 = temporary %.loc9_24.2, %.loc9_24.3 +// CHECK:STDOUT: %.loc9_26.1: ref %C.3 = converted %.loc9_24.1, %.loc9_24.4 +// CHECK:STDOUT: %impl.elem0.loc9_35: %Convert.type.4 = interface_witness_access constants.%interface.3, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %Convert.bound.loc9_35: = bound_method %.loc9_26.1, %impl.elem0.loc9_35 +// CHECK:STDOUT: %.loc9_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc9_26.2: %C.3 = bind_value %.loc9_26.1 +// CHECK:STDOUT: %Convert.call.loc9: init %D = call %Convert.bound.loc9_35(%.loc9_26.2) to %.loc9_35.1 +// CHECK:STDOUT: %.loc9_35.2: init %D = converted %.loc9_26.1, %Convert.call.loc9 +// CHECK:STDOUT: return %.loc9_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc9: -// CHECK:STDOUT: %.loc10_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc10_7 br !if.then.loc10 else br !if.else.loc10 +// CHECK:STDOUT: %false.loc10: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc10 br !if.then.loc10 else br !if.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc10: -// CHECK:STDOUT: %.loc10_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc10_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_33: Core.IntLiteral = int_value 2 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_33, %.loc10_34.1 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_34.2(%.loc10_33) [template = constants.%.23] -// CHECK:STDOUT: %.loc10_34.3: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_34.4: %i32 = converted %.loc10_33, %.loc10_34.3 [template = constants.%.23] -// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.23) [template = constants.%C.5] -// CHECK:STDOUT: %.loc10_24.2: ref %C.5 = temporary_storage -// CHECK:STDOUT: %.loc10_24.3: init %C.5 = class_init (), %.loc10_24.2 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc10_24.4: ref %C.5 = temporary %.loc10_24.2, %.loc10_24.3 -// CHECK:STDOUT: %.loc10_26.1: ref %C.5 = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %.loc10_35.1: %Convert.type.4 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.7] -// CHECK:STDOUT: %.loc10_35.2: = bound_method %.loc10_26.1, %.loc10_35.1 -// CHECK:STDOUT: %.loc10_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc10_26.2: %C.5 = bind_value %.loc10_26.1 -// CHECK:STDOUT: %Convert.call.loc10: init %D = call %.loc10_35.2(%.loc10_26.2) to %.loc10_35.3 -// CHECK:STDOUT: %.loc10_35.4: init %D = converted %.loc10_26.1, %Convert.call.loc10 -// CHECK:STDOUT: return %.loc10_35.4 to %return +// CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc10_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc10_34: = bound_method %int_2, %impl.elem0.loc10_34 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.bound.loc10_34(%int_2) [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int_2, %.loc10_34.1 [template = constants.%int_2.1] +// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%int_2.1) [template = constants.%C.4] +// CHECK:STDOUT: %.loc10_24.2: ref %C.4 = temporary_storage +// CHECK:STDOUT: %.loc10_24.3: init %C.4 = class_init (), %.loc10_24.2 [template = constants.%C.val.3] +// CHECK:STDOUT: %.loc10_24.4: ref %C.4 = temporary %.loc10_24.2, %.loc10_24.3 +// CHECK:STDOUT: %.loc10_26.1: ref %C.4 = converted %.loc10_24.1, %.loc10_24.4 +// CHECK:STDOUT: %impl.elem0.loc10_35: %Convert.type.4 = interface_witness_access constants.%interface.4, element0 [template = constants.%Convert.7] +// CHECK:STDOUT: %Convert.bound.loc10_35: = bound_method %.loc10_26.1, %impl.elem0.loc10_35 +// CHECK:STDOUT: %.loc10_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc10_26.2: %C.4 = bind_value %.loc10_26.1 +// CHECK:STDOUT: %Convert.call.loc10: init %D = call %Convert.bound.loc10_35(%.loc10_26.2) to %.loc10_35.1 +// CHECK:STDOUT: %.loc10_35.2: init %D = converted %.loc10_26.1, %Convert.call.loc10 +// CHECK:STDOUT: return %.loc10_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc10: -// CHECK:STDOUT: %.loc11_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc11_7 br !if.then.loc11 else br !if.else.loc11 +// CHECK:STDOUT: %false.loc11: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc11 br !if.then.loc11 else br !if.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11: -// CHECK:STDOUT: %.loc11_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc11_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_34.2: = bound_method %.loc11_33, %.loc11_34.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_34.2(%.loc11_33) [template = constants.%.24] -// CHECK:STDOUT: %.loc11_34.3: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_34.4: %i32 = converted %.loc11_33, %.loc11_34.3 [template = constants.%.24] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.24) [template = constants.%C.6] -// CHECK:STDOUT: %.loc11_24.2: ref %C.6 = temporary_storage -// CHECK:STDOUT: %.loc11_24.3: init %C.6 = class_init (), %.loc11_24.2 [template = constants.%struct.4] -// CHECK:STDOUT: %.loc11_24.4: ref %C.6 = temporary %.loc11_24.2, %.loc11_24.3 -// CHECK:STDOUT: %.loc11_26.1: ref %C.6 = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %.loc11_35.1: %Convert.type.4 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.8] -// CHECK:STDOUT: %.loc11_35.2: = bound_method %.loc11_26.1, %.loc11_35.1 -// CHECK:STDOUT: %.loc11_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc11_26.2: %C.6 = bind_value %.loc11_26.1 -// CHECK:STDOUT: %Convert.call.loc11: init %D = call %.loc11_35.2(%.loc11_26.2) to %.loc11_35.3 -// CHECK:STDOUT: %.loc11_35.4: init %D = converted %.loc11_26.1, %Convert.call.loc11 -// CHECK:STDOUT: return %.loc11_35.4 to %return +// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc11_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc11_34: = bound_method %int_3, %impl.elem0.loc11_34 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.bound.loc11_34(%int_3) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_34.1: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_34.2: %i32 = converted %int_3, %.loc11_34.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%int_3.1) [template = constants.%C.5] +// CHECK:STDOUT: %.loc11_24.2: ref %C.5 = temporary_storage +// CHECK:STDOUT: %.loc11_24.3: init %C.5 = class_init (), %.loc11_24.2 [template = constants.%C.val.4] +// CHECK:STDOUT: %.loc11_24.4: ref %C.5 = temporary %.loc11_24.2, %.loc11_24.3 +// CHECK:STDOUT: %.loc11_26.1: ref %C.5 = converted %.loc11_24.1, %.loc11_24.4 +// CHECK:STDOUT: %impl.elem0.loc11_35: %Convert.type.4 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %Convert.bound.loc11_35: = bound_method %.loc11_26.1, %impl.elem0.loc11_35 +// CHECK:STDOUT: %.loc11_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc11_26.2: %C.5 = bind_value %.loc11_26.1 +// CHECK:STDOUT: %Convert.call.loc11: init %D = call %Convert.bound.loc11_35(%.loc11_26.2) to %.loc11_35.1 +// CHECK:STDOUT: %.loc11_35.2: init %D = converted %.loc11_26.1, %Convert.call.loc11 +// CHECK:STDOUT: return %.loc11_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11: -// CHECK:STDOUT: %.loc12_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc12_7 br !if.then.loc12 else br !if.else.loc12 +// CHECK:STDOUT: %false.loc12: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc12 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: -// CHECK:STDOUT: %.loc12_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc12_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 4 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_34.2: = bound_method %.loc12_33, %.loc12_34.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_34.2(%.loc12_33) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_34.3: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_34.4: %i32 = converted %.loc12_33, %.loc12_34.3 [template = constants.%.25] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.25) [template = constants.%C.7] -// CHECK:STDOUT: %.loc12_24.2: ref %C.7 = temporary_storage -// CHECK:STDOUT: %.loc12_24.3: init %C.7 = class_init (), %.loc12_24.2 [template = constants.%struct.5] -// CHECK:STDOUT: %.loc12_24.4: ref %C.7 = temporary %.loc12_24.2, %.loc12_24.3 -// CHECK:STDOUT: %.loc12_26.1: ref %C.7 = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %.loc12_35.1: %Convert.type.4 = interface_witness_access constants.%.41, element0 [template = constants.%Convert.9] -// CHECK:STDOUT: %.loc12_35.2: = bound_method %.loc12_26.1, %.loc12_35.1 -// CHECK:STDOUT: %.loc12_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc12_26.2: %C.7 = bind_value %.loc12_26.1 -// CHECK:STDOUT: %Convert.call.loc12: init %D = call %.loc12_35.2(%.loc12_26.2) to %.loc12_35.3 -// CHECK:STDOUT: %.loc12_35.4: init %D = converted %.loc12_26.1, %Convert.call.loc12 -// CHECK:STDOUT: return %.loc12_35.4 to %return +// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.2] +// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_4, %impl.elem0.loc12_34 [template = constants.%Convert.bound.5] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.bound.loc12_34(%int_4) [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_4, %.loc12_34.1 [template = constants.%int_4.1] +// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%int_4.1) [template = constants.%C.6] +// CHECK:STDOUT: %.loc12_24.2: ref %C.6 = temporary_storage +// CHECK:STDOUT: %.loc12_24.3: init %C.6 = class_init (), %.loc12_24.2 [template = constants.%C.val.5] +// CHECK:STDOUT: %.loc12_24.4: ref %C.6 = temporary %.loc12_24.2, %.loc12_24.3 +// CHECK:STDOUT: %.loc12_26.1: ref %C.6 = converted %.loc12_24.1, %.loc12_24.4 +// CHECK:STDOUT: %impl.elem0.loc12_35: %Convert.type.4 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %Convert.bound.loc12_35: = bound_method %.loc12_26.1, %impl.elem0.loc12_35 +// CHECK:STDOUT: %.loc12_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc12_26.2: %C.6 = bind_value %.loc12_26.1 +// CHECK:STDOUT: %Convert.call.loc12: init %D = call %Convert.bound.loc12_35(%.loc12_26.2) to %.loc12_35.1 +// CHECK:STDOUT: %.loc12_35.2: init %D = converted %.loc12_26.1, %Convert.call.loc12 +// CHECK:STDOUT: return %.loc12_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: -// CHECK:STDOUT: %.loc13_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc13_7 br !if.then.loc13 else br !if.else.loc13 +// CHECK:STDOUT: %false.loc13: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc13 br !if.then.loc13 else br !if.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc13: -// CHECK:STDOUT: %.loc13_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc13_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_34.2: = bound_method %.loc13_33, %.loc13_34.1 [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_34.2(%.loc13_33) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_34.3: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_34.4: %i32 = converted %.loc13_33, %.loc13_34.3 [template = constants.%.26] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.26) [template = constants.%C.8] -// CHECK:STDOUT: %.loc13_24.2: ref %C.8 = temporary_storage -// CHECK:STDOUT: %.loc13_24.3: init %C.8 = class_init (), %.loc13_24.2 [template = constants.%struct.6] -// CHECK:STDOUT: %.loc13_24.4: ref %C.8 = temporary %.loc13_24.2, %.loc13_24.3 -// CHECK:STDOUT: %.loc13_26.1: ref %C.8 = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %.loc13_35.1: %Convert.type.4 = interface_witness_access constants.%.44, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %.loc13_35.2: = bound_method %.loc13_26.1, %.loc13_35.1 -// CHECK:STDOUT: %.loc13_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc13_26.2: %C.8 = bind_value %.loc13_26.1 -// CHECK:STDOUT: %Convert.call.loc13: init %D = call %.loc13_35.2(%.loc13_26.2) to %.loc13_35.3 -// CHECK:STDOUT: %.loc13_35.4: init %D = converted %.loc13_26.1, %Convert.call.loc13 -// CHECK:STDOUT: return %.loc13_35.4 to %return +// CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_5, %impl.elem0.loc13_34 [template = constants.%Convert.bound.6] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.bound.loc13_34(%int_5) [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_5, %.loc13_34.1 [template = constants.%int_5.1] +// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%int_5.1) [template = constants.%C.7] +// CHECK:STDOUT: %.loc13_24.2: ref %C.7 = temporary_storage +// CHECK:STDOUT: %.loc13_24.3: init %C.7 = class_init (), %.loc13_24.2 [template = constants.%C.val.6] +// CHECK:STDOUT: %.loc13_24.4: ref %C.7 = temporary %.loc13_24.2, %.loc13_24.3 +// CHECK:STDOUT: %.loc13_26.1: ref %C.7 = converted %.loc13_24.1, %.loc13_24.4 +// CHECK:STDOUT: %impl.elem0.loc13_35: %Convert.type.4 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %Convert.bound.loc13_35: = bound_method %.loc13_26.1, %impl.elem0.loc13_35 +// CHECK:STDOUT: %.loc13_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc13_26.2: %C.7 = bind_value %.loc13_26.1 +// CHECK:STDOUT: %Convert.call.loc13: init %D = call %Convert.bound.loc13_35(%.loc13_26.2) to %.loc13_35.1 +// CHECK:STDOUT: %.loc13_35.2: init %D = converted %.loc13_26.1, %Convert.call.loc13 +// CHECK:STDOUT: return %.loc13_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc13: -// CHECK:STDOUT: %.loc14_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc14_7 br !if.then.loc14 else br !if.else.loc14 +// CHECK:STDOUT: %false.loc14: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc14 br !if.then.loc14 else br !if.else.loc14 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc14: -// CHECK:STDOUT: %.loc14_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc14_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_33: Core.IntLiteral = int_value 6 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_34.2: = bound_method %.loc14_33, %.loc14_34.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_34.2(%.loc14_33) [template = constants.%.27] -// CHECK:STDOUT: %.loc14_34.3: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_34.4: %i32 = converted %.loc14_33, %.loc14_34.3 [template = constants.%.27] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.27) [template = constants.%C.9] -// CHECK:STDOUT: %.loc14_24.2: ref %C.9 = temporary_storage -// CHECK:STDOUT: %.loc14_24.3: init %C.9 = class_init (), %.loc14_24.2 [template = constants.%struct.7] -// CHECK:STDOUT: %.loc14_24.4: ref %C.9 = temporary %.loc14_24.2, %.loc14_24.3 -// CHECK:STDOUT: %.loc14_26.1: ref %C.9 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %.loc14_35.1: %Convert.type.4 = interface_witness_access constants.%.47, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %.loc14_35.2: = bound_method %.loc14_26.1, %.loc14_35.1 -// CHECK:STDOUT: %.loc14_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc14_26.2: %C.9 = bind_value %.loc14_26.1 -// CHECK:STDOUT: %Convert.call.loc14: init %D = call %.loc14_35.2(%.loc14_26.2) to %.loc14_35.3 -// CHECK:STDOUT: %.loc14_35.4: init %D = converted %.loc14_26.1, %Convert.call.loc14 -// CHECK:STDOUT: return %.loc14_35.4 to %return +// CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] +// CHECK:STDOUT: %impl.elem0.loc14_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc14_34: = bound_method %int_6, %impl.elem0.loc14_34 [template = constants.%Convert.bound.7] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.bound.loc14_34(%int_6) [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int_6, %.loc14_34.1 [template = constants.%int_6.1] +// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%int_6.1) [template = constants.%C.8] +// CHECK:STDOUT: %.loc14_24.2: ref %C.8 = temporary_storage +// CHECK:STDOUT: %.loc14_24.3: init %C.8 = class_init (), %.loc14_24.2 [template = constants.%C.val.7] +// CHECK:STDOUT: %.loc14_24.4: ref %C.8 = temporary %.loc14_24.2, %.loc14_24.3 +// CHECK:STDOUT: %.loc14_26.1: ref %C.8 = converted %.loc14_24.1, %.loc14_24.4 +// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.4 = interface_witness_access constants.%interface.8, element0 [template = constants.%Convert.11] +// CHECK:STDOUT: %Convert.bound.loc14_35: = bound_method %.loc14_26.1, %impl.elem0.loc14_35 +// CHECK:STDOUT: %.loc14_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc14_26.2: %C.8 = bind_value %.loc14_26.1 +// CHECK:STDOUT: %Convert.call.loc14: init %D = call %Convert.bound.loc14_35(%.loc14_26.2) to %.loc14_35.1 +// CHECK:STDOUT: %.loc14_35.2: init %D = converted %.loc14_26.1, %Convert.call.loc14 +// CHECK:STDOUT: return %.loc14_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc14: -// CHECK:STDOUT: %.loc15_7: bool = bool_literal false [template = constants.%.5] -// CHECK:STDOUT: if %.loc15_7 br !if.then.loc15 else br !if.else.loc15 +// CHECK:STDOUT: %false.loc15: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %false.loc15 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: -// CHECK:STDOUT: %.loc15_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc15_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %P.ref.loc15: = name_ref P, imports.%P [template = imports.%P] -// CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 7 [template = constants.%.48] -// CHECK:STDOUT: %.loc15_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_34.2: = bound_method %.loc15_33, %.loc15_34.1 [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_34.2(%.loc15_33) [template = constants.%.28] -// CHECK:STDOUT: %.loc15_34.3: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_34.4: %i32 = converted %.loc15_33, %.loc15_34.3 [template = constants.%.28] -// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.28) [template = constants.%C.10] -// CHECK:STDOUT: %.loc15_24.2: ref %C.10 = temporary_storage -// CHECK:STDOUT: %.loc15_24.3: init %C.10 = class_init (), %.loc15_24.2 [template = constants.%struct.8] -// CHECK:STDOUT: %.loc15_24.4: ref %C.10 = temporary %.loc15_24.2, %.loc15_24.3 -// CHECK:STDOUT: %.loc15_26.1: ref %C.10 = converted %.loc15_24.1, %.loc15_24.4 -// CHECK:STDOUT: %.loc15_35.1: %Convert.type.4 = interface_witness_access constants.%.50, element0 [template = constants.%Convert.12] -// CHECK:STDOUT: %.loc15_35.2: = bound_method %.loc15_26.1, %.loc15_35.1 -// CHECK:STDOUT: %.loc15_35.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc15_26.2: %C.10 = bind_value %.loc15_26.1 -// CHECK:STDOUT: %Convert.call.loc15: init %D = call %.loc15_35.2(%.loc15_26.2) to %.loc15_35.3 -// CHECK:STDOUT: %.loc15_35.4: init %D = converted %.loc15_26.1, %Convert.call.loc15 -// CHECK:STDOUT: return %.loc15_35.4 to %return +// CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.generic] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.2] +// CHECK:STDOUT: %impl.elem0.loc15_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %Convert.bound.loc15_34: = bound_method %int_7, %impl.elem0.loc15_34 [template = constants.%Convert.bound.8] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.bound.loc15_34(%int_7) [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc15_34.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc15_34.2: %i32 = converted %int_7, %.loc15_34.1 [template = constants.%int_7.1] +// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%int_7.1) [template = constants.%C.9] +// CHECK:STDOUT: %.loc15_24.2: ref %C.9 = temporary_storage +// CHECK:STDOUT: %.loc15_24.3: init %C.9 = class_init (), %.loc15_24.2 [template = constants.%C.val.8] +// CHECK:STDOUT: %.loc15_24.4: ref %C.9 = temporary %.loc15_24.2, %.loc15_24.3 +// CHECK:STDOUT: %.loc15_26.1: ref %C.9 = converted %.loc15_24.1, %.loc15_24.4 +// CHECK:STDOUT: %impl.elem0.loc15_35: %Convert.type.4 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.12] +// CHECK:STDOUT: %Convert.bound.loc15_35: = bound_method %.loc15_26.1, %impl.elem0.loc15_35 +// CHECK:STDOUT: %.loc15_35.1: ref %D = temporary_storage +// CHECK:STDOUT: %.loc15_26.2: %C.9 = bind_value %.loc15_26.1 +// CHECK:STDOUT: %Convert.call.loc15: init %D = call %Convert.bound.loc15_35(%.loc15_26.2) to %.loc15_35.1 +// CHECK:STDOUT: %.loc15_35.2: init %D = converted %.loc15_26.1, %Convert.call.loc15 +// CHECK:STDOUT: return %.loc15_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: // CHECK:STDOUT: %P.ref.loc16: = name_ref P, imports.%P [template = imports.%P] @@ -1537,28 +1537,28 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.9)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.3]() -> %D; +// CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.2]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %C.4]() -> %D; +// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %C.3]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %C.5]() -> %D; +// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %C.4]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.6[%self.param_patt: %C.6]() -> %D; +// CHECK:STDOUT: fn @Convert.6[%self.param_patt: %C.5]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.7[%self.param_patt: %C.7]() -> %D; +// CHECK:STDOUT: fn @Convert.7[%self.param_patt: %C.6]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.8[%self.param_patt: %C.8]() -> %D; +// CHECK:STDOUT: fn @Convert.8[%self.param_patt: %C.7]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.9[%self.param_patt: %C.9]() -> %D; +// CHECK:STDOUT: fn @Convert.9[%self.param_patt: %C.8]() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.10[%self.param_patt: %C.10]() -> %D; +// CHECK:STDOUT: fn @Convert.10[%self.param_patt: %C.9]() -> %D; // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %D; // CHECK:STDOUT: @@ -1586,7 +1586,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -1598,13 +1598,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.13 -// CHECK:STDOUT: %.2 => constants.%.14 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.18) { -// CHECK:STDOUT: %N => constants.%.18 -// CHECK:STDOUT: %N.patt => constants.%.18 +// CHECK:STDOUT: specific @C(constants.%int_0.2) { +// CHECK:STDOUT: %N => constants.%int_0.2 +// CHECK:STDOUT: %N.patt => constants.%int_0.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1618,55 +1618,55 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.1 => constants.%.20 -// CHECK:STDOUT: %.2 => constants.%.21 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.22) { -// CHECK:STDOUT: %N => constants.%.22 -// CHECK:STDOUT: %N.patt => constants.%.22 +// CHECK:STDOUT: specific @C(constants.%int_1.1) { +// CHECK:STDOUT: %N => constants.%int_1.1 +// CHECK:STDOUT: %N.patt => constants.%int_1.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.23) { -// CHECK:STDOUT: %N => constants.%.23 -// CHECK:STDOUT: %N.patt => constants.%.23 +// CHECK:STDOUT: specific @C(constants.%int_2.1) { +// CHECK:STDOUT: %N => constants.%int_2.1 +// CHECK:STDOUT: %N.patt => constants.%int_2.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.24) { -// CHECK:STDOUT: %N => constants.%.24 -// CHECK:STDOUT: %N.patt => constants.%.24 +// CHECK:STDOUT: specific @C(constants.%int_3.1) { +// CHECK:STDOUT: %N => constants.%int_3.1 +// CHECK:STDOUT: %N.patt => constants.%int_3.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.25) { -// CHECK:STDOUT: %N => constants.%.25 -// CHECK:STDOUT: %N.patt => constants.%.25 +// CHECK:STDOUT: specific @C(constants.%int_4.1) { +// CHECK:STDOUT: %N => constants.%int_4.1 +// CHECK:STDOUT: %N.patt => constants.%int_4.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.26) { -// CHECK:STDOUT: %N => constants.%.26 -// CHECK:STDOUT: %N.patt => constants.%.26 +// CHECK:STDOUT: specific @C(constants.%int_5.1) { +// CHECK:STDOUT: %N => constants.%int_5.1 +// CHECK:STDOUT: %N.patt => constants.%int_5.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.27) { -// CHECK:STDOUT: %N => constants.%.27 -// CHECK:STDOUT: %N.patt => constants.%.27 +// CHECK:STDOUT: specific @C(constants.%int_6.1) { +// CHECK:STDOUT: %N => constants.%int_6.1 +// CHECK:STDOUT: %N.patt => constants.%int_6.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.28) { -// CHECK:STDOUT: %N => constants.%.28 -// CHECK:STDOUT: %N.patt => constants.%.28 +// CHECK:STDOUT: specific @C(constants.%int_7.1) { +// CHECK:STDOUT: %N => constants.%int_7.1 +// CHECK:STDOUT: %N.patt => constants.%int_7.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index dce7877be91b1..50fac1e421844 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -27,35 +27,35 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,77 +88,77 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.3: type = converted %int.make_type_signed.loc21, %.loc21_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.3: type = converted %int.make_type_signed.loc13, %.loc13_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .a = %.loc12_8 // CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: complete_type_witness = %.loc14 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %result: ref %C = bind_name result, %return -// CHECK:STDOUT: %.loc17_34: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_42: Core.IntLiteral = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_43.1: %.8 = struct_literal (%.loc17_34, %.loc17_42) -// CHECK:STDOUT: %.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_43.3: = bound_method %.loc17_34, %.loc17_43.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc17_43.4: = specific_function %.loc17_43.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %.loc17_43.4(%.loc17_34) [template = constants.%.35] -// CHECK:STDOUT: %.loc17_43.5: init %i32 = converted %.loc17_34, %int.convert_checked.loc17_43.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_43.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc17_43.7: init %i32 = initialize_from %.loc17_43.5 to %.loc17_43.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc17_43.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_43.9: = bound_method %.loc17_42, %.loc17_43.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc17_43.10: = specific_function %.loc17_43.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %.loc17_43.10(%.loc17_42) [template = constants.%.38] -// CHECK:STDOUT: %.loc17_43.11: init %i32 = converted %.loc17_42, %int.convert_checked.loc17_43.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_43.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_43.13: init %i32 = initialize_from %.loc17_43.11 to %.loc17_43.12 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_43.14: init %C = class_init (%.loc17_43.7, %.loc17_43.13), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc17_44: init %C = converted %.loc17_43.1, %.loc17_43.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc17_43.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc17_43.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_43.1: = bound_method %int_1, %impl.elem0.loc17_43.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc17_43.1: = specific_function %Convert.bound.loc17_43.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %Convert.specific_fn.loc17_43.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_43.2: init %i32 = converted %int_1, %int.convert_checked.loc17_43.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc17_43.3: ref %i32 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc17_43.4: init %i32 = initialize_from %.loc17_43.2 to %.loc17_43.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc17_43.2: = bound_method %int_2, %impl.elem0.loc17_43.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc17_43.2: = specific_function %Convert.bound.loc17_43.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %Convert.specific_fn.loc17_43.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_43.5: init %i32 = converted %int_2, %int.convert_checked.loc17_43.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_43.6: ref %i32 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc17_43.7: init %i32 = initialize_from %.loc17_43.5 to %.loc17_43.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_43.8: init %C = class_init (%.loc17_43.4, %.loc17_43.7), %return [template = constants.%C.val] +// CHECK:STDOUT: %.loc17_44: init %C = converted %.loc17_43.1, %.loc17_43.8 [template = constants.%C.val] // CHECK:STDOUT: assign %return, %.loc17_44 // CHECK:STDOUT: return %result to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_24.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_24.3: type = converted %int.make_type_signed.loc22, %.loc22_24.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_24.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_24.2: type = converted %int.make_type_signed.loc22, %.loc22_24.1 [template = constants.%i32] // CHECK:STDOUT: %result.var: ref %i32 = var result // CHECK:STDOUT: %result: ref %i32 = bind_name result, %result.var -// CHECK:STDOUT: %.loc22_30: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc22_31.1: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_31.2: = bound_method %.loc22_30, %.loc22_31.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc22_31.3: = specific_function %.loc22_31.2, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_31.3(%.loc22_30) [template = constants.%.42] -// CHECK:STDOUT: %.loc22_31.4: init %i32 = converted %.loc22_30, %int.convert_checked [template = constants.%.42] -// CHECK:STDOUT: assign %result.var, %.loc22_31.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc22_31: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %result.var, %.loc22_31 // CHECK:STDOUT: %.loc22_16: %i32 = bind_value %result // CHECK:STDOUT: return %.loc22_16 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 022a8f68dcc89..15a216fde2353 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -30,25 +30,25 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: --- returned_var_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %UnrelatedScopes.type: type = fn_type @UnrelatedScopes [template] // CHECK:STDOUT: %UnrelatedScopes: %UnrelatedScopes.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %EnclosingButAfter.type: type = fn_type @EnclosingButAfter [template] @@ -76,10 +76,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11, %.loc11_25.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11, %.loc11_25.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -92,10 +92,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // 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] -// CHECK:STDOUT: %.loc21_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_34.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_34.3: type = converted %int.make_type_signed.loc21, %.loc21_34.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_34.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_34.2: type = converted %int.make_type_signed.loc21, %.loc21_34.1 [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -105,54 +105,54 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @UnrelatedScopes() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc12 br !if.then.loc12 else br !if.else.loc12 +// CHECK:STDOUT: %true.loc12: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc12 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: -// CHECK:STDOUT: %.loc13_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.3: type = converted %int.make_type_signed.loc13, %.loc13_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc13_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.30] -// CHECK:STDOUT: assign %v.var, %.loc13_28.4 +// CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc13_28: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc13_28 // CHECK:STDOUT: br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: -// CHECK:STDOUT: %.loc15: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: if %.loc15 br !if.then.loc15 else br !if.else.loc15 +// CHECK:STDOUT: %true.loc15: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true.loc15 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: -// CHECK:STDOUT: %.loc16_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_21.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_21.3: type = converted %int.make_type_signed.loc16, %.loc16_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_21.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_21.2: type = converted %int.make_type_signed.loc16, %.loc16_21.1 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc16_27: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc16_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_28.2: = bound_method %.loc16_27, %.loc16_28.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_28.3: = specific_function %.loc16_28.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_28.3(%.loc16_27) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_28.4: init %i32 = converted %.loc16_27, %int.convert_checked.loc16 [template = constants.%.34] -// CHECK:STDOUT: assign %w.var, %.loc16_28.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_1, %impl.elem0.loc16 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc16_28: init %i32 = converted %int_1, %int.convert_checked.loc16 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc16_28 // CHECK:STDOUT: br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: -// CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc18_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_11.2: = bound_method %.loc18_10, %.loc18_11.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc18_11.3: = specific_function %.loc18_11.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_11.3(%.loc18_10) [template = constants.%.30] -// CHECK:STDOUT: %.loc18_11.4: %i32 = value_of_initializer %int.convert_checked.loc18 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_11.5: %i32 = converted %.loc18_10, %.loc18_11.4 [template = constants.%.30] -// CHECK:STDOUT: return %.loc18_11.5 +// CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_0.loc18, %impl.elem0.loc18 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_0.loc18) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc18_11.1: %i32 = value_of_initializer %int.convert_checked.loc18 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc18_11.2: %i32 = converted %int_0.loc18, %.loc18_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc18_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @EnclosingButAfter(%b.param_patt: bool) -> %i32 { @@ -161,36 +161,36 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc23_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_21.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.2: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.3: type = converted %int.make_type_signed.loc23, %.loc23_21.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] +// CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_signed.loc23, %.loc23_21.1 [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc23_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_28.2: = bound_method %.loc23_27, %.loc23_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc23_28.3: = specific_function %.loc23_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_28.3(%.loc23_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc23_28.4: init %i32 = converted %.loc23_27, %int.convert_checked.loc23 [template = constants.%.30] -// CHECK:STDOUT: assign %v.var, %.loc23_28.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0, %impl.elem0.loc23 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc23_28: init %i32 = converted %int_0, %int.convert_checked.loc23 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc23_28 // CHECK:STDOUT: %.loc23_18: %i32 = bind_value %v // CHECK:STDOUT: return %.loc23_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc26_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%.loc26_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_19.2: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_19.3: type = converted %int.make_type_signed.loc26, %.loc26_19.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] +// CHECK:STDOUT: %.loc26_19.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] +// CHECK:STDOUT: %.loc26_19.2: type = converted %int.make_type_signed.loc26, %.loc26_19.1 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc26_25: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc26_26.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_26.2: = bound_method %.loc26_25, %.loc26_26.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc26_26.3: = specific_function %.loc26_26.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_26.3(%.loc26_25) [template = constants.%.34] -// CHECK:STDOUT: %.loc26_26.4: init %i32 = converted %.loc26_25, %int.convert_checked.loc26 [template = constants.%.34] -// CHECK:STDOUT: assign %w.var, %.loc26_26.4 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_1, %impl.elem0.loc26 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc26_26: init %i32 = converted %int_1, %int.convert_checked.loc26 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc26_26 // CHECK:STDOUT: %.loc26_16: %i32 = bind_value %w // CHECK:STDOUT: return %.loc26_16 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 9c448c9130ede..43a1eb9d589fa 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -15,23 +15,23 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: --- struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_3.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,31 +50,31 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %struct_type.a.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.3: type = converted %int.make_type_signed, %.loc11_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %return.param: ref %struct_type.a.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %struct_type.a.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Main() -> %.2 { +// CHECK:STDOUT: fn @Main() -> %struct_type.a.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_17.1: %.4 = struct_literal (%.loc12_16) -// CHECK:STDOUT: %.loc12_17.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.3: = bound_method %.loc12_16, %.loc12_17.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_17.4: = specific_function %.loc12_17.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.4(%.loc12_16) [template = constants.%.31] -// CHECK:STDOUT: %.loc12_17.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc12_17.6: %i32 = converted %.loc12_16, %.loc12_17.5 [template = constants.%.31] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc12_17.6) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_18: %.2 = converted %.loc12_17.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc12_17.1: %struct_type.a.2 = struct_literal (%int_3) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_17.2: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_17.3: %i32 = converted %int_3, %.loc12_17.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%.loc12_17.3) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_18: %struct_type.a.1 = converted %.loc12_17.1, %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 85aa834b41ac4..7cbd3bcc5e54c 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -16,28 +16,28 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: --- tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 15 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 35 [template] +// CHECK:STDOUT: %int_15.1: Core.IntLiteral = int_value 15 [template] +// CHECK:STDOUT: %int_35.1: Core.IntLiteral = int_value 35 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 15 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 35 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_15.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_15.2: %i32 = int_value 15 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_35.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_35.2: %i32 = int_value 35 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_15.2, %int_35.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,10 +59,10 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%.loc12_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%.loc12_20) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%int_32.loc12_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] // CHECK:STDOUT: %.loc12_23.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_15, %int.make_type_signed.loc12_20) // CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32] // CHECK:STDOUT: %.loc12_23.3: type = converted %int.make_type_signed.loc12_15, %.loc12_23.2 [template = constants.%i32] @@ -76,25 +76,25 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11: Core.IntLiteral = int_value 15 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_15: Core.IntLiteral = int_value 35 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_17.1: %tuple.type.3 = tuple_literal (%.loc13_11, %.loc13_15) -// CHECK:STDOUT: %.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_17.3: = bound_method %.loc13_11, %.loc13_17.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_17.4: = specific_function %.loc13_17.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %.loc13_17.4(%.loc13_11) [template = constants.%.31] -// CHECK:STDOUT: %.loc13_17.5: init %i32 = converted %.loc13_11, %int.convert_checked.loc13_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_17.6: ref %i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_17.7: init %i32 = initialize_from %.loc13_17.5 to %.loc13_17.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_17.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_17.9: = bound_method %.loc13_15, %.loc13_17.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_17.10: = specific_function %.loc13_17.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %.loc13_17.10(%.loc13_15) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_17.11: init %i32 = converted %.loc13_15, %int.convert_checked.loc13_17.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_17.12: ref %i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_17.13: init %i32 = initialize_from %.loc13_17.11 to %.loc13_17.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_17.14: init %tuple.type.2 = tuple_init (%.loc13_17.7, %.loc13_17.13) to %return [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_18: init %tuple.type.2 = converted %.loc13_17.1, %.loc13_17.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [template = constants.%int_15.1] +// CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [template = constants.%int_35.1] +// CHECK:STDOUT: %.loc13_17.1: %tuple.type.3 = tuple_literal (%int_15, %int_35) +// CHECK:STDOUT: %impl.elem0.loc13_17.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_17.1: = bound_method %int_15, %impl.elem0.loc13_17.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc13_17.1: = specific_function %Convert.bound.loc13_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %Convert.specific_fn.loc13_17.1(%int_15) [template = constants.%int_15.2] +// CHECK:STDOUT: %.loc13_17.2: init %i32 = converted %int_15, %int.convert_checked.loc13_17.1 [template = constants.%int_15.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 +// CHECK:STDOUT: %.loc13_17.3: init %i32 = initialize_from %.loc13_17.2 to %tuple.elem0 [template = constants.%int_15.2] +// CHECK:STDOUT: %impl.elem0.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc13_17.2: = bound_method %int_35, %impl.elem0.loc13_17.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_17.2: = specific_function %Convert.bound.loc13_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %Convert.specific_fn.loc13_17.2(%int_35) [template = constants.%int_35.2] +// CHECK:STDOUT: %.loc13_17.4: init %i32 = converted %int_35, %int.convert_checked.loc13_17.2 [template = constants.%int_35.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return, element1 +// CHECK:STDOUT: %.loc13_17.5: init %i32 = initialize_from %.loc13_17.4 to %tuple.elem1 [template = constants.%int_35.2] +// CHECK:STDOUT: %.loc13_17.6: init %tuple.type.2 = tuple_init (%.loc13_17.3, %.loc13_17.5) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc13_18: init %tuple.type.2 = converted %.loc13_17.1, %.loc13_17.6 [template = constants.%tuple] // CHECK:STDOUT: return %.loc13_18 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 3b3d91587c264..6c710b0cb44fa 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -15,20 +15,20 @@ fn Main() -> i32 { // CHECK:STDOUT: --- value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,10 +50,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed, %.loc11_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -61,13 +61,13 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] -// CHECK:STDOUT: return %.loc12_11.5 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12_11.2: %i32 = converted %int_0, %.loc12_11.1 [template = constants.%int_0.2] +// CHECK:STDOUT: return %.loc12_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index d9299f94368d5..7891a8e5dcba5 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -16,12 +16,12 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: --- fail_assign_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -38,18 +38,18 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed, %.loc14_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %x.var: ref %struct_type.a = var x +// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14: %.3 = struct_literal () +// CHECK:STDOUT: %.loc14: %empty_struct_type = 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 84f04e61f5a6b..719a4c227964e 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -16,9 +16,9 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: --- fail_assign_to_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -34,16 +34,16 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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 %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.var: ref %empty_struct_type = var x +// CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_19: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_20: %.3 = struct_literal (%.loc14_19) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc14: %struct_type.a = struct_literal (%int_1) // 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 16ef2cb63469a..a7f9e922151d8 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -55,19 +55,19 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: --- fail_duplicate_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.6: type = struct_type {.b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %i32} [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,77 +92,77 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%.loc18_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_16.2: type = value_of_initializer %int.make_type_signed.loc18_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_16.3: type = converted %int.make_type_signed.loc18_16, %.loc18_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%.loc18_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.2: type = value_of_initializer %int.make_type_signed.loc18_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.3: type = converted %int.make_type_signed.loc18_27, %.loc18_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_36: init type = call constants.%Int(%.loc18_36.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.2: type = value_of_initializer %int.make_type_signed.loc18_36 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.3: type = converted %int.make_type_signed.loc18_36, %.loc18_36.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_47.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_47: init type = call constants.%Int(%.loc18_47.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_47.2: type = value_of_initializer %int.make_type_signed.loc18_47 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_47.3: type = converted %int.make_type_signed.loc18_47, %.loc18_47.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_56.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_56: init type = call constants.%Int(%.loc18_56.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_56.2: type = value_of_initializer %int.make_type_signed.loc18_56 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_56.3: type = converted %int.make_type_signed.loc18_56, %.loc18_56.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%int_32.loc18_16) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_16.1: type = value_of_initializer %int.make_type_signed.loc18_16 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_16.2: type = converted %int.make_type_signed.loc18_16, %.loc18_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%int_32.loc18_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_signed.loc18_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_signed.loc18_27, %.loc18_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_36: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_36: init type = call constants.%Int(%int_32.loc18_36) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_36.1: type = value_of_initializer %int.make_type_signed.loc18_36 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_36.2: type = converted %int.make_type_signed.loc18_36, %.loc18_36.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_47: init type = call constants.%Int(%int_32.loc18_47) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_47.1: type = value_of_initializer %int.make_type_signed.loc18_47 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_47.2: type = converted %int.make_type_signed.loc18_47, %.loc18_47.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_56: init type = call constants.%Int(%int_32.loc18_56) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_56.1: type = value_of_initializer %int.make_type_signed.loc18_56 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_56.2: type = converted %int.make_type_signed.loc18_56, %.loc18_56.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc27_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27_13: init type = call constants.%Int(%.loc27_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_13.2: type = value_of_initializer %int.make_type_signed.loc27_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_13.3: type = converted %int.make_type_signed.loc27_13, %.loc27_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc27_22: init type = call constants.%Int(%.loc27_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_22.2: type = value_of_initializer %int.make_type_signed.loc27_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_22.3: type = converted %int.make_type_signed.loc27_22, %.loc27_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%.loc36_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.2: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.3: type = converted %int.make_type_signed.loc36, %.loc36_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc45: init type = call constants.%Int(%.loc45_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_13.2: type = value_of_initializer %int.make_type_signed.loc45 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_13.3: type = converted %int.make_type_signed.loc45, %.loc45_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_16: type = struct_type {.a: %i32} [template = constants.%.5] -// CHECK:STDOUT: %x.var: ref %.5 = var x -// CHECK:STDOUT: %x: ref %.5 = bind_name x, %x.var -// CHECK:STDOUT: %.loc53_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53_13: init type = call constants.%Int(%.loc53_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.2: type = value_of_initializer %int.make_type_signed.loc53_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.3: type = converted %int.make_type_signed.loc53_13, %.loc53_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc53_22: init type = call constants.%Int(%.loc53_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_22.2: type = value_of_initializer %int.make_type_signed.loc53_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_22.3: type = converted %int.make_type_signed.loc53_22, %.loc53_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_25: type = struct_type {.b: %i32, .c: %i32} [template = constants.%.6] -// CHECK:STDOUT: %y.var: ref %.6 = var y -// CHECK:STDOUT: %y: ref %.6 = bind_name y, %y.var +// CHECK:STDOUT: %int_32.loc27_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27_13: init type = call constants.%Int(%int_32.loc27_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_13.1: type = value_of_initializer %int.make_type_signed.loc27_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_13.2: type = converted %int.make_type_signed.loc27_13, %.loc27_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc27_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc27_22: init type = call constants.%Int(%int_32.loc27_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc27_22.1: type = value_of_initializer %int.make_type_signed.loc27_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_22.2: type = converted %int.make_type_signed.loc27_22, %.loc27_22.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] +// CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] +// CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_signed.loc36, %.loc36_8.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc45: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc45: init type = call constants.%Int(%int_32.loc45) [template = constants.%i32] +// CHECK:STDOUT: %.loc45_13.1: type = value_of_initializer %int.make_type_signed.loc45 [template = constants.%i32] +// CHECK:STDOUT: %.loc45_13.2: type = converted %int.make_type_signed.loc45, %.loc45_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.2] +// CHECK:STDOUT: %x.var: ref %struct_type.a.2 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.2 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc53_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53_13: init type = call constants.%Int(%int_32.loc53_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_signed.loc53_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_signed.loc53_13, %.loc53_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc53_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc53_22: init type = call constants.%Int(%int_32.loc53_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc53_22.1: type = value_of_initializer %int.make_type_signed.loc53_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc53_22.2: type = converted %int.make_type_signed.loc53_22, %.loc53_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %i32} [template = constants.%struct_type.b.c] +// CHECK:STDOUT: %y.var: ref %struct_type.b.c = var y +// CHECK:STDOUT: %y: ref %struct_type.b.c = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> ; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc27_35: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_36: %.3 = struct_literal (%.loc27_35) +// CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc27: %struct_type.a.1 = struct_literal (%int_1.loc27) // CHECK:STDOUT: %v: = bind_name v, -// CHECK:STDOUT: %.loc36_22: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc36_32: Core.IntLiteral = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %int_1.loc36: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2.loc36: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %def.ref: = name_ref def, [template = ] // CHECK:STDOUT: %w: %i32 = bind_name w, -// CHECK:STDOUT: %.loc45_26: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc45_34: Core.IntLiteral = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %int_1.loc45: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2.loc45: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: assign file.%x.var, -// CHECK:STDOUT: %.loc53_35: Core.IntLiteral = int_value 3 [template = constants.%.8] -// CHECK:STDOUT: %.loc53_43: Core.IntLiteral = int_value 4 [template = constants.%.9] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 38d29c1411613..b1514797c7493 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -22,14 +22,14 @@ var y: {.b: i32} = x; // CHECK:STDOUT: --- fail_field_name_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,28 +47,28 @@ var y: {.b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc15_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.3: type = converted %int.make_type_signed.loc15, %.loc15_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc20_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_13.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_13.3: type = converted %int.make_type_signed.loc20, %.loc20_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_16: type = struct_type {.b: %i32} [template = constants.%.5] -// CHECK:STDOUT: %y.var: ref %.5 = var y -// CHECK:STDOUT: %y: ref %.5 = bind_name y, %y.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15, %.loc15_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %x.var: ref %struct_type.a = var x +// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] +// CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_signed.loc20, %.loc20_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template = constants.%struct_type.b.2] +// CHECK:STDOUT: %y.var: ref %struct_type.b.2 = var y +// CHECK:STDOUT: %y: ref %struct_type.b.2 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_26: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: %.4 = struct_literal (%.loc15_26) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc15: %struct_type.b.1 = struct_literal (%int_1) // CHECK:STDOUT: assign file.%x.var, -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a = 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 d5694156515f8..5bf94c50209b4 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -16,13 +16,13 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: --- fail_field_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.b: f64} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %float: f64 = float_literal 1 [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: f64} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -39,19 +39,19 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed, %.loc14_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %x.var: ref %struct_type.a = var x +// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_26: f64 = float_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_29: %.4 = struct_literal (%.loc14_26) +// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float] +// CHECK:STDOUT: %.loc14: %struct_type.b = struct_literal (%float) // 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 dcca98ca60731..3f2dbeadae0b2 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -17,16 +17,16 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_member_access_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: f64} [template] -// CHECK:STDOUT: %.3: f64 = float_literal 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template] +// CHECK:STDOUT: %float: f64 = float_literal 4 [template] +// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%float) [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,29 +45,29 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 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: %.loc11_16: type = struct_type {.a: f64} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template = constants.%struct_type.a] +// CHECK:STDOUT: %x.var: ref %struct_type.a = var x +// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_29.1: %.2 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_29.2: init %.2 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_30: init %.2 = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] +// CHECK:STDOUT: %float: f64 = float_literal 4 [template = constants.%float] +// CHECK:STDOUT: %.loc11_29.1: %struct_type.a = struct_literal (%float) +// CHECK:STDOUT: %.loc11_29.2: init %struct_type.a = struct_init (%float) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_30: init %struct_type.a = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_30 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // 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 da63051ff25fe..a0e8586c850ef 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -17,21 +17,21 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_non_member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,34 +50,34 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: %.4 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: init %.2 = struct_init (%.loc11_27.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%struct] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_4, %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_27.3: init %struct_type.a.1 = struct_init (%.loc11_27.2) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %struct_type.a.1 = converted %.loc11_27.1, %.loc11_27.3 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a.1 = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index a773a5ef55ce2..e938cc36956d6 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -16,13 +16,13 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: --- fail_too_few_values.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -39,23 +39,23 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed.loc14_13, %.loc14_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%.loc14_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.2: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.3: type = converted %int.make_type_signed.loc14_22, %.loc14_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%int_32.loc14_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14_13, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_signed.loc14_22, %.loc14_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] +// CHECK:STDOUT: %x.var: ref %struct_type.a.b = var x +// CHECK:STDOUT: %x: ref %struct_type.a.b = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_36: %.5 = struct_literal (%.loc14_35) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc14: %struct_type.a = struct_literal (%int_1) // 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 ac53416476cc0..20fb8f7d5cdcb 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -19,11 +19,11 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: --- fail_type_assign.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,23 +41,23 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_13.3: type = converted %int.make_type_signed, %.loc17_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_13.2: type = converted %int.make_type_signed, %.loc17_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %x.var: ref %struct_type.a = var x +// CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_25.3: type = converted %int.make_type_signed, %.loc17_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_28: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc17_29: %.2 = converted %.loc17_28, [template = ] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_25.2: type = converted %int.make_type_signed, %.loc17_25.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %.loc17_29: %struct_type.a = converted %struct_type.a, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 00c70a09533d8..0283a5756e64e 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -19,8 +19,8 @@ var x: {.a = 1}; // CHECK:STDOUT: --- fail_value_as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -37,8 +37,8 @@ var x: {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_14: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal (%.loc17_14) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc17_15.1: %struct_type.a = struct_literal (%int_1) // CHECK:STDOUT: %.loc17_15.2: type = converted %.loc17_15.1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 72fac5447eb60..cf4d9e6a3af89 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -54,50 +54,50 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] -// CHECK:STDOUT: %struct.1: %.2 = struct_value (%.31) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %struct.1: %struct_type.a.1 = struct_value (%int_0.2) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.32: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] -// CHECK:STDOUT: %.33: type = struct_type {.a: %.32, .d: %i32} [template] +// CHECK:STDOUT: %struct_type.b.c.1: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.37: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template] -// CHECK:STDOUT: %.38: type = struct_type {.a: %.37, .d: Core.IntLiteral} [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31) [template] -// CHECK:STDOUT: %struct.2: %.32 = struct_value (%.31, %tuple) [template] -// CHECK:STDOUT: %struct.3: %.33 = struct_value (%struct.2, %.31) [template] -// CHECK:STDOUT: %.39: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.39 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.39 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %struct_type.b.c.2: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template] +// CHECK:STDOUT: %struct_type.a.d.3: type = struct_type {.a: %struct_type.b.c.2, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] +// CHECK:STDOUT: %struct.2: %struct_type.b.c.1 = struct_value (%int_0.2, %tuple) [template] +// CHECK:STDOUT: %struct.3: %struct_type.a.d.1 = struct_value (%struct.2, %int_0.2) [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %.40: type = struct_type {} [template] -// CHECK:STDOUT: %.41: = complete_type_witness %.40 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.44: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.46: = bound_method %.42, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.49: = bound_method %.43, %Convert.14 [template] -// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.51: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.4: %.39 = struct_value (%.48, %.51) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.4) [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%S) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct.4: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.4) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -120,138 +120,138 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_signed.loc4, %.loc4_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_20: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %.loc5_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.3: type = converted %int.make_type_signed.loc5_22, %.loc5_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%.loc5_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %a_ref.var: ref %struct_type.a.1 = var a_ref +// CHECK:STDOUT: %a_ref: ref %struct_type.a.1 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%int_32.loc5_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_32) // CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] // CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_signed.loc5_32, %.loc5_36.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.32] -// CHECK:STDOUT: %.loc5_44.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%.loc5_44.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.2: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.3: type = converted %int.make_type_signed.loc5_44, %.loc5_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.32, .d: %i32} [template = constants.%.33] -// CHECK:STDOUT: %b_ref.var: ref %.33 = var b_ref -// CHECK:STDOUT: %b_ref: ref %.33 = bind_name b_ref, %b_ref.var -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %S.patt.loc8_9.1: %.39 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.param_patt: %.39 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c.1] +// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%int_32.loc5_44) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_signed.loc5_44, %.loc5_44.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template = constants.%struct_type.a.d.1] +// CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.1 = var b_ref +// CHECK:STDOUT: %b_ref: ref %struct_type.a.d.1 = bind_name b_ref, %b_ref.var +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { +// CHECK:STDOUT: %S.patt.loc8_9.1: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.param_patt: %struct_type.a.b.1 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_18: init type = call constants.%Int(%.loc8_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.2: type = value_of_initializer %int.make_type_signed.loc8_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.3: type = converted %int.make_type_signed.loc8_18, %.loc8_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%.loc8_27.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.3: type = converted %int.make_type_signed.loc8_27, %.loc8_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.39] -// CHECK:STDOUT: %S.param: %.39 = value_param runtime_param -// CHECK:STDOUT: %S.loc8_9.1: %.39 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_18: init type = call constants.%Int(%int_32.loc8_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_signed.loc8_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_signed.loc8_18, %.loc8_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%int_32.loc8_27) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed.loc8_27, %.loc8_27.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %S.param: %struct_type.a.b.1 = value_param runtime_param +// CHECK:STDOUT: %S.loc8_9.1: %struct_type.a.b.1 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %C.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %C.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_19: Core.IntLiteral = int_value 1 [template = constants.%.42] -// CHECK:STDOUT: %.loc9_27: Core.IntLiteral = int_value 2 [template = constants.%.43] -// CHECK:STDOUT: %.loc9_28.1: %.44 = struct_literal (%.loc9_19, %.loc9_27) -// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_19, %.loc9_28.2 [template = constants.%.46] -// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %.loc9_28.4(%.loc9_19) [template = constants.%.48] -// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%.48] -// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_19, %.loc9_28.5 [template = constants.%.48] -// CHECK:STDOUT: %.loc9_28.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.8: = bound_method %.loc9_27, %.loc9_28.7 [template = constants.%.49] -// CHECK:STDOUT: %.loc9_28.9: = specific_function %.loc9_28.8, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %.loc9_28.9(%.loc9_27) [template = constants.%.51] -// CHECK:STDOUT: %.loc9_28.10: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%.51] -// CHECK:STDOUT: %.loc9_28.11: %i32 = converted %.loc9_27, %.loc9_28.10 [template = constants.%.51] -// CHECK:STDOUT: %struct: %.39 = struct_value (%.loc9_28.6, %.loc9_28.11) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_29: %.39 = converted %.loc9_28.1, %struct [template = constants.%struct.4] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3] -// CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_28.1: = bound_method %int_1, %impl.elem0.loc9_28.1 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_28.1: = specific_function %Convert.bound.loc9_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %Convert.specific_fn.loc9_28.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_28.2: = bound_method %int_2, %impl.elem0.loc9_28.2 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc9_28.2: = specific_function %Convert.bound.loc9_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %Convert.specific_fn.loc9_28.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_28.4: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_28.5: %i32 = converted %int_2, %.loc9_28.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_28.3, %.loc9_28.5) [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_29: %struct_type.a.b.1 = converted %.loc9_28.1, %struct [template = constants.%struct.4] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.2] +// CHECK:STDOUT: %return.param: ref %C.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %C.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.39) { -// CHECK:STDOUT: %S.loc8_9.2: %.39 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] -// CHECK:STDOUT: %S.patt.loc8_9.2: %.39 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %struct_type.a.b.1) { +// CHECK:STDOUT: %S.loc8_9.2: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %S.patt.loc8_9.2: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8_34: = complete_type_witness %.40 [template = constants.%.41] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc8_34 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_31.1: %.4 = struct_literal (%.loc4_30) -// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_30, %.loc4_31.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_31.4(%.loc4_30) [template = constants.%.31] -// CHECK:STDOUT: %.loc4_31.5: init %i32 = converted %.loc4_30, %int.convert_checked.loc4 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_31.6: init %.2 = struct_init (%.loc4_31.5) to file.%a_ref.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc4_32: init %.2 = converted %.loc4_31.1, %.loc4_31.6 [template = constants.%struct.1] +// CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc4_31.1: %struct_type.a.2 = struct_literal (%int_0.loc4) +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_31.2: init %i32 = converted %int_0.loc4, %int.convert_checked.loc4 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_31.3: init %struct_type.a.1 = struct_init (%.loc4_31.2) to file.%a_ref.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc4_32: init %struct_type.a.1 = converted %.loc4_31.1, %.loc4_31.3 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32 -// CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_26: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_28.1: %tuple.type.3 = tuple_literal (%.loc6_26) -// CHECK:STDOUT: %.loc6_29.1: %.37 = struct_literal (%.loc6_17, %.loc6_28.1) -// CHECK:STDOUT: %.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.1: %.38 = struct_literal (%.loc6_29.1, %.loc6_37) -// CHECK:STDOUT: %.loc6_29.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_29.3: = bound_method %.loc6_17, %.loc6_29.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_29.4: = specific_function %.loc6_29.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %.loc6_29.4(%.loc6_17) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_29.5: init %i32 = converted %.loc6_17, %int.convert_checked.loc6_29 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_38.2: ref %.32 = struct_access file.%b_ref.var, element0 -// CHECK:STDOUT: %.loc6_29.6: ref %i32 = struct_access %.loc6_38.2, element0 -// CHECK:STDOUT: %.loc6_29.7: init %i32 = initialize_from %.loc6_29.5 to %.loc6_29.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_26, %.loc6_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_26) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.5: init %i32 = converted %.loc6_26, %int.convert_checked.loc6_28 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_29.8: ref %tuple.type.2 = struct_access %.loc6_38.2, element1 -// CHECK:STDOUT: %.loc6_28.6: init %tuple.type.2 = tuple_init (%.loc6_28.5) to %.loc6_29.8 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.9: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.6 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.10: init %tuple.type.2 = initialize_from %.loc6_29.9 to %.loc6_29.8 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.11: init %.32 = struct_init (%.loc6_29.7, %.loc6_29.10) to %.loc6_38.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.3: init %.32 = converted %.loc6_29.1, %.loc6_29.11 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.4: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_38.5: = bound_method %.loc6_37, %.loc6_38.4 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_38.6: = specific_function %.loc6_38.5, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %.loc6_38.6(%.loc6_37) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_38.7: init %i32 = converted %.loc6_37, %int.convert_checked.loc6_38 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_38.8: ref %i32 = struct_access file.%b_ref.var, element1 -// CHECK:STDOUT: %.loc6_38.9: init %i32 = initialize_from %.loc6_38.7 to %.loc6_38.8 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_38.10: init %.33 = struct_init (%.loc6_38.3, %.loc6_38.9) to file.%b_ref.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc6_39: init %.33 = converted %.loc6_38.1, %.loc6_38.10 [template = constants.%struct.3] +// CHECK:STDOUT: %int_0.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %int_0.loc6_26: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc6_28.1: %tuple.type.3 = tuple_literal (%int_0.loc6_26) +// CHECK:STDOUT: %.loc6_29.1: %struct_type.b.c.2 = struct_literal (%int_0.loc6_17, %.loc6_28.1) +// CHECK:STDOUT: %int_0.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.3 = struct_literal (%.loc6_29.1, %int_0.loc6_37) +// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_29: = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_29: = specific_function %Convert.bound.loc6_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %Convert.specific_fn.loc6_29(%int_0.loc6_17) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_29.2: init %i32 = converted %int_0.loc6_17, %int.convert_checked.loc6_29 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_38.2: ref %struct_type.b.c.1 = struct_access file.%b_ref.var, element0 +// CHECK:STDOUT: %.loc6_29.3: ref %i32 = struct_access %.loc6_38.2, element0 +// CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_28: = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_28: = specific_function %Convert.bound.loc6_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6_28(%int_0.loc6_26) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_28.2: init %i32 = converted %int_0.loc6_26, %int.convert_checked.loc6_28 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_29.5: ref %tuple.type.2 = struct_access %.loc6_38.2, element1 +// CHECK:STDOUT: %.loc6_28.3: init %tuple.type.2 = tuple_init (%.loc6_28.2) to %.loc6_29.5 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.6: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.3 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.7: init %tuple.type.2 = initialize_from %.loc6_29.6 to %.loc6_29.5 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.8: init %struct_type.b.c.1 = struct_init (%.loc6_29.4, %.loc6_29.7) to %.loc6_38.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.1 = converted %.loc6_29.1, %.loc6_29.8 [template = constants.%struct.2] +// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_38: = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_38: = specific_function %Convert.bound.loc6_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Convert.specific_fn.loc6_38(%int_0.loc6_37) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_38.4: init %i32 = converted %int_0.loc6_37, %int.convert_checked.loc6_38 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_38.5: ref %i32 = struct_access file.%b_ref.var, element1 +// CHECK:STDOUT: %.loc6_38.6: init %i32 = initialize_from %.loc6_38.4 to %.loc6_38.5 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc6_38.7: init %struct_type.a.d.1 = struct_init (%.loc6_38.3, %.loc6_38.6) to file.%b_ref.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_39: init %struct_type.a.d.1 = converted %.loc6_38.1, %.loc6_38.7 [template = constants.%struct.3] // CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -280,101 +280,101 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] -// CHECK:STDOUT: %.22: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.23: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] -// CHECK:STDOUT: %.24: type = struct_type {.a: %.23, .d: %i32} [template] +// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.28: type = struct_type {} [template] -// CHECK:STDOUT: %.29: = complete_type_witness %.28 [template] -// CHECK:STDOUT: %.30: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.30 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.30 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.33: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.35: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.36: %.35 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.37: %.2 = assoc_entity element0, imports.%import_ref.43 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.21) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.43 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.38: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.39: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.21) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.42: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.21) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.30 = struct_value (%.41, %.44) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: ref %.22 = import_ref Implicit//default, inst+22, loaded -// CHECK:STDOUT: %import_ref.2: ref %.24 = import_ref Implicit//default, inst+357, loaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.1: ref %struct_type.a = import_ref Implicit//default, inst+22, loaded +// CHECK:STDOUT: %import_ref.2: ref %struct_type.a.d.1 = import_ref Implicit//default, inst+357, loaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+460, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.39 @@ -383,11 +383,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+38, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%.2 (constants.%.37)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+40, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+81, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+82, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+83, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+83, loaded [symbolic = @impl.1.%interface (constants.%interface.1)] // CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+54, unloaded // CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+107, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+108, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] @@ -414,7 +414,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+298, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+299, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+300, unloaded -// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, inst+423, loaded [template = constants.%.29] +// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, inst+423, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.41 = import_ref Implicit//default, inst+421, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -432,52 +432,52 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: %i32} [template = constants.%.22] -// CHECK:STDOUT: %a.var: ref %.22 = var a -// CHECK:STDOUT: %a: ref %.22 = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_18.1: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%.loc5_18.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.3: type = converted %int.make_type_signed.loc5_18, %.loc5_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_28: init type = call constants.%Int(%.loc5_28) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed.loc4, %.loc4_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] +// CHECK:STDOUT: %a.var: ref %struct_type.a = var a +// CHECK:STDOUT: %a: ref %struct_type.a = bind_name a, %a.var +// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%int_32.loc5_18) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed.loc5_18, %.loc5_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_28: init type = call constants.%Int(%int_32.loc5_28) [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_28) // CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed.loc5_28 [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed.loc5_28, %.loc5_32.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.23] -// CHECK:STDOUT: %.loc5_40.1: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%.loc5_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.2: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.3: type = converted %int.make_type_signed.loc5_40, %.loc5_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.23, .d: %i32} [template = constants.%.24] -// CHECK:STDOUT: %b.var: ref %.24 = var b -// CHECK:STDOUT: %b: ref %.24 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_16: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 2 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_25.1: %.33 = struct_literal (%.loc6_16, %.loc6_24) -// CHECK:STDOUT: %.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.3: = bound_method %.loc6_16, %.loc6_25.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc6_25.4: = specific_function %.loc6_25.3, @Convert.2(constants.%.21) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %.loc6_25.4(%.loc6_16) [template = constants.%.41] -// CHECK:STDOUT: %.loc6_25.5: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%.41] -// CHECK:STDOUT: %.loc6_25.6: %i32 = converted %.loc6_16, %.loc6_25.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc6_25.7: %Convert.type.13 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.8: = bound_method %.loc6_24, %.loc6_25.7 [template = constants.%.42] -// CHECK:STDOUT: %.loc6_25.9: = specific_function %.loc6_25.8, @Convert.2(constants.%.21) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %.loc6_25.9(%.loc6_24) [template = constants.%.44] -// CHECK:STDOUT: %.loc6_25.10: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%.44] -// CHECK:STDOUT: %.loc6_25.11: %i32 = converted %.loc6_24, %.loc6_25.10 [template = constants.%.44] -// CHECK:STDOUT: %struct: %.30 = struct_value (%.loc6_25.6, %.loc6_25.11) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_26: %.30 = converted %.loc6_25.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3] -// CHECK:STDOUT: %c.var: ref %C.3 = var c -// CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var +// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c] +// CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%int_32.loc5_40) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_signed.loc5_40, %.loc5_40.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template = constants.%struct_type.a.d.1] +// CHECK:STDOUT: %b.var: ref %struct_type.a.d.1 = var b +// CHECK:STDOUT: %b: ref %struct_type.a.d.1 = bind_name b, %b.var +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_25.1: = bound_method %int_1, %impl.elem0.loc6_25.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_25.1: = specific_function %Convert.bound.loc6_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %Convert.specific_fn.loc6_25.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_25.2: = bound_method %int_2, %impl.elem0.loc6_25.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_25.2: = specific_function %Convert.bound.loc6_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %Convert.specific_fn.loc6_25.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %int_2, %.loc6_25.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc6_25.3, %.loc6_25.5) [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26: %struct_type.a.b.1 = converted %.loc6_25.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.2] +// CHECK:STDOUT: %c.var: ref %C.2 = var c +// CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -489,8 +489,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -509,8 +509,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -529,7 +529,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -546,7 +546,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -562,7 +562,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -578,7 +578,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -595,7 +595,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -612,7 +612,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -628,7 +628,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -644,7 +644,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -652,9 +652,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.30) { -// CHECK:STDOUT: %S: %.30 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.30 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b.1) { +// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -669,9 +669,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -714,9 +714,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -755,42 +755,42 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.22 = name_ref a_ref, imports.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %struct_type.a = name_ref a_ref, imports.%import_ref.1 // CHECK:STDOUT: %.loc4_20.1: ref %i32 = struct_access %a_ref.ref, element0 // CHECK:STDOUT: %.loc4_20.2: %i32 = bind_value %.loc4_20.1 -// CHECK:STDOUT: %.loc4_20.3: init %.22 = struct_init (%.loc4_20.2) to file.%a.var -// CHECK:STDOUT: %.loc4_25: init %.22 = converted %a_ref.ref, %.loc4_20.3 +// CHECK:STDOUT: %.loc4_20.3: init %struct_type.a = struct_init (%.loc4_20.2) to file.%a.var +// CHECK:STDOUT: %.loc4_25: init %struct_type.a = converted %a_ref.ref, %.loc4_20.3 // CHECK:STDOUT: assign file.%a.var, %.loc4_25 -// CHECK:STDOUT: %b_ref.ref: ref %.24 = name_ref b_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc5_47.1: ref %.23 = struct_access %b_ref.ref, element0 +// CHECK:STDOUT: %b_ref.ref: ref %struct_type.a.d.1 = name_ref b_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc5_47.1: ref %struct_type.b.c = 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 %.23 = struct_access file.%b.var, element0 +// CHECK:STDOUT: %.loc5_47.4: ref %struct_type.b.c = 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 %tuple.type.2 = struct_access %.loc5_47.1, element1 -// CHECK:STDOUT: %.loc5_47.8: ref %i32 = tuple_access %.loc5_47.7, element0 -// CHECK:STDOUT: %.loc5_47.9: %i32 = bind_value %.loc5_47.8 -// CHECK:STDOUT: %.loc5_47.10: ref %tuple.type.2 = struct_access %.loc5_47.4, element1 -// CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = tuple_init (%.loc5_47.9) to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.11 -// CHECK:STDOUT: %.loc5_47.13: init %tuple.type.2 = initialize_from %.loc5_47.12 to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.14: init %.23 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 -// CHECK:STDOUT: %.loc5_47.15: init %.23 = 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 %.24 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var -// CHECK:STDOUT: %.loc5_52: init %.24 = converted %b_ref.ref, %.loc5_47.20 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc5_47.7, element0 +// CHECK:STDOUT: %.loc5_47.8: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %.loc5_47.9: ref %tuple.type.2 = struct_access %.loc5_47.4, element1 +// CHECK:STDOUT: %.loc5_47.10: init %tuple.type.2 = tuple_init (%.loc5_47.8) to %.loc5_47.9 +// CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.10 +// CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = initialize_from %.loc5_47.11 to %.loc5_47.9 +// CHECK:STDOUT: %.loc5_47.13: init %struct_type.b.c = struct_init (%.loc5_47.6, %.loc5_47.12) to %.loc5_47.4 +// CHECK:STDOUT: %.loc5_47.14: init %struct_type.b.c = converted %.loc5_47.1, %.loc5_47.13 +// CHECK:STDOUT: %.loc5_47.15: ref %i32 = struct_access %b_ref.ref, element1 +// CHECK:STDOUT: %.loc5_47.16: %i32 = bind_value %.loc5_47.15 +// CHECK:STDOUT: %.loc5_47.17: ref %i32 = struct_access file.%b.var, element1 +// CHECK:STDOUT: %.loc5_47.18: init %i32 = initialize_from %.loc5_47.16 to %.loc5_47.17 +// CHECK:STDOUT: %.loc5_47.19: init %struct_type.a.d.1 = struct_init (%.loc5_47.14, %.loc5_47.18) to file.%b.var +// CHECK:STDOUT: %.loc5_52: init %struct_type.a.d.1 = converted %b_ref.ref, %.loc5_47.19 // CHECK:STDOUT: assign file.%b.var, %.loc5_52 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {} -// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc6 +// CHECK:STDOUT: %.loc6: ref %C.2 = splice_block file.%c.var {} +// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc6 // CHECK:STDOUT: assign file.%c.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -838,7 +838,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -884,8 +884,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -965,7 +965,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1011,8 +1011,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1063,24 +1063,24 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.35 -// CHECK:STDOUT: %.2 => constants.%.36 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 -// CHECK:STDOUT: %N.patt => constants.%.21 +// CHECK:STDOUT: specific @impl.1(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.38 +// CHECK:STDOUT: %interface => constants.%interface.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 +// CHECK:STDOUT: specific @Convert.2(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1107,81 +1107,81 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.21: type = struct_type {} [template] -// CHECK:STDOUT: %.22: = complete_type_witness %.21 [template] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] -// CHECK:STDOUT: %.24: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %.24 = struct_value (%.30, %.29) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+357, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+460, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude @@ -1219,7 +1219,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+298, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+299, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+300, unloaded -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+423, loaded [template = constants.%.22] +// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+423, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+421, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1235,10 +1235,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_29: %.27 = struct_literal (%.loc11_20, %.loc11_28) +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11: %struct_type.c.d = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -1252,8 +1252,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1272,8 +1272,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1292,7 +1292,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -1309,7 +1309,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -1325,7 +1325,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -1341,7 +1341,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -1358,7 +1358,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -1375,7 +1375,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -1391,7 +1391,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -1407,7 +1407,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -1415,9 +1415,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.24) { -// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b) { +// CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1432,9 +1432,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -1477,9 +1477,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1518,13 +1518,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc11: ref %C.3 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc11 +// CHECK:STDOUT: %.loc11: ref %C.2 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc11 // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1572,7 +1572,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -1618,8 +1618,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1699,7 +1699,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1745,8 +1745,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1809,103 +1809,103 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.21: type = struct_type {} [template] -// CHECK:STDOUT: %.22: = complete_type_witness %.21 [template] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] -// CHECK:STDOUT: %.24: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.27: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.29: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.31: %.2 = assoc_entity element0, imports.%import_ref.42 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.23) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.42 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.25, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.23) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.36: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.23) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.1: %.24 = struct_value (%.35, %.38) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct.1: %struct_type.a.b.1 = struct_value (%int_3.2, %int_4.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.1) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.40: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %.24 = struct_value (%.41, %.40) [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%struct.2) [template] -// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.3)> [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.3) [template] +// CHECK:STDOUT: %int_2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.2: %struct_type.a.b.1 = struct_value (%int_1, %int_2) [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.2) [template] +// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.2)> [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.2) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.42: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] -// CHECK:STDOUT: %.43: %.42 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %Convert.assoc_type.6: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] +// CHECK:STDOUT: %assoc0.7: %Convert.assoc_type.6 = assoc_entity element0, imports.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+357, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+416, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+460, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.41 @@ -1913,11 +1913,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+38, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%.2 (constants.%.31)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+40, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+81, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+82, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+83, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+83, loaded [symbolic = @impl.1.%interface (constants.%interface.1)] // CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+54, unloaded // CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+107, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+108, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] @@ -1944,7 +1944,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+298, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+299, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+300, unloaded -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+423, loaded [template = constants.%.22] +// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+423, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+421, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1960,27 +1960,27 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_20: Core.IntLiteral = int_value 3 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_28: Core.IntLiteral = int_value 4 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_29.1: %.27 = struct_literal (%.loc9_20, %.loc9_28) -// CHECK:STDOUT: %.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.3: = bound_method %.loc9_20, %.loc9_29.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_29.4: = specific_function %.loc9_29.3, @Convert.2(constants.%.23) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %.loc9_29.4(%.loc9_20) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_29.5: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_29.6: %i32 = converted %.loc9_20, %.loc9_29.5 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_29.7: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.8: = bound_method %.loc9_28, %.loc9_29.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_29.9: = specific_function %.loc9_29.8, @Convert.2(constants.%.23) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %.loc9_29.9(%.loc9_28) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_29.10: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_29.11: %i32 = converted %.loc9_28, %.loc9_29.10 [template = constants.%.38] -// CHECK:STDOUT: %struct: %.24 = struct_value (%.loc9_29.6, %.loc9_29.11) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_30: %.24 = converted %.loc9_29.1, %struct [template = constants.%struct.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3] -// CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad -// CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc9_29.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4) +// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_29.1: = bound_method %int_3, %impl.elem0.loc9_29.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc9_29.1: = specific_function %Convert.bound.loc9_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %Convert.specific_fn.loc9_29.1(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc9_29.2: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc9_29.3: %i32 = converted %int_3, %.loc9_29.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_29.2: = bound_method %int_4, %impl.elem0.loc9_29.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_29.2: = specific_function %Convert.bound.loc9_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %Convert.specific_fn.loc9_29.2(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %int_4, %.loc9_29.4 [template = constants.%int_4.2] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_29.3, %.loc9_29.5) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_30: %struct_type.a.b.1 = converted %.loc9_29.1, %struct [template = constants.%struct.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.2] +// CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad +// CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -1992,8 +1992,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2012,8 +2012,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2032,7 +2032,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -2049,7 +2049,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -2065,7 +2065,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -2081,7 +2081,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -2098,7 +2098,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -2115,7 +2115,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -2131,7 +2131,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -2147,7 +2147,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -2155,9 +2155,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.24) { -// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b.1) { +// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2172,9 +2172,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2217,9 +2217,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2258,14 +2258,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.4; +// CHECK:STDOUT: fn @F() -> %C.3; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc9_36: ref %C.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_36 -// CHECK:STDOUT: %.loc9_37: %C.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc9_36: ref %C.3 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc9_36 +// CHECK:STDOUT: %.loc9_37: %C.2 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2313,7 +2313,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2359,8 +2359,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2440,7 +2440,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2486,8 +2486,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -2538,24 +2538,24 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.29 -// CHECK:STDOUT: %.2 => constants.%.30 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.23) { -// CHECK:STDOUT: %N => constants.%.23 -// CHECK:STDOUT: %N.patt => constants.%.23 +// CHECK:STDOUT: specific @impl.1(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.32 +// CHECK:STDOUT: %interface => constants.%interface.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.23) { -// CHECK:STDOUT: %N => constants.%.23 +// CHECK:STDOUT: specific @Convert.2(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2575,16 +2575,16 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%C.3) { -// CHECK:STDOUT: %Dest => constants.%C.3 -// CHECK:STDOUT: %Dest.patt => constants.%C.3 +// CHECK:STDOUT: specific @ImplicitAs(constants.%C.2) { +// CHECK:STDOUT: %Dest => constants.%C.2 +// CHECK:STDOUT: %Dest.patt => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.15 // CHECK:STDOUT: %Convert => constants.%Convert.15 -// CHECK:STDOUT: %.1 => constants.%.42 -// CHECK:STDOUT: %.2 => constants.%.43 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.6 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 84c31275910da..8cc5390738fad 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -17,18 +17,18 @@ fn F() -> i32 { // CHECK:STDOUT: --- literal_member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.x.y.z: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: %.2, .c: Core.IntLiteral} [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %struct_type.a.b.c.1: type = struct_type {.a: Core.IntLiteral, .b: %struct_type.x.y.z, .c: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,60 +47,60 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %struct_type.x.y.z = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.x.y.z = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%.loc11_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed.loc11_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed.loc11_16, %.loc11_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%.loc11_25.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_25, %.loc11_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%.loc11_34.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.2: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.3: type = converted %int.make_type_signed.loc11_34, %.loc11_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_37: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %int_32.loc11_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%int_32.loc11_16) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_signed.loc11_16 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_signed.loc11_16, %.loc11_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%int_32.loc11_25) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_25, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%int_32.loc11_34) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_signed.loc11_34, %.loc11_34.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.x.y.z: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template = constants.%struct_type.x.y.z] +// CHECK:STDOUT: %return.param: ref %struct_type.x.y.z = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %struct_type.x.y.z = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> %.2; +// CHECK:STDOUT: fn @G() -> %struct_type.x.y.z; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc14_26.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %G.call: init %.2 = call %G.ref() to %.loc14_26.1 -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_35.1: %.6 = struct_literal (%.loc14_16, %G.call, %.loc14_34) -// CHECK:STDOUT: %.loc14_26.2: ref %.2 = temporary %.loc14_26.1, %G.call +// CHECK:STDOUT: %.loc14_26.1: ref %struct_type.x.y.z = temporary_storage +// CHECK:STDOUT: %G.call: init %struct_type.x.y.z = call %G.ref() to %.loc14_26.1 +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc14_35.1: %struct_type.a.b.c.1 = struct_literal (%int_1, %G.call, %int_3) +// CHECK:STDOUT: %.loc14_26.2: ref %struct_type.x.y.z = temporary %.loc14_26.1, %G.call // CHECK:STDOUT: %.loc14_26.3: ref %i32 = struct_access %.loc14_26.2, element0 // CHECK:STDOUT: %.loc14_26.4: %i32 = bind_value %.loc14_26.3 // CHECK:STDOUT: %.loc14_26.5: ref %i32 = struct_access %.loc14_26.2, element1 // CHECK:STDOUT: %.loc14_26.6: %i32 = bind_value %.loc14_26.5 // CHECK:STDOUT: %.loc14_26.7: ref %i32 = struct_access %.loc14_26.2, element2 // CHECK:STDOUT: %.loc14_26.8: %i32 = bind_value %.loc14_26.7 -// CHECK:STDOUT: %struct.loc14_26: %.2 = struct_value (%.loc14_26.4, %.loc14_26.6, %.loc14_26.8) -// CHECK:STDOUT: %.loc14_35.2: %.2 = converted %G.call, %struct.loc14_26 -// CHECK:STDOUT: %struct.loc14_35: %.6 = struct_value (%.loc14_16, %.loc14_35.2, %.loc14_34) -// CHECK:STDOUT: %.loc14_35.3: %.6 = converted %.loc14_35.1, %struct.loc14_35 -// CHECK:STDOUT: %.loc14_36: %.2 = struct_access %.loc14_35.3, element1 +// CHECK:STDOUT: %struct.loc14_26: %struct_type.x.y.z = struct_value (%.loc14_26.4, %.loc14_26.6, %.loc14_26.8) +// CHECK:STDOUT: %.loc14_35.2: %struct_type.x.y.z = converted %G.call, %struct.loc14_26 +// CHECK:STDOUT: %struct.loc14_35: %struct_type.a.b.c.1 = struct_value (%int_1, %.loc14_35.2, %int_3) +// CHECK:STDOUT: %.loc14_35.3: %struct_type.a.b.c.1 = converted %.loc14_35.1, %struct.loc14_35 +// CHECK:STDOUT: %.loc14_36: %struct_type.x.y.z = 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 99ab023533a55..95d5fbd27a632 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -15,25 +15,25 @@ var z: i32 = y; // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: f64, .b: %i32} [template] -// CHECK:STDOUT: %.5: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: f64, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: f64, .b: %i32} [template] +// CHECK:STDOUT: %float: f64 = float_literal 0 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: f64, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.5, %.34) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%float, %int_1.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,49 +54,49 @@ var z: i32 = y; // CHECK:STDOUT: .z = %z // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 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: %.loc11_22.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11, %.loc11_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: f64, .b: %i32} [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11, %.loc11_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: f64, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var -// CHECK:STDOUT: %.loc13_8.1: Core.IntLiteral = int_value 32 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.3: type = converted %int.make_type_signed.loc13, %.loc13_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] // CHECK:STDOUT: %z.var: ref %i32 = var z // CHECK:STDOUT: %z: ref %i32 = bind_name z, %z.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_35: f64 = float_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_45: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_46.1: %.7 = struct_literal (%.loc11_35, %.loc11_45) +// CHECK:STDOUT: %float: f64 = float_literal 0 [template = constants.%float] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc11_46.1: %struct_type.a.b.2 = struct_literal (%float, %int_1) // 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: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_46.5: = bound_method %.loc11_45, %.loc11_46.4 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_46.6: = specific_function %.loc11_46.5, @Convert.2(constants.%.2) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_46.6(%.loc11_45) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_46.7: init %i32 = converted %.loc11_45, %int.convert_checked [template = constants.%.34] -// CHECK:STDOUT: %.loc11_46.8: ref %i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_46.9: init %i32 = initialize_from %.loc11_46.7 to %.loc11_46.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_46.10: init %.3 = struct_init (%.loc11_46.3, %.loc11_46.9) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_47: init %.3 = converted %.loc11_46.1, %.loc11_46.10 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %float to %.loc11_46.2 [template = constants.%float] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_46.4: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_46.5: ref %i32 = struct_access file.%x.var, element1 +// CHECK:STDOUT: %.loc11_46.6: init %i32 = initialize_from %.loc11_46.4 to %.loc11_46.5 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_46.7: init %struct_type.a.b.1 = struct_init (%.loc11_46.3, %.loc11_46.6) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_47: init %struct_type.a.b.1 = converted %.loc11_46.1, %.loc11_46.7 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_47 -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a.b.1 = 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 1c4ce03c8200b..fe65e2d2cad96 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -17,17 +17,17 @@ fn G() { // CHECK:STDOUT: --- nested_struct_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,12 +49,12 @@ fn G() { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%.loc11_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] @@ -73,12 +73,12 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%.loc14_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_26: init type = call constants.%Int(%.loc14_26) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_26: init type = call constants.%Int(%int_32.loc14_26) [template = constants.%i32] // CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21, %int.make_type_signed.loc14_26) // CHECK:STDOUT: %.loc14_29.2: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32] // CHECK:STDOUT: %.loc14_29.3: type = converted %int.make_type_signed.loc14_16, %.loc14_29.2 [template = constants.%i32] @@ -87,12 +87,12 @@ fn G() { // CHECK:STDOUT: %.loc14_29.6: type = value_of_initializer %int.make_type_signed.loc14_26 [template = constants.%i32] // CHECK:STDOUT: %.loc14_29.7: type = converted %int.make_type_signed.loc14_26, %.loc14_29.6 [template = constants.%i32] // CHECK:STDOUT: %.loc14_29.8: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_37: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_37: init type = call constants.%Int(%.loc14_37) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_42: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_42: init type = call constants.%Int(%.loc14_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_47: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_47: init type = call constants.%Int(%.loc14_47) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_37: init type = call constants.%Int(%int_32.loc14_37) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_42: init type = call constants.%Int(%int_32.loc14_42) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_47: init type = call constants.%Int(%int_32.loc14_47) [template = constants.%i32] // CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_37, %int.make_type_signed.loc14_42, %int.make_type_signed.loc14_47) // CHECK:STDOUT: %.loc14_50.2: type = value_of_initializer %int.make_type_signed.loc14_37 [template = constants.%i32] // CHECK:STDOUT: %.loc14_50.3: type = converted %int.make_type_signed.loc14_37, %.loc14_50.2 [template = constants.%i32] @@ -101,18 +101,18 @@ fn G() { // CHECK:STDOUT: %.loc14_50.6: type = value_of_initializer %int.make_type_signed.loc14_47 [template = constants.%i32] // CHECK:STDOUT: %.loc14_50.7: type = converted %int.make_type_signed.loc14_47, %.loc14_50.6 [template = constants.%i32] // CHECK:STDOUT: %.loc14_50.8: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_51: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%.2] -// CHECK:STDOUT: %v.var: ref %.2 = var v -// CHECK:STDOUT: %v: ref %.2 = bind_name v, %v.var +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %v.var: ref %struct_type.a.b.1 = var v +// CHECK:STDOUT: %v: ref %struct_type.a.b.1 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_61: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.1: ref %tuple.type.2 = struct_access %v.var, element0 // CHECK:STDOUT: %F.call.loc14_63: init %tuple.type.2 = call %F.ref.loc14_61() to %.loc14_74.1 // CHECK:STDOUT: %F.ref.loc14_71: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.2: ref %tuple.type.2 = struct_access %v.var, element1 // CHECK:STDOUT: %F.call.loc14_73: init %tuple.type.2 = call %F.ref.loc14_71() to %.loc14_74.2 -// CHECK:STDOUT: %.loc14_74.3: %.2 = struct_literal (%F.call.loc14_63, %F.call.loc14_73) -// CHECK:STDOUT: %.loc14_74.4: init %.2 = struct_init (%F.call.loc14_63, %F.call.loc14_73) to %v.var -// CHECK:STDOUT: %.loc14_75: init %.2 = converted %.loc14_74.3, %.loc14_74.4 +// CHECK:STDOUT: %.loc14_74.3: %struct_type.a.b.1 = struct_literal (%F.call.loc14_63, %F.call.loc14_73) +// CHECK:STDOUT: %.loc14_74.4: init %struct_type.a.b.1 = struct_init (%F.call.loc14_63, %F.call.loc14_73) to %v.var +// CHECK:STDOUT: %.loc14_75: init %struct_type.a.b.1 = converted %.loc14_74.3, %.loc14_74.4 // CHECK:STDOUT: assign %v.var, %.loc14_75 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/no_prelude/empty.carbon b/toolchain/check/testdata/struct/no_prelude/empty.carbon index 47e4ac25651b4..c136b2bf70371 100644 --- a/toolchain/check/testdata/struct/no_prelude/empty.carbon +++ b/toolchain/check/testdata/struct/no_prelude/empty.carbon @@ -14,8 +14,8 @@ var y: {} = x; // CHECK:STDOUT: --- empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %struct: %.1 = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -23,25 +23,25 @@ var y: {} = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_9.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref %.1 = var y -// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var +// CHECK:STDOUT: %.loc11_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.var: ref %empty_struct_type = var x +// CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %y.var: ref %empty_struct_type = var y +// CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// 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: %.loc11_14.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_14.2: init %empty_struct_type = struct_init () to file.%x.var [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc11_15: init %empty_struct_type = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%empty_struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_15 -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_13: init %.1 = 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: %x.ref: ref %empty_struct_type = name_ref x, file.%x +// CHECK:STDOUT: %.loc12_13: init %empty_struct_type = struct_init () to file.%y.var [template = constants.%empty_struct] +// CHECK:STDOUT: %.loc12_14: init %empty_struct_type = converted %x.ref, %.loc12_13 [template = constants.%empty_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 d35148d4de2c5..ff6e657f8057b 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon @@ -16,26 +16,26 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: --- fail_assign_nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %.1} [template] -// CHECK:STDOUT: %.4: type = struct_type {.b: %.1} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %empty_struct_type} [template] +// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// 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: %.1} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_14.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_14.2: type = converted %.loc14_14.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_26: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14_27: %.4 = struct_literal (%.loc14_26) +// CHECK:STDOUT: %.loc14_26: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_27: %struct_type.b = 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 2b0a5f31ad4ec..b518bdb80249b 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: %struct_type.a: type = struct_type {.a: %Incomplete} [template] +// CHECK:STDOUT: %ptr: 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: %struct_type.a: type = struct_type {.a: %Incomplete} [template = constants.%struct_type.a] // 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 %.2 = var p -// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] +// CHECK:STDOUT: %p.var: ref %ptr = var p +// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; @@ -51,7 +51,7 @@ var p: Incomplete* = &s.a; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: ref = name_ref s, file.%s // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] -// CHECK:STDOUT: %.loc21: = addr_of %a.ref [template = ] +// CHECK:STDOUT: %addr: = addr_of %a.ref [template = ] // CHECK:STDOUT: assign file.%p.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index d7d237ab487ed..e915f92d40e03 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -14,21 +14,21 @@ var y: {.a: i32} = x; // CHECK:STDOUT: --- one_entry.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,39 +47,39 @@ var y: {.a: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_16: type = struct_type {.a: %i32} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.loc12: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: %y.var: ref %struct_type.a.1 = var y +// CHECK:STDOUT: %y: ref %struct_type.a.1 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: %.4 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: init %.2 = struct_init (%.loc11_27.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%struct] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_4, %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_27.3: init %struct_type.a.1 = struct_init (%.loc11_27.2) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %struct_type.a.1 = converted %.loc11_27.1, %.loc11_27.3 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_20.1: ref %i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc12_20.2: %i32 = bind_value %.loc12_20.1 -// CHECK:STDOUT: %.loc12_20.3: init %.2 = struct_init (%.loc12_20.2) to file.%y.var -// CHECK:STDOUT: %.loc12_21: init %.2 = converted %x.ref, %.loc12_20.3 +// CHECK:STDOUT: %.loc12_20.3: init %struct_type.a.1 = struct_init (%.loc12_20.2) to file.%y.var +// CHECK:STDOUT: %.loc12_21: init %struct_type.a.1 = converted %x.ref, %.loc12_20.3 // CHECK:STDOUT: assign file.%y.var, %.loc12_21 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index e9f3fc768bc4a..7e21e8275ec77 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -20,21 +20,21 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: --- reorder_fields.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %MakeI32.type: type = fn_type @MakeI32 [template] // CHECK:STDOUT: %MakeI32: %MakeI32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %MakeF64.type: type = fn_type @MakeF64 [template] // CHECK:STDOUT: %MakeF64: %MakeF64.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %i32, .b: f64} [template] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: f64} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: f64, .a: %i32} [template] +// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: f64, .a: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,10 +58,10 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed, %.loc11_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed, %.loc11_17.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -69,28 +69,28 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_17.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_17.1) [template = f64] -// CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type, %.loc12_17.2 [template = f64] +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc12_17.2: type = converted %float.make_type, %.loc12_17.1 [template = f64] // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param0 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %struct_type.a.b = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %struct_type.a.b = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_16.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16.3: type = converted %int.make_type_signed.loc14, %.loc14_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%.loc14_25.1) [template = f64] -// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %float.make_type.loc14 [template = f64] -// CHECK:STDOUT: %.loc14_25.3: type = converted %float.make_type.loc14, %.loc14_25.2 [template = f64] -// CHECK:STDOUT: %.loc14_28: type = struct_type {.a: %i32, .b: f64} [template = constants.%.3] -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_16.2: type = converted %int.make_type_signed.loc14, %.loc14_16.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64.loc14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%int_64.loc14) [template = f64] +// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type.loc14 [template = f64] +// CHECK:STDOUT: %.loc14_25.2: type = converted %float.make_type.loc14, %.loc14_25.1 [template = f64] +// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b] +// CHECK:STDOUT: %return.param: ref %struct_type.a.b = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %struct_type.a.b = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -98,53 +98,53 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeF64() -> f64; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %return: %.3 { +// CHECK:STDOUT: fn @F() -> %return: %struct_type.a.b { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_15.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_15.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_15.3: type = converted %int.make_type_signed.loc15, %.loc15_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%.loc15_24.1) [template = f64] -// CHECK:STDOUT: %.loc15_24.2: type = value_of_initializer %float.make_type.loc15 [template = f64] -// CHECK:STDOUT: %.loc15_24.3: type = converted %float.make_type.loc15, %.loc15_24.2 [template = f64] -// CHECK:STDOUT: %.loc15_27: type = struct_type {.a: %i32, .b: f64} [template = constants.%.3] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_15.2: type = converted %int.make_type_signed.loc15, %.loc15_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%int_64.loc15) [template = f64] +// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %float.make_type.loc15 [template = f64] +// CHECK:STDOUT: %.loc15_24.2: type = converted %float.make_type.loc15, %.loc15_24.1 [template = f64] +// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %MakeF64.ref: %MakeF64.type = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64] // CHECK:STDOUT: %MakeF64.call: init f64 = call %MakeF64.ref() // CHECK:STDOUT: %MakeI32.ref: %MakeI32.type = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32] // CHECK:STDOUT: %MakeI32.call: init %i32 = call %MakeI32.ref() -// CHECK:STDOUT: %.loc15_62.1: %.5 = struct_literal (%MakeF64.call, %MakeI32.call) +// CHECK:STDOUT: %.loc15_62.1: %struct_type.b.a = struct_literal (%MakeF64.call, %MakeI32.call) // CHECK:STDOUT: %.loc15_62.2: %i32 = value_of_initializer %MakeI32.call // CHECK:STDOUT: %.loc15_62.3: %i32 = converted %MakeI32.call, %.loc15_62.2 // CHECK:STDOUT: %.loc15_62.4: f64 = value_of_initializer %MakeF64.call // CHECK:STDOUT: %.loc15_62.5: f64 = converted %MakeF64.call, %.loc15_62.4 -// CHECK:STDOUT: %struct.loc15: %.3 = struct_value (%.loc15_62.3, %.loc15_62.5) -// CHECK:STDOUT: %.loc15_63: %.3 = converted %.loc15_62.1, %struct.loc15 -// CHECK:STDOUT: %x: %.3 = bind_name x, %.loc15_63 -// CHECK:STDOUT: %.loc16_15.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%.loc16_15.1) [template = f64] -// CHECK:STDOUT: %.loc16_15.2: type = value_of_initializer %float.make_type.loc16 [template = f64] -// CHECK:STDOUT: %.loc16_15.3: type = converted %float.make_type.loc16, %.loc16_15.2 [template = f64] -// CHECK:STDOUT: %.loc16_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_24.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_24.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_24.3: type = converted %int.make_type_signed.loc16, %.loc16_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27: type = struct_type {.b: f64, .a: %i32} [template = constants.%.5] -// CHECK:STDOUT: %x.ref: %.3 = name_ref x, %x +// CHECK:STDOUT: %struct.loc15: %struct_type.a.b = struct_value (%.loc15_62.3, %.loc15_62.5) +// CHECK:STDOUT: %.loc15_63: %struct_type.a.b = converted %.loc15_62.1, %struct.loc15 +// CHECK:STDOUT: %x: %struct_type.a.b = bind_name x, %.loc15_63 +// CHECK:STDOUT: %int_64.loc16: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%int_64.loc16) [template = f64] +// CHECK:STDOUT: %.loc16_15.1: type = value_of_initializer %float.make_type.loc16 [template = f64] +// CHECK:STDOUT: %.loc16_15.2: type = converted %float.make_type.loc16, %.loc16_15.1 [template = f64] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_24.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_24.2: type = converted %int.make_type_signed.loc16, %.loc16_24.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: f64, .a: %i32} [template = constants.%struct_type.b.a] +// CHECK:STDOUT: %x.ref: %struct_type.a.b = name_ref x, %x // CHECK:STDOUT: %.loc16_31.1: f64 = struct_access %x.ref, element1 // CHECK:STDOUT: %.loc16_31.2: %i32 = struct_access %x.ref, element0 -// CHECK:STDOUT: %struct.loc16: %.5 = struct_value (%.loc16_31.1, %.loc16_31.2) -// CHECK:STDOUT: %.loc16_32: %.5 = converted %x.ref, %struct.loc16 -// CHECK:STDOUT: %y: %.5 = bind_name y, %.loc16_32 -// CHECK:STDOUT: %y.ref: %.5 = name_ref y, %y +// CHECK:STDOUT: %struct.loc16: %struct_type.b.a = struct_value (%.loc16_31.1, %.loc16_31.2) +// CHECK:STDOUT: %.loc16_32: %struct_type.b.a = converted %x.ref, %struct.loc16 +// CHECK:STDOUT: %y: %struct_type.b.a = bind_name y, %.loc16_32 +// CHECK:STDOUT: %y.ref: %struct_type.b.a = name_ref y, %y // CHECK:STDOUT: %.loc17_10.1: %i32 = struct_access %y.ref, element1 // CHECK:STDOUT: %.loc17_10.2: ref %i32 = struct_access %return, element1 // CHECK:STDOUT: %.loc17_10.3: init %i32 = initialize_from %.loc17_10.1 to %.loc17_10.2 // CHECK:STDOUT: %.loc17_10.4: f64 = struct_access %y.ref, element0 // CHECK:STDOUT: %.loc17_10.5: ref f64 = struct_access %return, element0 // CHECK:STDOUT: %.loc17_10.6: init f64 = initialize_from %.loc17_10.4 to %.loc17_10.5 -// CHECK:STDOUT: %.loc17_10.7: init %.3 = struct_init (%.loc17_10.3, %.loc17_10.6) to %return -// CHECK:STDOUT: %.loc17_11: init %.3 = converted %y.ref, %.loc17_10.7 +// CHECK:STDOUT: %.loc17_10.7: init %struct_type.a.b = struct_init (%.loc17_10.3, %.loc17_10.6) to %return +// CHECK:STDOUT: %.loc17_11: init %struct_type.a.b = 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 a1bc0474fa7b9..bf45c70b1d30a 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -14,29 +14,29 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: --- tuple_as_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %tuple.type.2} [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %tuple.type.2} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: %tuple.type.3} [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: %tuple.type.3} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.36) [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %tuple) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2) [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,73 +55,73 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11_13, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%.loc11_23) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%int_32.loc11_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11_13, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_23) // CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] // CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_signed.loc11_23, %.loc11_27.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_27.4: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc11_28: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12_13, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_23: init type = call constants.%Int(%.loc12_23) [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%int_32.loc12_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12_13, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_23: init type = call constants.%Int(%int_32.loc12_23) [template = constants.%i32] // CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_23) // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_signed.loc12_23 [template = constants.%i32] // CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_signed.loc12_23, %.loc12_27.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_27.4: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc12_28: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y +// CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_38: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_47: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_49.1: %tuple.type.3 = tuple_literal (%.loc11_47) -// CHECK:STDOUT: %.loc11_50.1: %.6 = struct_literal (%.loc11_38, %.loc11_49.1) -// CHECK:STDOUT: %.loc11_50.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_50.3: = bound_method %.loc11_38, %.loc11_50.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_50.4: = specific_function %.loc11_50.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %.loc11_50.4(%.loc11_38) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_50.5: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_50 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_50.6: ref %i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_50.7: init %i32 = initialize_from %.loc11_50.5 to %.loc11_50.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_49.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_49.3: = bound_method %.loc11_47, %.loc11_49.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_49.4: = specific_function %.loc11_49.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %.loc11_49.4(%.loc11_47) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_49.5: init %i32 = converted %.loc11_47, %int.convert_checked.loc11_49 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_50.8: ref %tuple.type.2 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_49.6: init %tuple.type.2 = tuple_init (%.loc11_49.5) to %.loc11_50.8 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.9: init %tuple.type.2 = converted %.loc11_49.1, %.loc11_49.6 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.10: init %tuple.type.2 = initialize_from %.loc11_50.9 to %.loc11_50.8 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.11: init %.2 = struct_init (%.loc11_50.7, %.loc11_50.10) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_51: init %.2 = converted %.loc11_50.1, %.loc11_50.11 [template = constants.%struct] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_49.1: %tuple.type.3 = tuple_literal (%int_2) +// CHECK:STDOUT: %.loc11_50.1: %struct_type.a.b.2 = struct_literal (%int_1, %.loc11_49.1) +// CHECK:STDOUT: %impl.elem0.loc11_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_50: = bound_method %int_1, %impl.elem0.loc11_50 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_50: = specific_function %Convert.bound.loc11_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %Convert.specific_fn.loc11_50(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_50.2: init %i32 = converted %int_1, %int.convert_checked.loc11_50 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_50.3: ref %i32 = struct_access file.%x.var, element0 +// CHECK:STDOUT: %.loc11_50.4: init %i32 = initialize_from %.loc11_50.2 to %.loc11_50.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_49: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_49: = bound_method %int_2, %impl.elem0.loc11_49 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_49: = specific_function %Convert.bound.loc11_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %Convert.specific_fn.loc11_49(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_49.2: init %i32 = converted %int_2, %int.convert_checked.loc11_49 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_50.5: ref %tuple.type.2 = struct_access file.%x.var, element1 +// CHECK:STDOUT: %.loc11_49.3: init %tuple.type.2 = tuple_init (%.loc11_49.2) to %.loc11_50.5 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.6: init %tuple.type.2 = converted %.loc11_49.1, %.loc11_49.3 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.7: init %tuple.type.2 = initialize_from %.loc11_50.6 to %.loc11_50.5 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.8: init %struct_type.a.b.1 = struct_init (%.loc11_50.4, %.loc11_50.7) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_51: init %struct_type.a.b.1 = converted %.loc11_50.1, %.loc11_50.8 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_51 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a.b.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_32.1: ref %i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc12_32.2: %i32 = bind_value %.loc12_32.1 // CHECK:STDOUT: %.loc12_32.3: ref %i32 = struct_access file.%y.var, element0 // CHECK:STDOUT: %.loc12_32.4: init %i32 = initialize_from %.loc12_32.2 to %.loc12_32.3 // CHECK:STDOUT: %.loc12_32.5: ref %tuple.type.2 = struct_access %x.ref, element1 -// CHECK:STDOUT: %.loc12_32.6: ref %i32 = tuple_access %.loc12_32.5, element0 -// CHECK:STDOUT: %.loc12_32.7: %i32 = bind_value %.loc12_32.6 -// CHECK:STDOUT: %.loc12_32.8: ref %tuple.type.2 = struct_access file.%y.var, element1 -// CHECK:STDOUT: %.loc12_32.9: init %tuple.type.2 = tuple_init (%.loc12_32.7) to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.10: init %tuple.type.2 = converted %.loc12_32.5, %.loc12_32.9 -// CHECK:STDOUT: %.loc12_32.11: init %tuple.type.2 = initialize_from %.loc12_32.10 to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.12: init %.2 = struct_init (%.loc12_32.4, %.loc12_32.11) to file.%y.var -// CHECK:STDOUT: %.loc12_33: init %.2 = converted %x.ref, %.loc12_32.12 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc12_32.5, element0 +// CHECK:STDOUT: %.loc12_32.6: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %.loc12_32.7: ref %tuple.type.2 = struct_access file.%y.var, element1 +// CHECK:STDOUT: %.loc12_32.8: init %tuple.type.2 = tuple_init (%.loc12_32.6) to %.loc12_32.7 +// CHECK:STDOUT: %.loc12_32.9: init %tuple.type.2 = converted %.loc12_32.5, %.loc12_32.8 +// CHECK:STDOUT: %.loc12_32.10: init %tuple.type.2 = initialize_from %.loc12_32.9 to %.loc12_32.7 +// CHECK:STDOUT: %.loc12_32.11: init %struct_type.a.b.1 = struct_init (%.loc12_32.4, %.loc12_32.10) to file.%y.var +// CHECK:STDOUT: %.loc12_33: init %struct_type.a.b.1 = converted %x.ref, %.loc12_32.11 // 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 9ff9d3a3a09bd..6d571d62b38a2 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -17,25 +17,25 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: --- two_entries.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,91 +56,91 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11_13, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%.loc11_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11_22, %.loc11_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc12_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%.loc12_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12_13, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_22: init type = call constants.%Int(%.loc12_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_22.2: type = value_of_initializer %int.make_type_signed.loc12_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_22.3: type = converted %int.make_type_signed.loc12_22, %.loc12_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc14_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%.loc14_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.3: type = converted %int.make_type_signed.loc14_13, %.loc14_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%.loc14_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.2: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.3: type = converted %int.make_type_signed.loc14_22, %.loc14_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_13: init type = call constants.%Int(%.loc15_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.2: type = value_of_initializer %int.make_type_signed.loc15_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.3: type = converted %int.make_type_signed.loc15_13, %.loc15_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_22.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%.loc15_22.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_22.2: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_22.3: type = converted %int.make_type_signed.loc15_22, %.loc15_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_25: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%int_32.loc11_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11_13, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11_22, %.loc11_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%int_32.loc12_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12_13, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_22: init type = call constants.%Int(%int_32.loc12_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_signed.loc12_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_signed.loc12_22, %.loc12_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%int_32.loc14_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14_13, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_signed.loc14_22, %.loc14_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x +// CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var +// CHECK:STDOUT: %int_32.loc15_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_13: init type = call constants.%Int(%int_32.loc15_13) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15_13 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15_13, %.loc15_13.1 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%int_32.loc15_22) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_22.2: type = converted %int.make_type_signed.loc15_22, %.loc15_22.1 [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y +// CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_35: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_43: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_44.1: %.6 = struct_literal (%.loc11_35, %.loc11_43) -// CHECK:STDOUT: %.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_44.3: = bound_method %.loc11_35, %.loc11_44.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_44.4: = specific_function %.loc11_44.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %.loc11_44.4(%.loc11_35) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_44.5: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_44.6: %i32 = converted %.loc11_35, %.loc11_44.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_44.7: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_44.8: = bound_method %.loc11_43, %.loc11_44.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_44.9: = specific_function %.loc11_44.8, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %.loc11_44.9(%.loc11_43) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_44.10: %i32 = value_of_initializer %int.convert_checked.loc11_44.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_44.11: %i32 = converted %.loc11_43, %.loc11_44.10 [template = constants.%.36] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc11_44.6, %.loc11_44.11) [template = constants.%struct] -// CHECK:STDOUT: %.loc11_45: %.2 = converted %.loc11_44.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %v: %.2 = bind_name v, %.loc11_45 -// CHECK:STDOUT: %v.ref: %.2 = name_ref v, %v -// CHECK:STDOUT: %w: %.2 = bind_name w, %v.ref -// CHECK:STDOUT: %.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_43: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_44.1: %.6 = struct_literal (%.loc14_35, %.loc14_43) -// CHECK:STDOUT: %.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_44.3: = bound_method %.loc14_35, %.loc14_44.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_44.4: = specific_function %.loc14_44.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %.loc14_44.4(%.loc14_35) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_44.5: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_44.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_44.6: ref %i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_44.7: init %i32 = initialize_from %.loc14_44.5 to %.loc14_44.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_44.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_44.9: = bound_method %.loc14_43, %.loc14_44.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_44.10: = specific_function %.loc14_44.9, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %.loc14_44.10(%.loc14_43) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_44.11: init %i32 = converted %.loc14_43, %int.convert_checked.loc14_44.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_44.12: ref %i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_44.13: init %i32 = initialize_from %.loc14_44.11 to %.loc14_44.12 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_44.14: init %.2 = struct_init (%.loc14_44.7, %.loc14_44.13) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_45: init %.2 = converted %.loc14_44.1, %.loc14_44.14 [template = constants.%struct] +// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc11_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc11, %int_2.loc11) +// CHECK:STDOUT: %impl.elem0.loc11_44.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_44.1: = bound_method %int_1.loc11, %impl.elem0.loc11_44.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_44.1: = specific_function %Convert.bound.loc11_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %Convert.specific_fn.loc11_44.1(%int_1.loc11) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_44.2: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_44.3: %i32 = converted %int_1.loc11, %.loc11_44.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_44.2: = bound_method %int_2.loc11, %impl.elem0.loc11_44.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_44.2: = specific_function %Convert.bound.loc11_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %Convert.specific_fn.loc11_44.2(%int_2.loc11) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_44.4: %i32 = value_of_initializer %int.convert_checked.loc11_44.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_44.5: %i32 = converted %int_2.loc11, %.loc11_44.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc11_44.3, %.loc11_44.5) [template = constants.%struct] +// CHECK:STDOUT: %.loc11_45: %struct_type.a.b.1 = converted %.loc11_44.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %v: %struct_type.a.b.1 = bind_name v, %.loc11_45 +// CHECK:STDOUT: %v.ref: %struct_type.a.b.1 = name_ref v, %v +// CHECK:STDOUT: %w: %struct_type.a.b.1 = bind_name w, %v.ref +// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc14_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc14, %int_2.loc14) +// CHECK:STDOUT: %impl.elem0.loc14_44.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_44.1: = bound_method %int_1.loc14, %impl.elem0.loc14_44.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_44.1: = specific_function %Convert.bound.loc14_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %Convert.specific_fn.loc14_44.1(%int_1.loc14) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_44.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_44.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc14_44.3: ref %i32 = struct_access file.%x.var, element0 +// CHECK:STDOUT: %.loc14_44.4: init %i32 = initialize_from %.loc14_44.2 to %.loc14_44.3 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_44.2: = bound_method %int_2.loc14, %impl.elem0.loc14_44.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_44.2: = specific_function %Convert.bound.loc14_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %Convert.specific_fn.loc14_44.2(%int_2.loc14) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_44.5: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_44.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_44.6: ref %i32 = struct_access file.%x.var, element1 +// CHECK:STDOUT: %.loc14_44.7: init %i32 = initialize_from %.loc14_44.5 to %.loc14_44.6 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc14_44.8: init %struct_type.a.b.1 = struct_init (%.loc14_44.4, %.loc14_44.7) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_45: init %struct_type.a.b.1 = converted %.loc14_44.1, %.loc14_44.8 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc14_45 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.a.b.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc15_29.1: ref %i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc15_29.2: %i32 = bind_value %.loc15_29.1 // CHECK:STDOUT: %.loc15_29.3: ref %i32 = struct_access file.%y.var, element0 @@ -149,8 +149,8 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc15_29.6: %i32 = bind_value %.loc15_29.5 // CHECK:STDOUT: %.loc15_29.7: ref %i32 = struct_access file.%y.var, element1 // CHECK:STDOUT: %.loc15_29.8: init %i32 = initialize_from %.loc15_29.6 to %.loc15_29.7 -// CHECK:STDOUT: %.loc15_29.9: init %.2 = struct_init (%.loc15_29.4, %.loc15_29.8) to file.%y.var -// CHECK:STDOUT: %.loc15_30: init %.2 = converted %x.ref, %.loc15_29.9 +// CHECK:STDOUT: %.loc15_29.9: init %struct_type.a.b.1 = struct_init (%.loc15_29.4, %.loc15_29.8) to file.%y.var +// CHECK:STDOUT: %.loc15_30: init %struct_type.a.b.1 = converted %x.ref, %.loc15_29.9 // CHECK:STDOUT: assign file.%y.var, %.loc15_30 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index 310f4dfc3f733..44dc9a6c6286e 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -15,23 +15,23 @@ var c: i32 = b.0; // CHECK:STDOUT: --- element_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,53 +51,53 @@ var c: i32 = b.0; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %.loc13_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.3: type = converted %int.make_type_signed.loc13, %.loc13_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_21.6: init %tuple.type.2 = tuple_init (%.loc11_21.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.6 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_21.2: init %i32 = converted %int_12, %int.convert_checked [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_21.3: init %tuple.type.2 = tuple_init (%.loc11_21.2) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.3 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_17.1: ref %i32 = tuple_access %a.ref, element0 -// CHECK:STDOUT: %.loc12_17.2: %i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 +// CHECK:STDOUT: %tuple.elem0.loc12: ref %i32 = tuple_access %a.ref, element0 +// CHECK:STDOUT: %.loc12_17.1: %i32 = bind_value %tuple.elem0.loc12 +// CHECK:STDOUT: %.loc12_17.2: init %tuple.type.2 = tuple_init (%.loc12_17.1) to file.%b.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.2 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 // CHECK:STDOUT: %b.ref: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc13_16: Core.IntLiteral = int_value 0 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_15.1: ref %i32 = tuple_access %b.ref, element0 -// CHECK:STDOUT: %.loc13_15.2: %i32 = bind_value %.loc13_15.1 -// CHECK:STDOUT: assign file.%c.var, %.loc13_15.2 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %tuple.elem0.loc13: ref %i32 = tuple_access %b.ref, element0 +// CHECK:STDOUT: %.loc13: %i32 = bind_value %tuple.elem0.loc13 +// CHECK:STDOUT: assign file.%c.var, %.loc13 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index 4ad6051b91946..7bc714937c5b9 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -17,26 +17,26 @@ var b: i32 = a.(oops); // CHECK:STDOUT: --- fail_access_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,10 +55,10 @@ var b: i32 = a.(oops); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -67,35 +67,35 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.4: init %i32 = converted %int_6, %int.convert_checked.loc11_27.2 [template = constants.%int_6.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_27.5: init %i32 = initialize_from %.loc11_27.4 to %tuple.elem1 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %oops.ref: = name_ref oops, [template = ] diff --git a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon index 3d5fab0d60c26..405bf44f58da7 100644 --- a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon @@ -25,7 +25,7 @@ fn Run() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,7 +55,7 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() -// CHECK:STDOUT: %.loc17_7: Core.IntLiteral = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc17_5.1: ref %empty_tuple.type = temporary_storage // CHECK:STDOUT: %.loc17_5.2: ref %empty_tuple.type = temporary %.loc17_5.1, %F.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index c6fdf70bd0534..85afe12ff72d5 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -23,24 +23,24 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: --- fail_large_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,59 +61,59 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %.loc17_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.3: type = converted %int.make_type_signed.loc17, %.loc17_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] +// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %.loc21_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.2: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.3: type = converted %int.make_type_signed.loc21, %.loc21_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] +// CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_signed.loc21, %.loc21_8.1 [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_21.6: init %tuple.type.2 = tuple_init (%.loc11_21.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.6 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_21.2: init %i32 = converted %int_12, %int.convert_checked [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_21.3: init %tuple.type.2 = tuple_init (%.loc11_21.2) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.3 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_17.1: ref %i32 = tuple_access %a.ref, element0 -// CHECK:STDOUT: %.loc12_17.2: %i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %a.ref, element0 +// CHECK:STDOUT: %.loc12_17.1: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %.loc12_17.2: init %tuple.type.2 = tuple_init (%.loc12_17.1) to file.%b.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.2 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 // CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc17: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %b.ref.loc21: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc21: Core.IntLiteral = int_value 2147483647 [template = constants.%.31] +// CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index e5d3aa06b9525..962fdb512d250 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -17,27 +17,27 @@ var b: i32 = a.(-10); // CHECK:STDOUT: --- fail_negative_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,10 +57,10 @@ var b: i32 = a.(-10); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -69,38 +69,38 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.4: init %i32 = converted %int_6, %int.convert_checked.loc11_27.2 [template = constants.%int_6.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_27.5: init %i32 = initialize_from %.loc11_27.4 to %tuple.elem1 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 10 [template = constants.%.35] +// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index 3e540d9401ed0..f5e0598528e9e 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -18,30 +18,30 @@ var c: i32 = a.(b); // CHECK:STDOUT: --- fail_non_deterministic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 0 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2, %int_3.2) [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,10 +61,10 @@ var c: i32 = a.(b); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -73,49 +73,49 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %.loc16_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.3: type = converted %int.make_type_signed.loc16, %.loc16_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_26.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_22, %.loc11_26.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_26.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_26.7: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_26.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.9: = bound_method %.loc11_25, %.loc11_26.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_26.10: = specific_function %.loc11_26.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.10(%.loc11_25) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.11: init %i32 = converted %.loc11_25, %int.convert_checked.loc11_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_26.13: init %i32 = initialize_from %.loc11_26.11 to %.loc11_26.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.14: init %tuple.type.2 = tuple_init (%.loc11_26.7, %.loc11_26.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type.3 = tuple_literal (%int_2, %int_3) +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_2, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_2, %int.convert_checked.loc11_26.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_26.3: init %i32 = initialize_from %.loc11_26.2 to %tuple.elem0 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_3, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_26.4: init %i32 = converted %int_3, %int.convert_checked.loc11_26.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_26.5: init %i32 = initialize_from %.loc11_26.4 to %tuple.elem1 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc11_26.6: init %tuple.type.2 = tuple_init (%.loc11_26.3, %.loc11_26.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.38] -// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.38] -// CHECK:STDOUT: assign file.%b.var, %.loc12_15.4 +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_0, %impl.elem0.loc12 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_0, %int.convert_checked.loc12 [template = constants.%int_0.2] +// CHECK:STDOUT: assign file.%b.var, %.loc12 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b // CHECK:STDOUT: assign file.%c.var, diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index be427ecbbb2f1..0ef8d327f8459 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -20,27 +20,27 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: --- fail_non_int_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: f64 = float_literal 2.6000000000000001 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] +// CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,10 +59,10 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -71,39 +71,39 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc18_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.3: type = converted %int.make_type_signed.loc18, %.loc18_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_8.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_signed.loc18, %.loc18_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.4: init %i32 = converted %int_6, %int.convert_checked.loc11_27.2 [template = constants.%int_6.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_27.5: init %i32 = initialize_from %.loc11_27.4 to %tuple.elem1 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.35] -// CHECK:STDOUT: %.loc18_17.2: Core.IntLiteral = converted %.loc18_17.1, [template = ] +// CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [template = constants.%float] +// CHECK:STDOUT: %.loc18: Core.IntLiteral = converted %float, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index 896bb3204a7eb..7be990376482c 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -27,24 +27,24 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.9: type = array_type %.8, %i32 [template] -// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] +// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.36: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.7) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 5 [template] -// CHECK:STDOUT: %array: %.9 = tuple_value (%.38, %.38) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_5.2, %int_5.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,46 +68,46 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_3: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc16_5: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_signed.loc18, %.loc18_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, %i32 [template = constants.%.9] -// CHECK:STDOUT: %non_tuple.var: ref %.9 = var non_tuple -// CHECK:STDOUT: %non_tuple: ref %.9 = bind_name non_tuple, %non_tuple.var -// CHECK:STDOUT: %.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%.11] -// CHECK:STDOUT: %.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%.11] -// CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%.loc18_30, %.loc18_33) -// CHECK:STDOUT: %.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_34.3: = bound_method %.loc18_30, %.loc18_34.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_34.4: = specific_function %.loc18_34.3, @Convert.2(constants.%.7) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %.loc18_34.4(%.loc18_30) [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.5: init %i32 = converted %.loc18_30, %int.convert_checked.loc18_34.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.6: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc18_34.7: ref %i32 = array_index %non_tuple.var, %.loc18_34.6 -// CHECK:STDOUT: %.loc18_34.8: init %i32 = initialize_from %.loc18_34.5 to %.loc18_34.7 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.9: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_34.10: = bound_method %.loc18_33, %.loc18_34.9 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_34.11: = specific_function %.loc18_34.10, @Convert.2(constants.%.7) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %.loc18_34.11(%.loc18_33) [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.12: init %i32 = converted %.loc18_33, %int.convert_checked.loc18_34.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.13: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_34.14: ref %i32 = array_index %non_tuple.var, %.loc18_34.13 -// CHECK:STDOUT: %.loc18_34.15: init %i32 = initialize_from %.loc18_34.12 to %.loc18_34.14 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_34.16: init %.9 = array_init (%.loc18_34.8, %.loc18_34.15) to %non_tuple.var [template = constants.%array] -// CHECK:STDOUT: %.loc18_35: init %.9 = converted %.loc18_34.1, %.loc18_34.16 [template = constants.%array] +// CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_signed.loc18, %.loc18_19.1 [template = constants.%i32] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %non_tuple.var: ref %array_type = var non_tuple +// CHECK:STDOUT: %non_tuple: ref %array_type = bind_name non_tuple, %non_tuple.var +// CHECK:STDOUT: %int_5.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %int_5.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%int_5.loc18_30, %int_5.loc18_33) +// CHECK:STDOUT: %impl.elem0.loc18_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_34.1: = bound_method %int_5.loc18_30, %impl.elem0.loc18_34.1 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc18_34.1: = specific_function %Convert.bound.loc18_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %Convert.specific_fn.loc18_34.1(%int_5.loc18_30) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc18_34.2: init %i32 = converted %int_5.loc18_30, %int.convert_checked.loc18_34.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0] +// CHECK:STDOUT: %.loc18_34.3: ref %i32 = array_index %non_tuple.var, %int_0.loc18 +// CHECK:STDOUT: %.loc18_34.4: init %i32 = initialize_from %.loc18_34.2 to %.loc18_34.3 [template = constants.%int_5.2] +// CHECK:STDOUT: %impl.elem0.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_34.2: = bound_method %int_5.loc18_33, %impl.elem0.loc18_34.2 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn.loc18_34.2: = specific_function %Convert.bound.loc18_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %Convert.specific_fn.loc18_34.2(%int_5.loc18_33) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc18_34.5: init %i32 = converted %int_5.loc18_33, %int.convert_checked.loc18_34.2 [template = constants.%int_5.2] +// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc18_34.6: ref %i32 = array_index %non_tuple.var, %int_1.loc18 +// CHECK:STDOUT: %.loc18_34.7: init %i32 = initialize_from %.loc18_34.5 to %.loc18_34.6 [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc18_34.8: init %array_type = array_init (%.loc18_34.4, %.loc18_34.7) to %non_tuple.var [template = constants.%array] +// CHECK:STDOUT: %.loc18_35: init %array_type = converted %.loc18_34.1, %.loc18_34.8 [template = constants.%array] // CHECK:STDOUT: assign %non_tuple.var, %.loc18_35 -// CHECK:STDOUT: %.loc22_14.1: Core.IntLiteral = int_value 32 [template = constants.%.7] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.3: type = converted %int.make_type_signed.loc22, %.loc22_14.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32] +// CHECK:STDOUT: %.loc22_14.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] +// CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_signed.loc22, %.loc22_14.1 [template = constants.%i32] // CHECK:STDOUT: %first.var: ref %i32 = var first // CHECK:STDOUT: %first: ref %i32 = bind_name first, %first.var -// CHECK:STDOUT: %non_tuple.ref: ref %.9 = name_ref non_tuple, %non_tuple -// CHECK:STDOUT: %.loc22_30: Core.IntLiteral = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %non_tuple.ref: ref %array_type = name_ref non_tuple, %non_tuple +// CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: assign %first.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index 3d6d0acc70b83..f17a1a2175185 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -17,27 +17,27 @@ var b: i32 = a.2; // CHECK:STDOUT: --- fail_out_of_bound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,10 +56,10 @@ var b: i32 = a.2; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -68,38 +68,38 @@ var b: i32 = a.2; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.4: init %i32 = converted %int_6, %int.convert_checked.loc11_27.2 [template = constants.%int_6.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_27.5: init %i32 = initialize_from %.loc11_27.4 to %tuple.elem1 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 2 [template = constants.%.35] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index 428992c0f9dbb..556bb27f69a88 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -17,29 +17,29 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: --- fail_out_of_bound_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 34 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.36: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.36 = struct_value (%.35) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_34.2) [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %struct_type.index: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,10 +58,10 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -70,42 +70,42 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 34 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.14: init %tuple.type.2 = tuple_init (%.loc11_28.7, %.loc11_28.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template = constants.%int_34.1] +// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_12, %int_34) +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_28.2: init %i32 = converted %int_12, %int.convert_checked.loc11_28.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_28.3: init %i32 = initialize_from %.loc11_28.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_34, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_34) [template = constants.%int_34.2] +// CHECK:STDOUT: %.loc11_28.4: init %i32 = converted %int_34, %int.convert_checked.loc11_28.2 [template = constants.%int_34.2] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_28.5: init %i32 = initialize_from %.loc11_28.4 to %tuple.elem1 [template = constants.%int_34.2] +// CHECK:STDOUT: %.loc11_28.6: init %tuple.type.2 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_28.1: %.36 = struct_literal (%.loc15_27) -// CHECK:STDOUT: %struct: %.36 = struct_value (%.loc15_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_28.2: %.36 = converted %.loc15_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc15_29: Core.IntLiteral = struct_access %.loc15_28.2, element0 [template = constants.%.35] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc15_28.1: %struct_type.index = struct_literal (%int_2) +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.2: %struct_type.index = converted %.loc15_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_29: Core.IntLiteral = struct_access %.loc15_28.2, element0 [template = constants.%int_2] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index e35c00798e869..bd1ca97edb2d6 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -14,29 +14,29 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: --- index_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 34 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.36 = struct_value (%.35) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_34.2) [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %struct_type.index: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,10 +55,10 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] @@ -67,45 +67,45 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_8.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.3: type = converted %int.make_type_signed.loc12, %.loc12_8.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 34 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.14: init %tuple.type.2 = tuple_init (%.loc11_28.7, %.loc11_28.13) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template = constants.%int_34.1] +// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_12, %int_34) +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_28.2: init %i32 = converted %int_12, %int.convert_checked.loc11_28.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 +// CHECK:STDOUT: %.loc11_28.3: init %i32 = initialize_from %.loc11_28.2 to %tuple.elem0 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_34, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_34) [template = constants.%int_34.2] +// CHECK:STDOUT: %.loc11_28.4: init %i32 = converted %int_34, %int.convert_checked.loc11_28.2 [template = constants.%int_34.2] +// CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1 +// CHECK:STDOUT: %.loc11_28.5: init %i32 = initialize_from %.loc11_28.4 to %tuple.elem1.loc11 [template = constants.%int_34.2] +// CHECK:STDOUT: %.loc11_28.6: init %tuple.type.2 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_27: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_28.1: %.36 = struct_literal (%.loc12_27) -// CHECK:STDOUT: %struct: %.36 = struct_value (%.loc12_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_28.2: %.36 = converted %.loc12_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = struct_access %.loc12_28.2, element0 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_15.1: ref %i32 = tuple_access %a.ref, element1 -// CHECK:STDOUT: %.loc12_15.2: %i32 = bind_value %.loc12_15.1 -// CHECK:STDOUT: assign file.%b.var, %.loc12_15.2 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc12_28.1: %struct_type.index = struct_literal (%int_1) +// CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_1) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_28.2: %struct_type.index = converted %.loc12_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = struct_access %.loc12_28.2, element0 [template = constants.%int_1] +// CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %a.ref, element1 +// CHECK:STDOUT: %.loc12_15: %i32 = bind_value %tuple.elem1.loc12 +// CHECK:STDOUT: assign file.%b.var, %.loc12_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 09531c7e1a905..0e09e23267bce 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -17,24 +17,24 @@ fn Run() -> i32 { // CHECK:STDOUT: --- return_value_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -59,8 +59,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) // CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32] @@ -72,30 +72,30 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = converted %int.make_type_signed, %.loc13_13.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_17.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_17.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.3: type = converted %int.make_type_signed, %.loc13_17.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.29] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.6) [template = constants.%tuple] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_30.2: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc11_30.3: %i32 = converted %int_0, %.loc11_30.2 [template = constants.%int_0.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.3) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_31: %tuple.type.2 = converted %.loc11_30.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc11_31 // CHECK:STDOUT: } @@ -104,11 +104,11 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() -// CHECK:STDOUT: %.loc14_14: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc14_12.1: ref %tuple.type.2 = temporary_storage // CHECK:STDOUT: %.loc14_12.2: ref %tuple.type.2 = temporary %.loc14_12.1, %F.call -// CHECK:STDOUT: %.loc14_13.1: ref %i32 = tuple_access %.loc14_12.2, element0 -// CHECK:STDOUT: %.loc14_13.2: %i32 = bind_value %.loc14_13.1 -// CHECK:STDOUT: return %.loc14_13.2 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc14_12.2, element0 +// CHECK:STDOUT: %.loc14_13: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: return %.loc14_13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_assign_nested.carbon b/toolchain/check/testdata/tuple/fail_assign_nested.carbon index 5a4f0247616ff..2e6a766d03900 100644 --- a/toolchain/check/testdata/tuple/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuple/fail_assign_nested.carbon @@ -16,21 +16,21 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: --- fail_assign_nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, %tuple.type.3) [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.6, %tuple.type.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -48,15 +48,15 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%.loc14_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%.loc14_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%int_32.loc14_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%int_32.loc14_15) [template = constants.%i32] // CHECK:STDOUT: %.loc14_18: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_10, %int.make_type_signed.loc14_15) -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%.loc14_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%.loc14_27) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%int_32.loc14_27) [template = constants.%i32] // CHECK:STDOUT: %.loc14_30: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_22, %int.make_type_signed.loc14_27) // CHECK:STDOUT: %.loc14_31.1: %tuple.type.2 = tuple_literal (%.loc14_18, %.loc14_30) // CHECK:STDOUT: %.loc14_31.2: type = value_of_initializer %int.make_type_signed.loc14_10 [template = constants.%i32] @@ -76,14 +76,14 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_37: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_40: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_43: Core.IntLiteral = int_value 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_44: %tuple.type.6 = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43) -// CHECK:STDOUT: %.loc14_48: Core.IntLiteral = int_value 4 [template = constants.%.7] -// CHECK:STDOUT: %.loc14_51: Core.IntLiteral = int_value 5 [template = constants.%.8] -// CHECK:STDOUT: %.loc14_54: Core.IntLiteral = int_value 6 [template = constants.%.9] -// CHECK:STDOUT: %.loc14_55: %tuple.type.6 = tuple_literal (%.loc14_48, %.loc14_51, %.loc14_54) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc14_44: %tuple.type.6 = tuple_literal (%int_1, %int_2, %int_3) +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6] +// CHECK:STDOUT: %.loc14_55: %tuple.type.6 = tuple_literal (%int_4, %int_5, %int_6) // CHECK:STDOUT: %.loc14_56: %tuple.type.7 = tuple_literal (%.loc14_44, %.loc14_55) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index 79d50225b7dc7..1164116045b29 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -19,22 +19,22 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: --- fail_element_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 65.890000000000001 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, f64) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,10 +52,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%.loc17_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%.loc17_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%int_32.loc17_14) [template = constants.%i32] // CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_9, %int.make_type_signed.loc17_14) // CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] // CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17_9, %.loc17_17.2 [template = constants.%i32] @@ -68,17 +68,17 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_22: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_25: f64 = float_literal 65.890000000000001 [template = constants.%.4] -// CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%.loc17_22, %.loc17_25) -// CHECK:STDOUT: %.loc17_30.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_30.3: = bound_method %.loc17_22, %.loc17_30.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_30.4: = specific_function %.loc17_30.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_30.4(%.loc17_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc17_30.5: init %i32 = converted %.loc17_22, %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc17_30.6: ref %i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc17_30.7: init %i32 = initialize_from %.loc17_30.5 to %.loc17_30.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_30.8: %i32 = converted %.loc17_25, [template = ] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template = constants.%float] +// CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%int_2, %float) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_30.2: init %i32 = converted %int_2, %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%x.var, element0 +// CHECK:STDOUT: %.loc17_30.3: init %i32 = initialize_from %.loc17_30.2 to %tuple.elem0 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc17_30.4: %i32 = converted %float, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon index 6192e5a881af7..bdff955232693 100644 --- a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon @@ -24,14 +24,14 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %Incomplete) [template] -// CHECK:STDOUT: %.2: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,8 +51,8 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} -// CHECK:STDOUT: %.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc19_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed, %Incomplete.ref.loc19) // CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] @@ -61,9 +61,9 @@ var p: Incomplete* = &t[1]; // 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.%.2] -// CHECK:STDOUT: %p.var: ref %.2 = var p -// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var +// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] +// CHECK:STDOUT: %p.var: ref %ptr = var p +// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; @@ -71,8 +71,8 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref = name_ref t, file.%t -// CHECK:STDOUT: %.loc21_25: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc21_22: = addr_of [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %addr: = addr_of [template = ] // CHECK:STDOUT: assign file.%p.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_too_few_element.carbon b/toolchain/check/testdata/tuple/fail_too_few_element.carbon index af0f74dfc2093..b512d2be37d9e 100644 --- a/toolchain/check/testdata/tuple/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuple/fail_too_few_element.carbon @@ -16,13 +16,13 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: --- fail_too_few_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -40,10 +40,10 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%.loc14_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%.loc14_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] // CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_9, %int.make_type_signed.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_signed.loc14_9, %.loc14_17.2 [template = constants.%i32] @@ -56,8 +56,8 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_25: %tuple.type.3 = tuple_literal (%.loc14_22) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc14: %tuple.type.3 = tuple_literal (%int_2) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index d74a8de54a8d8..82eee3054189c 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -19,10 +19,10 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: --- fail_type_assign.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: } @@ -42,8 +42,8 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) // CHECK:STDOUT: %.loc17_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.3: type = converted %int.make_type_signed, %.loc17_14.2 [template = constants.%i32] @@ -54,8 +54,8 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_19: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_19) [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc17_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) // CHECK:STDOUT: %.loc17_24.2: %i32 = converted %int.make_type_signed, [template = ] // CHECK:STDOUT: assign file.%x.var, diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index 02d837bf3f8d6..5f6c878dd8cde 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -19,7 +19,7 @@ var x: (1, ); // CHECK:STDOUT: --- fail_value_as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -37,9 +37,9 @@ var x: (1, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_12.1: %tuple.type = tuple_literal (%.loc17_9) -// CHECK:STDOUT: %.loc17_12.2: type = converted %.loc17_9, [template = ] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc17_12.1: %tuple.type = tuple_literal (%int_1) +// CHECK:STDOUT: %.loc17_12.2: type = converted %int_1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 9a8a475e6e5ea..9610585bf9b68 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -56,55 +56,55 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_0.2) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.4, %tuple.type.5) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.2, %i32) [template] // CHECK:STDOUT: %tuple.type.8: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (%tuple.type.7, %tuple.type.8) [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.11: type = tuple_type (%tuple.type.3, Core.IntLiteral) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.12: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.13: type = tuple_type (%tuple.type.11, %tuple.type.12) [template] -// CHECK:STDOUT: %.36: = bound_method %.33, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %.38) [template] -// CHECK:STDOUT: %.39: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.42: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%.41, %.44) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %int_1.2) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%int_2.2, %int_3.2) [template] // CHECK:STDOUT: %tuple.4: %tuple.type.9 = tuple_value (%tuple.2, %tuple.3) [template] // CHECK:STDOUT: %X: %tuple.type.8 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.8 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %.45: type = struct_type {} [template] -// CHECK:STDOUT: %.46: = complete_type_witness %.45 [template] -// CHECK:STDOUT: %tuple.5: %tuple.type.8 = tuple_value (%.38, %.41) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.5) [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%X) [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %tuple.5: %tuple.type.8 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple.5) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -127,24 +127,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_13: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %.loc4_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4) // CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_signed.loc4, %.loc4_17.2 [template = constants.%i32] // CHECK:STDOUT: %.loc4_17.4: type = converted %.loc4_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a_ref.var: ref %tuple.type.2 = var a_ref // CHECK:STDOUT: %a_ref: ref %tuple.type.2 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %.loc5_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_15: init type = call constants.%Int(%.loc5_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_15: init type = call constants.%Int(%int_32.loc5_15) [template = constants.%i32] // CHECK:STDOUT: %.loc5_19: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_15) -// CHECK:STDOUT: %.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%.loc5_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] // CHECK:STDOUT: %.loc5_25: %tuple.type.4 = tuple_literal (%.loc5_19, %int.make_type_signed.loc5_22) -// CHECK:STDOUT: %.loc5_29: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_29: init type = call constants.%Int(%.loc5_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_34: init type = call constants.%Int(%.loc5_34) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_29: init type = call constants.%Int(%int_32.loc5_29) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_34: init type = call constants.%Int(%int_32.loc5_34) [template = constants.%i32] // CHECK:STDOUT: %.loc5_37: %tuple.type.5 = tuple_literal (%int.make_type_signed.loc5_29, %int.make_type_signed.loc5_34) // CHECK:STDOUT: %.loc5_38.1: %tuple.type.6 = tuple_literal (%.loc5_25, %.loc5_37) // CHECK:STDOUT: %.loc5_38.2: type = value_of_initializer %int.make_type_signed.loc5_15 [template = constants.%i32] @@ -161,14 +161,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_38.13: type = converted %.loc5_38.1, constants.%tuple.type.9 [template = constants.%tuple.type.9] // CHECK:STDOUT: %b_ref.var: ref %tuple.type.9 = var b_ref // CHECK:STDOUT: %b_ref: ref %tuple.type.9 = bind_name b_ref, %b_ref.var -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %X.patt.loc7_9.1: %tuple.type.8 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: %X.param_patt: %tuple.type.8 = value_param_pattern %X.patt.loc7_9.1, runtime_param [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%.loc7_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%.loc7_19) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%int_32.loc7_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] // CHECK:STDOUT: %.loc7_22.1: %tuple.type.5 = tuple_literal (%int.make_type_signed.loc7_14, %int.make_type_signed.loc7_19) // CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %int.make_type_signed.loc7_14 [template = constants.%i32] // CHECK:STDOUT: %.loc7_22.3: type = converted %int.make_type_signed.loc7_14, %.loc7_22.2 [template = constants.%i32] @@ -179,30 +179,30 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %X.loc7_9.1: %tuple.type.8 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc7_9.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %C.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %C.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_14: Core.IntLiteral = int_value 1 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_17: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_18.1: %tuple.type.12 = tuple_literal (%.loc9_14, %.loc9_17) -// CHECK:STDOUT: %.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_18.3: = bound_method %.loc9_14, %.loc9_18.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_18.4: = specific_function %.loc9_18.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %.loc9_18.4(%.loc9_14) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_18.5: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_18.6: %i32 = converted %.loc9_14, %.loc9_18.5 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_18.7: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_18.8: = bound_method %.loc9_17, %.loc9_18.7 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_18.9: = specific_function %.loc9_18.8, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %.loc9_18.9(%.loc9_17) [template = constants.%.41] -// CHECK:STDOUT: %.loc9_18.10: %i32 = value_of_initializer %int.convert_checked.loc9_18.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc9_18.11: %i32 = converted %.loc9_17, %.loc9_18.10 [template = constants.%.41] -// CHECK:STDOUT: %tuple: %tuple.type.8 = tuple_value (%.loc9_18.6, %.loc9_18.11) [template = constants.%tuple.5] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc9_18.1: %tuple.type.12 = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc9_18.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_18.1: = bound_method %int_1, %impl.elem0.loc9_18.1 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc9_18.1: = specific_function %Convert.bound.loc9_18.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %Convert.specific_fn.loc9_18.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_18.2: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc9_18.3: %i32 = converted %int_1, %.loc9_18.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc9_18.2: = bound_method %int_2, %impl.elem0.loc9_18.2 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc9_18.2: = specific_function %Convert.bound.loc9_18.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %Convert.specific_fn.loc9_18.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_18.4: %i32 = value_of_initializer %int.convert_checked.loc9_18.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc9_18.5: %i32 = converted %int_2, %.loc9_18.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple: %tuple.type.8 = tuple_value (%.loc9_18.3, %.loc9_18.5) [template = constants.%tuple.5] // CHECK:STDOUT: %.loc9_19: %tuple.type.8 = converted %.loc9_18.1, %tuple [template = constants.%tuple.5] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.3] -// CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.2] +// CHECK:STDOUT: %return.param: ref %C.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %C.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,74 +213,74 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7_26: = complete_type_witness %.45 [template = constants.%.46] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.2 -// CHECK:STDOUT: complete_type_witness = %.loc7_26 +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_22: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_24.1: %tuple.type.3 = tuple_literal (%.loc4_22) -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_22, %.loc4_24.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_24.4(%.loc4_22) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.5: init %i32 = converted %.loc4_22, %int.convert_checked.loc4 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.6: init %tuple.type.2 = tuple_init (%.loc4_24.5) to file.%a_ref.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc4_25: init %tuple.type.2 = converted %.loc4_24.1, %.loc4_24.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc4_24.1: %tuple.type.3 = tuple_literal (%int_0.loc4) +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_24.2: init %i32 = converted %int_0.loc4, %int.convert_checked.loc4 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc4_24.3: init %tuple.type.2 = tuple_init (%.loc4_24.2) to file.%a_ref.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc4_25: init %tuple.type.2 = converted %.loc4_24.1, %.loc4_24.3 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_25 -// CHECK:STDOUT: %.loc5_45: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_47.1: %tuple.type.3 = tuple_literal (%.loc5_45) -// CHECK:STDOUT: %.loc5_50: Core.IntLiteral = int_value 1 [template = constants.%.33] -// CHECK:STDOUT: %.loc5_51.1: %tuple.type.11 = tuple_literal (%.loc5_47.1, %.loc5_50) -// CHECK:STDOUT: %.loc5_55: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc5_58: Core.IntLiteral = int_value 3 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_59.1: %tuple.type.12 = tuple_literal (%.loc5_55, %.loc5_58) +// CHECK:STDOUT: %int_0.loc5: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] +// CHECK:STDOUT: %.loc5_47.1: %tuple.type.3 = tuple_literal (%int_0.loc5) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc5_51.1: %tuple.type.11 = tuple_literal (%.loc5_47.1, %int_1) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc5_59.1: %tuple.type.12 = tuple_literal (%int_2, %int_3) // CHECK:STDOUT: %.loc5_60.1: %tuple.type.13 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %.loc5_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_47.3: = bound_method %.loc5_45, %.loc5_47.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_47.4: = specific_function %.loc5_47.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %.loc5_47.4(%.loc5_45) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_47.5: init %i32 = converted %.loc5_45, %int.convert_checked.loc5_47 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_60.2: ref %tuple.type.7 = tuple_access file.%b_ref.var, element0 -// CHECK:STDOUT: %.loc5_51.2: ref %tuple.type.2 = tuple_access %.loc5_60.2, element0 -// CHECK:STDOUT: %.loc5_47.6: init %tuple.type.2 = tuple_init (%.loc5_47.5) to %.loc5_51.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.6 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.4: init %tuple.type.2 = initialize_from %.loc5_51.3 to %.loc5_51.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.5: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_51.6: = bound_method %.loc5_50, %.loc5_51.5 [template = constants.%.36] -// CHECK:STDOUT: %.loc5_51.7: = specific_function %.loc5_51.6, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %.loc5_51.7(%.loc5_50) [template = constants.%.38] -// CHECK:STDOUT: %.loc5_51.8: init %i32 = converted %.loc5_50, %int.convert_checked.loc5_51 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_51.9: ref %i32 = tuple_access %.loc5_60.2, element1 -// CHECK:STDOUT: %.loc5_51.10: init %i32 = initialize_from %.loc5_51.8 to %.loc5_51.9 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_51.11: init %tuple.type.7 = tuple_init (%.loc5_51.4, %.loc5_51.10) to %.loc5_60.2 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_60.3: init %tuple.type.7 = converted %.loc5_51.1, %.loc5_51.11 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_59.3: = bound_method %.loc5_55, %.loc5_59.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_59.4: = specific_function %.loc5_59.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %.loc5_59.4(%.loc5_55) [template = constants.%.41] -// CHECK:STDOUT: %.loc5_59.5: init %i32 = converted %.loc5_55, %int.convert_checked.loc5_59.1 [template = constants.%.41] -// CHECK:STDOUT: %.loc5_60.4: ref %tuple.type.8 = tuple_access file.%b_ref.var, element1 -// CHECK:STDOUT: %.loc5_59.6: ref %i32 = tuple_access %.loc5_60.4, element0 -// CHECK:STDOUT: %.loc5_59.7: init %i32 = initialize_from %.loc5_59.5 to %.loc5_59.6 [template = constants.%.41] -// CHECK:STDOUT: %.loc5_59.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_59.9: = bound_method %.loc5_58, %.loc5_59.8 [template = constants.%.42] -// CHECK:STDOUT: %.loc5_59.10: = specific_function %.loc5_59.9, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %.loc5_59.10(%.loc5_58) [template = constants.%.44] -// CHECK:STDOUT: %.loc5_59.11: init %i32 = converted %.loc5_58, %int.convert_checked.loc5_59.2 [template = constants.%.44] -// CHECK:STDOUT: %.loc5_59.12: ref %i32 = tuple_access %.loc5_60.4, element1 -// CHECK:STDOUT: %.loc5_59.13: init %i32 = initialize_from %.loc5_59.11 to %.loc5_59.12 [template = constants.%.44] -// CHECK:STDOUT: %.loc5_59.14: init %tuple.type.8 = tuple_init (%.loc5_59.7, %.loc5_59.13) to %.loc5_60.4 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.5: init %tuple.type.8 = converted %.loc5_59.1, %.loc5_59.14 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.6: init %tuple.type.9 = tuple_init (%.loc5_60.3, %.loc5_60.5) to file.%b_ref.var [template = constants.%tuple.4] -// CHECK:STDOUT: %.loc5_61: init %tuple.type.9 = converted %.loc5_60.1, %.loc5_60.6 [template = constants.%tuple.4] +// CHECK:STDOUT: %impl.elem0.loc5_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_47: = bound_method %int_0.loc5, %impl.elem0.loc5_47 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc5_47: = specific_function %Convert.bound.loc5_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %Convert.specific_fn.loc5_47(%int_0.loc5) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc5_47.2: init %i32 = converted %int_0.loc5, %int.convert_checked.loc5_47 [template = constants.%int_0.2] +// CHECK:STDOUT: %tuple.elem0.loc5_60: ref %tuple.type.7 = tuple_access file.%b_ref.var, element0 +// CHECK:STDOUT: %tuple.elem0.loc5_51: ref %tuple.type.2 = tuple_access %tuple.elem0.loc5_60, element0 +// CHECK:STDOUT: %.loc5_47.3: init %tuple.type.2 = tuple_init (%.loc5_47.2) to %tuple.elem0.loc5_51 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc5_51.2: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.3 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = initialize_from %.loc5_51.2 to %tuple.elem0.loc5_51 [template = constants.%tuple.1] +// CHECK:STDOUT: %impl.elem0.loc5_51: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_51: = bound_method %int_1, %impl.elem0.loc5_51 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc5_51: = specific_function %Convert.bound.loc5_51, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %Convert.specific_fn.loc5_51(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_51.4: init %i32 = converted %int_1, %int.convert_checked.loc5_51 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem1.loc5_51: ref %i32 = tuple_access %tuple.elem0.loc5_60, element1 +// CHECK:STDOUT: %.loc5_51.5: init %i32 = initialize_from %.loc5_51.4 to %tuple.elem1.loc5_51 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc5_51.6: init %tuple.type.7 = tuple_init (%.loc5_51.3, %.loc5_51.5) to %tuple.elem0.loc5_60 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc5_60.2: init %tuple.type.7 = converted %.loc5_51.1, %.loc5_51.6 [template = constants.%tuple.2] +// CHECK:STDOUT: %impl.elem0.loc5_59.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_59.1: = bound_method %int_2, %impl.elem0.loc5_59.1 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc5_59.1: = specific_function %Convert.bound.loc5_59.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %Convert.specific_fn.loc5_59.1(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc5_59.2: init %i32 = converted %int_2, %int.convert_checked.loc5_59.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem1.loc5_60: ref %tuple.type.8 = tuple_access file.%b_ref.var, element1 +// CHECK:STDOUT: %tuple.elem0.loc5_59: ref %i32 = tuple_access %tuple.elem1.loc5_60, element0 +// CHECK:STDOUT: %.loc5_59.3: init %i32 = initialize_from %.loc5_59.2 to %tuple.elem0.loc5_59 [template = constants.%int_2.2] +// CHECK:STDOUT: %impl.elem0.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc5_59.2: = bound_method %int_3, %impl.elem0.loc5_59.2 [template = constants.%Convert.bound.4] +// CHECK:STDOUT: %Convert.specific_fn.loc5_59.2: = specific_function %Convert.bound.loc5_59.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %Convert.specific_fn.loc5_59.2(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc5_59.4: init %i32 = converted %int_3, %int.convert_checked.loc5_59.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %tuple.elem1.loc5_59: ref %i32 = tuple_access %tuple.elem1.loc5_60, element1 +// CHECK:STDOUT: %.loc5_59.5: init %i32 = initialize_from %.loc5_59.4 to %tuple.elem1.loc5_59 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc5_59.6: init %tuple.type.8 = tuple_init (%.loc5_59.3, %.loc5_59.5) to %tuple.elem1.loc5_60 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc5_60.3: init %tuple.type.8 = converted %.loc5_59.1, %.loc5_59.6 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc5_60.4: init %tuple.type.9 = tuple_init (%.loc5_60.2, %.loc5_60.3) to file.%b_ref.var [template = constants.%tuple.4] +// CHECK:STDOUT: %.loc5_61: init %tuple.type.9 = converted %.loc5_60.1, %.loc5_60.4 [template = constants.%tuple.4] // CHECK:STDOUT: assign file.%b_ref.var, %.loc5_61 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -309,61 +309,61 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] @@ -373,31 +373,31 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.8: type = tuple_type (%tuple.type.6, %tuple.type.7) [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.25: type = struct_type {} [template] -// CHECK:STDOUT: %.26: = complete_type_witness %.25 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.10: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.29: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.31: %.2 = assoc_entity element0, imports.%import_ref.43 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.21) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.43 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.33: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.21) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.28, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.21) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.35, %.38) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -405,7 +405,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: ref %tuple.type.2 = import_ref Implicit//default, inst+24, loaded // CHECK:STDOUT: %import_ref.2: ref %tuple.type.8 = import_ref Implicit//default, inst+370, loaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+487, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.39 @@ -414,11 +414,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+40, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+41, loaded [symbolic = @ImplicitAs.%.2 (constants.%.31)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+41, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+42, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+83, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+84, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+85, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+85, loaded [symbolic = @impl.1.%interface (constants.%interface.1)] // CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+56, unloaded // CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+109, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+110, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] @@ -445,7 +445,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, inst+460, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, inst+460, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.41 = import_ref Implicit//default, inst+458, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -463,24 +463,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4) // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.4: type = converted %.loc4_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] // CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_11) -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%.loc5_18) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%int_32.loc5_18) [template = constants.%i32] // CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %int.make_type_signed.loc5_18) -// CHECK:STDOUT: %.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_25: init type = call constants.%Int(%.loc5_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%.21] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%.loc5_30) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_25: init type = call constants.%Int(%int_32.loc5_25) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] // CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%int.make_type_signed.loc5_25, %int.make_type_signed.loc5_30) // CHECK:STDOUT: %.loc5_34.1: %tuple.type.5 = tuple_literal (%.loc5_21, %.loc5_33) // CHECK:STDOUT: %.loc5_34.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] @@ -497,27 +497,27 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_34.13: type = converted %.loc5_34.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] // CHECK:STDOUT: %b.var: ref %tuple.type.8 = var b // CHECK:STDOUT: %b: ref %tuple.type.8 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_11: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_15.1: %tuple.type.10 = tuple_literal (%.loc6_11, %.loc6_14) -// CHECK:STDOUT: %.loc6_15.2: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_15.3: = bound_method %.loc6_11, %.loc6_15.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_15.4: = specific_function %.loc6_15.3, @Convert.2(constants.%.21) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %.loc6_15.4(%.loc6_11) [template = constants.%.35] -// CHECK:STDOUT: %.loc6_15.5: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc6_15.6: %i32 = converted %.loc6_11, %.loc6_15.5 [template = constants.%.35] -// CHECK:STDOUT: %.loc6_15.7: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_15.8: = bound_method %.loc6_14, %.loc6_15.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_15.9: = specific_function %.loc6_15.8, @Convert.2(constants.%.21) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %.loc6_15.9(%.loc6_14) [template = constants.%.38] -// CHECK:STDOUT: %.loc6_15.10: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc6_15.11: %i32 = converted %.loc6_14, %.loc6_15.10 [template = constants.%.38] -// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_15.6, %.loc6_15.11) [template = constants.%tuple] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc6_15.1: %tuple.type.10 = tuple_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc6_15.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_15.1: = bound_method %int_1, %impl.elem0.loc6_15.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc6_15.1: = specific_function %Convert.bound.loc6_15.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %Convert.specific_fn.loc6_15.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc6_15.2: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc6_15.3: %i32 = converted %int_1, %.loc6_15.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc6_15.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc6_15.2: = bound_method %int_2, %impl.elem0.loc6_15.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc6_15.2: = specific_function %Convert.bound.loc6_15.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %Convert.specific_fn.loc6_15.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc6_15.4: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc6_15.5: %i32 = converted %int_2, %.loc6_15.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_15.3, %.loc6_15.5) [template = constants.%tuple] // CHECK:STDOUT: %.loc6_16: %tuple.type.7 = converted %.loc6_15.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.3] -// CHECK:STDOUT: %c.var: ref %C.3 = var c -// CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.2] +// CHECK:STDOUT: %c.var: ref %C.2 = var c +// CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -529,8 +529,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -549,8 +549,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -569,7 +569,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -586,7 +586,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -602,7 +602,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -618,7 +618,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -635,7 +635,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -652,7 +652,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -668,7 +668,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -684,7 +684,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -709,9 +709,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -754,9 +754,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -795,50 +795,50 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a_ref.ref: ref %tuple.type.2 = name_ref a_ref, imports.%import_ref.1 -// CHECK:STDOUT: %.loc4_17.1: ref %i32 = tuple_access %a_ref.ref, element0 -// CHECK:STDOUT: %.loc4_17.2: %i32 = bind_value %.loc4_17.1 -// CHECK:STDOUT: %.loc4_17.3: init %tuple.type.2 = tuple_init (%.loc4_17.2) to file.%a.var -// CHECK:STDOUT: %.loc4_22: init %tuple.type.2 = converted %a_ref.ref, %.loc4_17.3 +// CHECK:STDOUT: %tuple.elem0.loc4: ref %i32 = tuple_access %a_ref.ref, element0 +// CHECK:STDOUT: %.loc4_17.1: %i32 = bind_value %tuple.elem0.loc4 +// CHECK:STDOUT: %.loc4_17.2: init %tuple.type.2 = tuple_init (%.loc4_17.1) to file.%a.var +// CHECK:STDOUT: %.loc4_22: init %tuple.type.2 = converted %a_ref.ref, %.loc4_17.2 // CHECK:STDOUT: assign file.%a.var, %.loc4_22 // CHECK:STDOUT: %b_ref.ref: ref %tuple.type.8 = name_ref b_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc5_38.1: ref %tuple.type.6 = tuple_access %b_ref.ref, element0 -// CHECK:STDOUT: %.loc5_38.2: ref %tuple.type.2 = tuple_access %.loc5_38.1, element0 -// CHECK:STDOUT: %.loc5_38.3: ref %i32 = tuple_access %.loc5_38.2, element0 -// CHECK:STDOUT: %.loc5_38.4: %i32 = bind_value %.loc5_38.3 -// CHECK:STDOUT: %.loc5_38.5: ref %tuple.type.6 = tuple_access file.%b.var, element0 -// CHECK:STDOUT: %.loc5_38.6: ref %tuple.type.2 = tuple_access %.loc5_38.5, element0 -// CHECK:STDOUT: %.loc5_38.7: init %tuple.type.2 = tuple_init (%.loc5_38.4) to %.loc5_38.6 -// CHECK:STDOUT: %.loc5_38.8: init %tuple.type.2 = converted %.loc5_38.2, %.loc5_38.7 -// CHECK:STDOUT: %.loc5_38.9: init %tuple.type.2 = initialize_from %.loc5_38.8 to %.loc5_38.6 -// CHECK:STDOUT: %.loc5_38.10: ref %i32 = tuple_access %.loc5_38.1, element1 -// CHECK:STDOUT: %.loc5_38.11: %i32 = bind_value %.loc5_38.10 -// CHECK:STDOUT: %.loc5_38.12: ref %i32 = tuple_access %.loc5_38.5, element1 -// CHECK:STDOUT: %.loc5_38.13: init %i32 = initialize_from %.loc5_38.11 to %.loc5_38.12 -// CHECK:STDOUT: %.loc5_38.14: init %tuple.type.6 = tuple_init (%.loc5_38.9, %.loc5_38.13) to %.loc5_38.5 -// CHECK:STDOUT: %.loc5_38.15: init %tuple.type.6 = converted %.loc5_38.1, %.loc5_38.14 -// CHECK:STDOUT: %.loc5_38.16: ref %tuple.type.7 = tuple_access %b_ref.ref, element1 -// CHECK:STDOUT: %.loc5_38.17: ref %i32 = tuple_access %.loc5_38.16, element0 -// CHECK:STDOUT: %.loc5_38.18: %i32 = bind_value %.loc5_38.17 -// CHECK:STDOUT: %.loc5_38.19: ref %tuple.type.7 = tuple_access file.%b.var, element1 -// CHECK:STDOUT: %.loc5_38.20: ref %i32 = tuple_access %.loc5_38.19, element0 -// CHECK:STDOUT: %.loc5_38.21: init %i32 = initialize_from %.loc5_38.18 to %.loc5_38.20 -// CHECK:STDOUT: %.loc5_38.22: ref %i32 = tuple_access %.loc5_38.16, element1 -// CHECK:STDOUT: %.loc5_38.23: %i32 = bind_value %.loc5_38.22 -// CHECK:STDOUT: %.loc5_38.24: ref %i32 = tuple_access %.loc5_38.19, element1 -// CHECK:STDOUT: %.loc5_38.25: init %i32 = initialize_from %.loc5_38.23 to %.loc5_38.24 -// CHECK:STDOUT: %.loc5_38.26: init %tuple.type.7 = tuple_init (%.loc5_38.21, %.loc5_38.25) to %.loc5_38.19 -// CHECK:STDOUT: %.loc5_38.27: init %tuple.type.7 = converted %.loc5_38.16, %.loc5_38.26 -// CHECK:STDOUT: %.loc5_38.28: init %tuple.type.8 = tuple_init (%.loc5_38.15, %.loc5_38.27) to file.%b.var -// CHECK:STDOUT: %.loc5_43: init %tuple.type.8 = converted %b_ref.ref, %.loc5_38.28 +// CHECK:STDOUT: %tuple.elem0.loc5_38.1: ref %tuple.type.6 = tuple_access %b_ref.ref, element0 +// CHECK:STDOUT: %tuple.elem0.loc5_38.2: ref %tuple.type.2 = tuple_access %tuple.elem0.loc5_38.1, element0 +// CHECK:STDOUT: %tuple.elem0.loc5_38.3: ref %i32 = tuple_access %tuple.elem0.loc5_38.2, element0 +// CHECK:STDOUT: %.loc5_38.1: %i32 = bind_value %tuple.elem0.loc5_38.3 +// CHECK:STDOUT: %tuple.elem0.loc5_38.4: ref %tuple.type.6 = tuple_access file.%b.var, element0 +// CHECK:STDOUT: %tuple.elem0.loc5_38.5: ref %tuple.type.2 = tuple_access %tuple.elem0.loc5_38.4, element0 +// CHECK:STDOUT: %.loc5_38.2: init %tuple.type.2 = tuple_init (%.loc5_38.1) to %tuple.elem0.loc5_38.5 +// CHECK:STDOUT: %.loc5_38.3: init %tuple.type.2 = converted %tuple.elem0.loc5_38.2, %.loc5_38.2 +// CHECK:STDOUT: %.loc5_38.4: init %tuple.type.2 = initialize_from %.loc5_38.3 to %tuple.elem0.loc5_38.5 +// CHECK:STDOUT: %tuple.elem1.loc5_38.1: ref %i32 = tuple_access %tuple.elem0.loc5_38.1, element1 +// CHECK:STDOUT: %.loc5_38.5: %i32 = bind_value %tuple.elem1.loc5_38.1 +// CHECK:STDOUT: %tuple.elem1.loc5_38.2: ref %i32 = tuple_access %tuple.elem0.loc5_38.4, element1 +// CHECK:STDOUT: %.loc5_38.6: init %i32 = initialize_from %.loc5_38.5 to %tuple.elem1.loc5_38.2 +// CHECK:STDOUT: %.loc5_38.7: init %tuple.type.6 = tuple_init (%.loc5_38.4, %.loc5_38.6) to %tuple.elem0.loc5_38.4 +// CHECK:STDOUT: %.loc5_38.8: init %tuple.type.6 = converted %tuple.elem0.loc5_38.1, %.loc5_38.7 +// CHECK:STDOUT: %tuple.elem1.loc5_38.3: ref %tuple.type.7 = tuple_access %b_ref.ref, element1 +// CHECK:STDOUT: %tuple.elem0.loc5_38.6: ref %i32 = tuple_access %tuple.elem1.loc5_38.3, element0 +// CHECK:STDOUT: %.loc5_38.9: %i32 = bind_value %tuple.elem0.loc5_38.6 +// CHECK:STDOUT: %tuple.elem1.loc5_38.4: ref %tuple.type.7 = tuple_access file.%b.var, element1 +// CHECK:STDOUT: %tuple.elem0.loc5_38.7: ref %i32 = tuple_access %tuple.elem1.loc5_38.4, element0 +// CHECK:STDOUT: %.loc5_38.10: init %i32 = initialize_from %.loc5_38.9 to %tuple.elem0.loc5_38.7 +// CHECK:STDOUT: %tuple.elem1.loc5_38.5: ref %i32 = tuple_access %tuple.elem1.loc5_38.3, element1 +// CHECK:STDOUT: %.loc5_38.11: %i32 = bind_value %tuple.elem1.loc5_38.5 +// CHECK:STDOUT: %tuple.elem1.loc5_38.6: ref %i32 = tuple_access %tuple.elem1.loc5_38.4, element1 +// CHECK:STDOUT: %.loc5_38.12: init %i32 = initialize_from %.loc5_38.11 to %tuple.elem1.loc5_38.6 +// CHECK:STDOUT: %.loc5_38.13: init %tuple.type.7 = tuple_init (%.loc5_38.10, %.loc5_38.12) to %tuple.elem1.loc5_38.4 +// CHECK:STDOUT: %.loc5_38.14: init %tuple.type.7 = converted %tuple.elem1.loc5_38.3, %.loc5_38.13 +// CHECK:STDOUT: %.loc5_38.15: init %tuple.type.8 = tuple_init (%.loc5_38.8, %.loc5_38.14) to file.%b.var +// CHECK:STDOUT: %.loc5_43: init %tuple.type.8 = converted %b_ref.ref, %.loc5_38.15 // CHECK:STDOUT: assign file.%b.var, %.loc5_43 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {} -// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc6 +// CHECK:STDOUT: %.loc6: ref %C.2 = splice_block file.%c.var {} +// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc6 // CHECK:STDOUT: assign file.%c.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -886,7 +886,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -932,8 +932,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1013,7 +1013,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1059,8 +1059,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1111,24 +1111,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.29 -// CHECK:STDOUT: %.2 => constants.%.30 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 -// CHECK:STDOUT: %N.patt => constants.%.21 +// CHECK:STDOUT: specific @impl.1(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.32 +// CHECK:STDOUT: %interface => constants.%interface.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 +// CHECK:STDOUT: specific @Convert.2(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1155,82 +1155,82 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.21: type = struct_type {} [template] -// CHECK:STDOUT: %.22: = complete_type_witness %.21 [template] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.28: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29, %.28) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%int_1.2, %int_2.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+370, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+487, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude @@ -1268,7 +1268,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+460, loaded [template = constants.%.22] +// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+460, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+458, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1284,11 +1284,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_15: Core.IntLiteral = int_value 1 [template = constants.%.24] -// CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 2 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 3 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_22: %tuple.type.2 = tuple_literal (%.loc12_15, %.loc12_18, %.loc12_21) +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc12: %tuple.type.2 = tuple_literal (%int_1, %int_2, %int_3) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -1302,8 +1302,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1322,8 +1322,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1342,7 +1342,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -1359,7 +1359,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -1375,7 +1375,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -1391,7 +1391,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -1408,7 +1408,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -1425,7 +1425,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -1441,7 +1441,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -1457,7 +1457,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -1482,9 +1482,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -1527,9 +1527,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1568,13 +1568,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.3; +// CHECK:STDOUT: fn @F() -> %C.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc12: ref %C.3 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc12 +// CHECK:STDOUT: %.loc12: ref %C.2 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc12 // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1622,7 +1622,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -1668,8 +1668,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1749,7 +1749,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1795,8 +1795,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1859,103 +1859,103 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] +// CHECK:STDOUT: %interface.1: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %interface.3: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %interface.4: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] -// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.21: type = struct_type {} [template] -// CHECK:STDOUT: %.22: = complete_type_witness %.21 [template] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.27: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.28: %.27 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.29: %.2 = assoc_entity element0, imports.%import_ref.42 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.23) [template] +// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.42 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.24, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.23) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.34: = bound_method %.25, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.23) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 4 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.33, %.36) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.1) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%int_3.2, %int_4.2) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple.1) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%.39, %.38) [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.2) [template] -// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.3)> [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.3) [template] +// CHECK:STDOUT: %int_2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%int_1, %int_2) [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.2) [template] +// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.2)> [template] +// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.2) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.40: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] -// CHECK:STDOUT: %.41: %.40 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %Convert.assoc_type.6: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] +// CHECK:STDOUT: %assoc0.7: %Convert.assoc_type.6 = assoc_entity element0, imports.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+370, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+453, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+487, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.41 @@ -1963,11 +1963,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+40, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+41, loaded [symbolic = @ImplicitAs.%.2 (constants.%.29)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+41, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+42, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+83, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+84, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+85, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+85, loaded [symbolic = @impl.1.%interface (constants.%interface.1)] // CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+56, unloaded // CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+109, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+110, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] @@ -1994,7 +1994,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.8.%uN (constants.%uN)] // CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] // CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+460, loaded [template = constants.%.22] +// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, inst+460, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+458, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2010,27 +2010,27 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 3 [template = constants.%.24] -// CHECK:STDOUT: %.loc10_18: Core.IntLiteral = int_value 4 [template = constants.%.25] -// CHECK:STDOUT: %.loc10_19.1: %tuple.type.2 = tuple_literal (%.loc10_15, %.loc10_18) -// CHECK:STDOUT: %.loc10_19.2: %Convert.type.13 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_19.3: = bound_method %.loc10_15, %.loc10_19.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_19.4: = specific_function %.loc10_19.3, @Convert.2(constants.%.23) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %.loc10_19.4(%.loc10_15) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_19.5: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_19.6: %i32 = converted %.loc10_15, %.loc10_19.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_19.7: %Convert.type.13 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_19.8: = bound_method %.loc10_18, %.loc10_19.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_19.9: = specific_function %.loc10_19.8, @Convert.2(constants.%.23) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %.loc10_19.9(%.loc10_18) [template = constants.%.36] -// CHECK:STDOUT: %.loc10_19.10: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc10_19.11: %i32 = converted %.loc10_18, %.loc10_19.10 [template = constants.%.36] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc10_19.6, %.loc10_19.11) [template = constants.%tuple.1] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc10_19.1: %tuple.type.2 = tuple_literal (%int_3, %int_4) +// CHECK:STDOUT: %impl.elem0.loc10_19.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_19.1: = bound_method %int_3, %impl.elem0.loc10_19.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc10_19.1: = specific_function %Convert.bound.loc10_19.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %Convert.specific_fn.loc10_19.1(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc10_19.2: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc10_19.3: %i32 = converted %int_3, %.loc10_19.2 [template = constants.%int_3.2] +// CHECK:STDOUT: %impl.elem0.loc10_19.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc10_19.2: = bound_method %int_4, %impl.elem0.loc10_19.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_19.2: = specific_function %Convert.bound.loc10_19.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %Convert.specific_fn.loc10_19.2(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc10_19.4: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc10_19.5: %i32 = converted %int_4, %.loc10_19.4 [template = constants.%int_4.2] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc10_19.3, %.loc10_19.5) [template = constants.%tuple.1] // CHECK:STDOUT: %.loc10_20: %tuple.type.1 = converted %.loc10_19.1, %tuple [template = constants.%tuple.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.3] -// CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad -// CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.2] +// CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad +// CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -2042,8 +2042,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)] +// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2062,8 +2062,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] -// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] +// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)] +// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2082,7 +2082,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -2099,7 +2099,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -2115,7 +2115,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -2131,7 +2131,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -2148,7 +2148,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -2165,7 +2165,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -2181,7 +2181,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -2197,7 +2197,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %interface: = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -2222,9 +2222,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2267,9 +2267,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2308,14 +2308,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %C.4; +// CHECK:STDOUT: fn @F() -> %C.3; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc10_26: ref %C.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc10_26 -// CHECK:STDOUT: %.loc10_27: %C.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc10_26: ref %C.3 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc10_26 +// CHECK:STDOUT: %.loc10_27: %C.2 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2363,7 +2363,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2409,8 +2409,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2490,7 +2490,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2536,8 +2536,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -2588,24 +2588,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.27 -// CHECK:STDOUT: %.2 => constants.%.28 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.23) { -// CHECK:STDOUT: %N => constants.%.23 -// CHECK:STDOUT: %N.patt => constants.%.23 +// CHECK:STDOUT: specific @impl.1(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 +// CHECK:STDOUT: %N.patt => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.30 +// CHECK:STDOUT: %interface => constants.%interface.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.23) { -// CHECK:STDOUT: %N => constants.%.23 +// CHECK:STDOUT: specific @Convert.2(constants.%int_32) { +// CHECK:STDOUT: %N => constants.%int_32 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2625,16 +2625,16 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%C.3) { -// CHECK:STDOUT: %Dest => constants.%C.3 -// CHECK:STDOUT: %Dest.patt => constants.%C.3 +// CHECK:STDOUT: specific @ImplicitAs(constants.%C.2) { +// CHECK:STDOUT: %Dest => constants.%C.2 +// CHECK:STDOUT: %Dest.patt => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.15 // CHECK:STDOUT: %Convert => constants.%Convert.15 -// CHECK:STDOUT: %.1 => constants.%.40 -// CHECK:STDOUT: %.2 => constants.%.41 +// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.6 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index a09d0c1f61999..171527e50217a 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -13,34 +13,34 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: --- nested_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, %i32) [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 76 [template] +// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] +// CHECK:STDOUT: %int_76.1: Core.IntLiteral = int_value 76 [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.6, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 76 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%.33, %.36) [template] -// CHECK:STDOUT: %.37: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %.39) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_76.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_76.2: %i32 = int_value 76 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%int_12.2, %int_76.2) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %int_6.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,13 +58,13 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_10: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_10: init type = call constants.%Int(%.loc11_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%.loc11_15) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_10: init type = call constants.%Int(%int_32.loc11_10) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] // CHECK:STDOUT: %.loc11_18: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_10, %int.make_type_signed.loc11_15) -// CHECK:STDOUT: %.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%.loc11_21) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] // CHECK:STDOUT: %.loc11_24.1: %tuple.type.2 = tuple_literal (%.loc11_18, %int.make_type_signed.loc11_21) // CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %int.make_type_signed.loc11_10 [template = constants.%i32] // CHECK:STDOUT: %.loc11_24.3: type = converted %int.make_type_signed.loc11_10, %.loc11_24.2 [template = constants.%i32] @@ -80,37 +80,37 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_30: Core.IntLiteral = int_value 12 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_34: Core.IntLiteral = int_value 76 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_36.1: %tuple.type.6 = tuple_literal (%.loc11_30, %.loc11_34) -// CHECK:STDOUT: %.loc11_39: Core.IntLiteral = int_value 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_40.1: %tuple.type.7 = tuple_literal (%.loc11_36.1, %.loc11_39) -// CHECK:STDOUT: %.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.3: = bound_method %.loc11_30, %.loc11_36.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_36.4: = specific_function %.loc11_36.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %.loc11_36.4(%.loc11_30) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_36.5: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_36.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.2: ref %tuple.type.3 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_36.6: ref %i32 = tuple_access %.loc11_40.2, element0 -// CHECK:STDOUT: %.loc11_36.7: init %i32 = initialize_from %.loc11_36.5 to %.loc11_36.6 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_36.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.9: = bound_method %.loc11_34, %.loc11_36.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_36.10: = specific_function %.loc11_36.9, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %.loc11_36.10(%.loc11_34) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_36.11: init %i32 = converted %.loc11_34, %int.convert_checked.loc11_36.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_36.12: ref %i32 = tuple_access %.loc11_40.2, element1 -// CHECK:STDOUT: %.loc11_36.13: init %i32 = initialize_from %.loc11_36.11 to %.loc11_36.12 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_36.14: init %tuple.type.3 = tuple_init (%.loc11_36.7, %.loc11_36.13) to %.loc11_40.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_40.3: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.14 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_40.4: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_40.5: = bound_method %.loc11_39, %.loc11_40.4 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_40.6: = specific_function %.loc11_40.5, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %.loc11_40.6(%.loc11_39) [template = constants.%.39] -// CHECK:STDOUT: %.loc11_40.7: init %i32 = converted %.loc11_39, %int.convert_checked.loc11_40 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_40.8: ref %i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_40.9: init %i32 = initialize_from %.loc11_40.7 to %.loc11_40.8 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_40.10: init %tuple.type.4 = tuple_init (%.loc11_40.3, %.loc11_40.9) to file.%x.var [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc11_41: init %tuple.type.4 = converted %.loc11_40.1, %.loc11_40.10 [template = constants.%tuple.2] +// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] +// CHECK:STDOUT: %int_76: Core.IntLiteral = int_value 76 [template = constants.%int_76.1] +// CHECK:STDOUT: %.loc11_36.1: %tuple.type.6 = tuple_literal (%int_12, %int_76) +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc11_40.1: %tuple.type.7 = tuple_literal (%.loc11_36.1, %int_6) +// CHECK:STDOUT: %impl.elem0.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_36.1: = bound_method %int_12, %impl.elem0.loc11_36.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_36.1: = specific_function %Convert.bound.loc11_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %Convert.specific_fn.loc11_36.1(%int_12) [template = constants.%int_12.2] +// CHECK:STDOUT: %.loc11_36.2: init %i32 = converted %int_12, %int.convert_checked.loc11_36.1 [template = constants.%int_12.2] +// CHECK:STDOUT: %tuple.elem0.loc11_40: ref %tuple.type.3 = tuple_access file.%x.var, element0 +// CHECK:STDOUT: %tuple.elem0.loc11_36: ref %i32 = tuple_access %tuple.elem0.loc11_40, element0 +// CHECK:STDOUT: %.loc11_36.3: init %i32 = initialize_from %.loc11_36.2 to %tuple.elem0.loc11_36 [template = constants.%int_12.2] +// CHECK:STDOUT: %impl.elem0.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_36.2: = bound_method %int_76, %impl.elem0.loc11_36.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_36.2: = specific_function %Convert.bound.loc11_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %Convert.specific_fn.loc11_36.2(%int_76) [template = constants.%int_76.2] +// CHECK:STDOUT: %.loc11_36.4: init %i32 = converted %int_76, %int.convert_checked.loc11_36.2 [template = constants.%int_76.2] +// CHECK:STDOUT: %tuple.elem1.loc11_36: ref %i32 = tuple_access %tuple.elem0.loc11_40, element1 +// CHECK:STDOUT: %.loc11_36.5: init %i32 = initialize_from %.loc11_36.4 to %tuple.elem1.loc11_36 [template = constants.%int_76.2] +// CHECK:STDOUT: %.loc11_36.6: init %tuple.type.3 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %tuple.elem0.loc11_40 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_40.2: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %impl.elem0.loc11_40: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_40: = bound_method %int_6, %impl.elem0.loc11_40 [template = constants.%Convert.bound.3] +// CHECK:STDOUT: %Convert.specific_fn.loc11_40: = specific_function %Convert.bound.loc11_40, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %Convert.specific_fn.loc11_40(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_40.3: init %i32 = converted %int_6, %int.convert_checked.loc11_40 [template = constants.%int_6.2] +// CHECK:STDOUT: %tuple.elem1.loc11_40: ref %i32 = tuple_access file.%x.var, element1 +// CHECK:STDOUT: %.loc11_40.4: init %i32 = initialize_from %.loc11_40.3 to %tuple.elem1.loc11_40 [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc11_40.5: init %tuple.type.4 = tuple_init (%.loc11_40.2, %.loc11_40.4) to file.%x.var [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc11_41: init %tuple.type.4 = converted %.loc11_40.1, %.loc11_40.5 [template = constants.%tuple.2] // CHECK:STDOUT: assign file.%x.var, %.loc11_41 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 7e9a6be0f0462..1fae1ef7835b7 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -21,10 +21,10 @@ fn H() { // CHECK:STDOUT: --- nested_tuple_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -37,19 +37,19 @@ fn H() { // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, %tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %tuple.type.2, %i32) [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (Core.IntLiteral, %tuple.type.2, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,12 +73,12 @@ fn H() { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%.loc11_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%.loc11_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] @@ -98,19 +98,19 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%.loc14_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%.loc14_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%int_32.loc14_12) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%int_32.loc14_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] // CHECK:STDOUT: %.loc14_25: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_12, %int.make_type_signed.loc14_17, %int.make_type_signed.loc14_22) -// CHECK:STDOUT: %.loc14_29: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_29: init type = call constants.%Int(%.loc14_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_34: init type = call constants.%Int(%.loc14_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_39: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call constants.%Int(%.loc14_39) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_29: init type = call constants.%Int(%int_32.loc14_29) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_34: init type = call constants.%Int(%int_32.loc14_34) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call constants.%Int(%int_32.loc14_39) [template = constants.%i32] // CHECK:STDOUT: %.loc14_42: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_29, %int.make_type_signed.loc14_34, %int.make_type_signed.loc14_39) // CHECK:STDOUT: %.loc14_43.1: %tuple.type.3 = tuple_literal (%.loc14_25, %.loc14_42) // CHECK:STDOUT: %.loc14_43.2: type = value_of_initializer %int.make_type_signed.loc14_12 [template = constants.%i32] @@ -131,31 +131,31 @@ fn H() { // CHECK:STDOUT: %v.var: ref %tuple.type.4 = var v // CHECK:STDOUT: %v: ref %tuple.type.4 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_48: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.1: ref %tuple.type.2 = tuple_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_50: init %tuple.type.2 = call %F.ref.loc14_48() to %.loc14_56.1 +// CHECK:STDOUT: %tuple.elem0: ref %tuple.type.2 = tuple_access %v.var, element0 +// CHECK:STDOUT: %F.call.loc14_50: init %tuple.type.2 = call %F.ref.loc14_48() to %tuple.elem0 // CHECK:STDOUT: %F.ref.loc14_53: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.2: ref %tuple.type.2 = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_55: init %tuple.type.2 = call %F.ref.loc14_53() to %.loc14_56.2 -// CHECK:STDOUT: %.loc14_56.3: %tuple.type.4 = tuple_literal (%F.call.loc14_50, %F.call.loc14_55) -// CHECK:STDOUT: %.loc14_56.4: init %tuple.type.4 = tuple_init (%F.call.loc14_50, %F.call.loc14_55) to %v.var -// CHECK:STDOUT: %.loc14_57: init %tuple.type.4 = converted %.loc14_56.3, %.loc14_56.4 +// CHECK:STDOUT: %tuple.elem1: ref %tuple.type.2 = tuple_access %v.var, element1 +// CHECK:STDOUT: %F.call.loc14_55: init %tuple.type.2 = call %F.ref.loc14_53() to %tuple.elem1 +// CHECK:STDOUT: %.loc14_56.1: %tuple.type.4 = tuple_literal (%F.call.loc14_50, %F.call.loc14_55) +// CHECK:STDOUT: %.loc14_56.2: init %tuple.type.4 = tuple_init (%F.call.loc14_50, %F.call.loc14_55) to %v.var +// CHECK:STDOUT: %.loc14_57: init %tuple.type.4 = converted %.loc14_56.1, %.loc14_56.2 // CHECK:STDOUT: assign %v.var, %.loc14_57 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%.loc18_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_17: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_17: init type = call constants.%Int(%.loc18_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_22: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_22: init type = call constants.%Int(%.loc18_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%.loc18_27) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%int_32.loc18_11) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_17: init type = call constants.%Int(%int_32.loc18_17) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_22: init type = call constants.%Int(%int_32.loc18_22) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%int_32.loc18_27) [template = constants.%i32] // CHECK:STDOUT: %.loc18_30: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_17, %int.make_type_signed.loc18_22, %int.make_type_signed.loc18_27) -// CHECK:STDOUT: %.loc18_33: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc18_33: init type = call constants.%Int(%.loc18_33) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc18_33: init type = call constants.%Int(%int_32.loc18_33) [template = constants.%i32] // CHECK:STDOUT: %.loc18_36.1: %tuple.type.6 = tuple_literal (%int.make_type_signed.loc18_11, %.loc18_30, %int.make_type_signed.loc18_33) // CHECK:STDOUT: %.loc18_36.2: type = value_of_initializer %int.make_type_signed.loc18_11 [template = constants.%i32] // CHECK:STDOUT: %.loc18_36.3: type = converted %int.make_type_signed.loc18_11, %.loc18_36.2 [template = constants.%i32] @@ -171,28 +171,28 @@ fn H() { // CHECK:STDOUT: %.loc18_36.13: type = converted %.loc18_36.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %v.var: ref %tuple.type.7 = var v // CHECK:STDOUT: %v: ref %tuple.type.7 = bind_name v, %v.var -// CHECK:STDOUT: %.loc18_41: Core.IntLiteral = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc18_50.1: ref %tuple.type.2 = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %.loc18_50.1 -// CHECK:STDOUT: %.loc18_49: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc18_50.2: %tuple.type.9 = tuple_literal (%.loc18_41, %F.call, %.loc18_49) -// CHECK:STDOUT: %.loc18_50.3: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_50.4: = bound_method %.loc18_41, %.loc18_50.3 [template = constants.%.31] -// CHECK:STDOUT: %.loc18_50.5: = specific_function %.loc18_50.4, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %.loc18_50.5(%.loc18_41) [template = constants.%.33] -// CHECK:STDOUT: %.loc18_50.6: init %i32 = converted %.loc18_41, %int.convert_checked.loc18_50.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_50.7: ref %i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc18_50.8: init %i32 = initialize_from %.loc18_50.6 to %.loc18_50.7 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_50.9: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_50.10: = bound_method %.loc18_49, %.loc18_50.9 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_50.11: = specific_function %.loc18_50.10, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %.loc18_50.11(%.loc18_49) [template = constants.%.36] -// CHECK:STDOUT: %.loc18_50.12: init %i32 = converted %.loc18_49, %int.convert_checked.loc18_50.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_50.13: ref %i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc18_50.14: init %i32 = initialize_from %.loc18_50.12 to %.loc18_50.13 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_50.15: init %tuple.type.7 = tuple_init (%.loc18_50.8, %F.call, %.loc18_50.14) to %v.var -// CHECK:STDOUT: %.loc18_51: init %tuple.type.7 = converted %.loc18_50.2, %.loc18_50.15 +// CHECK:STDOUT: %tuple.elem1: ref %tuple.type.2 = tuple_access %v.var, element1 +// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %tuple.elem1 +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc18_50.1: %tuple.type.9 = tuple_literal (%int_1, %F.call, %int_2) +// CHECK:STDOUT: %impl.elem0.loc18_50.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_50.1: = bound_method %int_1, %impl.elem0.loc18_50.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc18_50.1: = specific_function %Convert.bound.loc18_50.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %Convert.specific_fn.loc18_50.1(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc18_50.2: init %i32 = converted %int_1, %int.convert_checked.loc18_50.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 +// CHECK:STDOUT: %.loc18_50.3: init %i32 = initialize_from %.loc18_50.2 to %tuple.elem0 [template = constants.%int_1.2] +// CHECK:STDOUT: %impl.elem0.loc18_50.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc18_50.2: = bound_method %int_2, %impl.elem0.loc18_50.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc18_50.2: = specific_function %Convert.bound.loc18_50.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %Convert.specific_fn.loc18_50.2(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc18_50.4: init %i32 = converted %int_2, %int.convert_checked.loc18_50.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %v.var, element2 +// CHECK:STDOUT: %.loc18_50.5: init %i32 = initialize_from %.loc18_50.4 to %tuple.elem2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc18_50.6: init %tuple.type.7 = tuple_init (%.loc18_50.3, %F.call, %.loc18_50.5) to %v.var +// CHECK:STDOUT: %.loc18_51: init %tuple.type.7 = converted %.loc18_50.1, %.loc18_50.6 // CHECK:STDOUT: assign %v.var, %.loc18_51 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 62d833e9503f7..46e962d71c4d9 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -14,22 +14,22 @@ var y: (i32,) = x; // CHECK:STDOUT: --- one_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 4 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,16 +48,16 @@ var y: (i32,) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] @@ -68,21 +68,21 @@ var y: (i32,) = x; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 4 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_20.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_20.3: = bound_method %.loc11_18, %.loc11_20.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_20.4: = specific_function %.loc11_20.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_20.4(%.loc11_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_20.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc11_20.6: init %tuple.type.2 = tuple_init (%.loc11_20.5) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_21: init %tuple.type.2 = converted %.loc11_20.1, %.loc11_20.6 [template = constants.%tuple] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%int_4) +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_20.2: init %i32 = converted %int_4, %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_20.3: init %tuple.type.2 = tuple_init (%.loc11_20.2) to file.%x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_21: init %tuple.type.2 = converted %.loc11_20.1, %.loc11_20.3 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc11_21 // CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_17.1: ref %i32 = tuple_access %x.ref, element0 -// CHECK:STDOUT: %.loc12_17.2: %i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%y.var -// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %x.ref, %.loc12_17.3 +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 +// CHECK:STDOUT: %.loc12_17.1: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %.loc12_17.2: init %tuple.type.2 = tuple_init (%.loc12_17.1) to file.%y.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %x.ref, %.loc12_17.2 // CHECK:STDOUT: assign file.%y.var, %.loc12_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 324b8b2b4548b..6f25825be6abe 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -17,26 +17,26 @@ var y: (i32, i32) = x; // CHECK:STDOUT: --- two_elements.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 102 [template] +// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %int_102.1: Core.IntLiteral = int_value 102 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 102 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_102.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] +// CHECK:STDOUT: %int_102.2: %i32 = int_value 102 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2, %int_102.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,30 +57,30 @@ var y: (i32, i32) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%.loc12_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc12_14: init type = call constants.%Int(%.loc12_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%int_32.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc12_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc12_14: init type = call constants.%Int(%int_32.loc12_14) [template = constants.%i32] // CHECK:STDOUT: %.loc12_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_9, %int.make_type_signed.loc12_14) // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_signed.loc12_9 [template = constants.%i32] // CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_signed.loc12_9, %.loc12_17.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_17.4: type = value_of_initializer %int.make_type_signed.loc12_14 [template = constants.%i32] // CHECK:STDOUT: %.loc12_17.5: type = converted %int.make_type_signed.loc12_14, %.loc12_17.4 [template = constants.%i32] // CHECK:STDOUT: %.loc12_17.6: type = converted %.loc12_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%.loc14_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%.loc14_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] // CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_9, %int.make_type_signed.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_signed.loc14_9, %.loc14_17.2 [template = constants.%i32] @@ -89,10 +89,10 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_9: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_9: init type = call constants.%Int(%.loc15_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc15_14: init type = call constants.%Int(%.loc15_14) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_9: init type = call constants.%Int(%int_32.loc15_9) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc15_14: init type = call constants.%Int(%int_32.loc15_14) [template = constants.%i32] // CHECK:STDOUT: %.loc15_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc15_9, %int.make_type_signed.loc15_14) // CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_signed.loc15_9 [template = constants.%i32] // CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_signed.loc15_9, %.loc15_17.2 [template = constants.%i32] @@ -105,57 +105,57 @@ var y: (i32, i32) = x; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 102 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.5: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.6: %i32 = converted %.loc11_22, %.loc11_28.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_28.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.8: = bound_method %.loc11_25, %.loc11_28.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_28.9: = specific_function %.loc11_28.8, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.9(%.loc11_25) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.10: %i32 = value_of_initializer %int.convert_checked.loc11_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_28.11: %i32 = converted %.loc11_25, %.loc11_28.10 [template = constants.%.34] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_28.6, %.loc11_28.11) [template = constants.%tuple] +// CHECK:STDOUT: %int_4.loc11: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_102.loc11: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] +// CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_4.loc11, %int_102.loc11) +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_4.loc11, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_4.loc11) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_28.2: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc11_28.3: %i32 = converted %int_4.loc11, %.loc11_28.2 [template = constants.%int_4.2] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_102.loc11, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_102.loc11) [template = constants.%int_102.2] +// CHECK:STDOUT: %.loc11_28.4: %i32 = value_of_initializer %int.convert_checked.loc11_28.2 [template = constants.%int_102.2] +// CHECK:STDOUT: %.loc11_28.5: %i32 = converted %int_102.loc11, %.loc11_28.4 [template = constants.%int_102.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_28.3, %.loc11_28.5) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_29: %tuple.type.2 = converted %.loc11_28.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %v: %tuple.type.2 = bind_name v, %.loc11_29 // CHECK:STDOUT: %v.ref: %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %w: %tuple.type.2 = bind_name w, %v.ref -// CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_25: Core.IntLiteral = int_value 102 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_28.1: %tuple.type.3 = tuple_literal (%.loc14_22, %.loc14_25) -// CHECK:STDOUT: %.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_28.3: = bound_method %.loc14_22, %.loc14_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_28.4: = specific_function %.loc14_28.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %.loc14_28.4(%.loc14_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc14_28.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_28.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_28.6: ref %i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_28.7: init %i32 = initialize_from %.loc14_28.5 to %.loc14_28.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_28.9: = bound_method %.loc14_25, %.loc14_28.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_28.10: = specific_function %.loc14_28.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %.loc14_28.10(%.loc14_25) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_28.11: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_28.12: ref %i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_28.13: init %i32 = initialize_from %.loc14_28.11 to %.loc14_28.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_28.14: init %tuple.type.2 = tuple_init (%.loc14_28.7, %.loc14_28.13) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_29: init %tuple.type.2 = converted %.loc14_28.1, %.loc14_28.14 [template = constants.%tuple] +// CHECK:STDOUT: %int_4.loc14: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] +// CHECK:STDOUT: %int_102.loc14: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] +// CHECK:STDOUT: %.loc14_28.1: %tuple.type.3 = tuple_literal (%int_4.loc14, %int_102.loc14) +// CHECK:STDOUT: %impl.elem0.loc14_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_28.1: = bound_method %int_4.loc14, %impl.elem0.loc14_28.1 [template = constants.%Convert.bound.1] +// CHECK:STDOUT: %Convert.specific_fn.loc14_28.1: = specific_function %Convert.bound.loc14_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %Convert.specific_fn.loc14_28.1(%int_4.loc14) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_4.loc14, %int.convert_checked.loc14_28.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access file.%x.var, element0 +// CHECK:STDOUT: %.loc14_28.3: init %i32 = initialize_from %.loc14_28.2 to %tuple.elem0.loc14 [template = constants.%int_4.2] +// CHECK:STDOUT: %impl.elem0.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %Convert.bound.loc14_28.2: = bound_method %int_102.loc14, %impl.elem0.loc14_28.2 [template = constants.%Convert.bound.2] +// CHECK:STDOUT: %Convert.specific_fn.loc14_28.2: = specific_function %Convert.bound.loc14_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %Convert.specific_fn.loc14_28.2(%int_102.loc14) [template = constants.%int_102.2] +// CHECK:STDOUT: %.loc14_28.4: init %i32 = converted %int_102.loc14, %int.convert_checked.loc14_28.2 [template = constants.%int_102.2] +// CHECK:STDOUT: %tuple.elem1.loc14: ref %i32 = tuple_access file.%x.var, element1 +// CHECK:STDOUT: %.loc14_28.5: init %i32 = initialize_from %.loc14_28.4 to %tuple.elem1.loc14 [template = constants.%int_102.2] +// CHECK:STDOUT: %.loc14_28.6: init %tuple.type.2 = tuple_init (%.loc14_28.3, %.loc14_28.5) to file.%x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_29: init %tuple.type.2 = converted %.loc14_28.1, %.loc14_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc14_29 // CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, file.%x -// CHECK:STDOUT: %.loc15_21.1: ref %i32 = tuple_access %x.ref, element0 -// CHECK:STDOUT: %.loc15_21.2: %i32 = bind_value %.loc15_21.1 -// CHECK:STDOUT: %.loc15_21.3: ref %i32 = tuple_access file.%y.var, element0 -// CHECK:STDOUT: %.loc15_21.4: init %i32 = initialize_from %.loc15_21.2 to %.loc15_21.3 -// CHECK:STDOUT: %.loc15_21.5: ref %i32 = tuple_access %x.ref, element1 -// 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 %tuple.type.2 = tuple_init (%.loc15_21.4, %.loc15_21.8) to file.%y.var -// CHECK:STDOUT: %.loc15_22: init %tuple.type.2 = converted %x.ref, %.loc15_21.9 +// CHECK:STDOUT: %tuple.elem0.loc15_21.1: ref %i32 = tuple_access %x.ref, element0 +// CHECK:STDOUT: %.loc15_21.1: %i32 = bind_value %tuple.elem0.loc15_21.1 +// CHECK:STDOUT: %tuple.elem0.loc15_21.2: ref %i32 = tuple_access file.%y.var, element0 +// CHECK:STDOUT: %.loc15_21.2: init %i32 = initialize_from %.loc15_21.1 to %tuple.elem0.loc15_21.2 +// CHECK:STDOUT: %tuple.elem1.loc15_21.1: ref %i32 = tuple_access %x.ref, element1 +// CHECK:STDOUT: %.loc15_21.3: %i32 = bind_value %tuple.elem1.loc15_21.1 +// CHECK:STDOUT: %tuple.elem1.loc15_21.2: ref %i32 = tuple_access file.%y.var, element1 +// CHECK:STDOUT: %.loc15_21.4: init %i32 = initialize_from %.loc15_21.3 to %tuple.elem1.loc15_21.2 +// CHECK:STDOUT: %.loc15_21.5: init %tuple.type.2 = tuple_init (%.loc15_21.2, %.loc15_21.4) to file.%y.var +// CHECK:STDOUT: %.loc15_22: init %tuple.type.2 = converted %x.ref, %.loc15_21.5 // 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 732f7a9a45004..81726b2ea89ad 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -31,11 +31,11 @@ fn F(x: X) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: String = string_literal "hello" [template] +// CHECK:STDOUT: %str: String = string_literal "hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,18 +64,18 @@ fn F(x: X) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: complete_type_witness = %.loc12 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%x.param_patt: %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: %str: String = string_literal "hello" [template = constants.%str] // CHECK:STDOUT: assign %s.var, // CHECK:STDOUT: %X.ref.loc27: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %y.var: ref %X = var y diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index f43a8aa6dad4d..3e55f28c4fced 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -23,7 +23,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,11 +45,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_10.1: Core.IntLiteral = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc18_10.2: type = converted %.loc18_10.1, [template = ] +// CHECK:STDOUT: %int_1.loc18_10: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %.loc18: type = converted %int_1.loc18_10, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var -// CHECK:STDOUT: %.loc18_14: Core.IntLiteral = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int_1.loc18_14: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon index ef690ffb932ec..adf88eb0e8ec8 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -59,7 +59,7 @@ var y2: bool = false or true; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -103,7 +103,7 @@ var y2: bool = false or true; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc23 br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: } // 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 278e35d9bffb8..02f8b4a5f179d 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 @@ -21,7 +21,7 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -34,14 +34,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc15_11.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %x.var: ref %empty_struct_type = var x +// CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var // CHECK:STDOUT: %.loc15_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_16.2: %empty_tuple.type = converted %.loc15_16.1, %empty_tuple [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_17: %.1 = converted %.loc15_16.1, [template = ] +// CHECK:STDOUT: %.loc15_17: %empty_struct_type = converted %.loc15_16.1, [template = ] // CHECK:STDOUT: assign %x.var, // 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 ef155eb1cb9f5..01e8dcc73ddd6 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl.carbon @@ -14,7 +14,7 @@ var x: {.v: ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -23,8 +23,8 @@ var x: {.v: ()}; // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %x.var: ref %struct_type.v = var x +// CHECK:STDOUT: %x: ref %struct_type.v = 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 978480f63ac31..492213c011710 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,9 +14,9 @@ var x: {.v: ()} = {.v = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct: %struct_type.v = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -25,20 +25,20 @@ var x: {.v: ()} = {.v = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %x.var: ref %struct_type.v = var x +// CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.1: %struct_type.v = struct_literal (%.loc11_26.1) // CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_27.4: init %struct_type.v = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %struct_type.v = 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 c12791d38adfc..73efcf10599e7 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: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct: %struct_type.v = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,33 +27,33 @@ var y: {.v: ()} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %struct_type.v.loc11: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %x.var: ref %struct_type.v = var x +// CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: %.loc12_14.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_14.2: type = converted %.loc12_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc12_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref %.1 = var y -// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var +// CHECK:STDOUT: %struct_type.v.loc12: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %y.var: ref %struct_type.v = var y +// CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.1: %struct_type.v = struct_literal (%.loc11_26.1) // CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_27.4: init %struct_type.v = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %struct_type.v = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %struct_type.v = name_ref x, file.%x // CHECK:STDOUT: %.loc12_19.1: ref %empty_tuple.type = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc12_19.2: ref %empty_tuple.type = struct_access file.%y.var, element0 // CHECK:STDOUT: %.loc12_19.3: init %empty_tuple.type = tuple_init () to %.loc12_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc12_19.4: init %empty_tuple.type = converted %.loc12_19.1, %.loc12_19.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_19.5: init %.1 = struct_init (%.loc12_19.4) to file.%y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_20: init %.1 = converted %x.ref, %.loc12_19.5 [template = constants.%struct] +// CHECK:STDOUT: %.loc12_19.5: init %struct_type.v = struct_init (%.loc12_19.4) to file.%y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_20: init %struct_type.v = 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 70027cfbf584b..4f2fd135abd92 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,9 +18,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %struct: %struct_type.v = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -32,9 +32,9 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %x.var: ref %struct_type.v = var x +// CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,16 +42,16 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_16.2: type = converted %.loc14_16.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc14_17: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref %.1 = var y -// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x +// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] +// CHECK:STDOUT: %y.var: ref %struct_type.v = var y +// CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var +// CHECK:STDOUT: %x.ref: ref %struct_type.v = name_ref x, file.%x // CHECK:STDOUT: %.loc14_21.1: ref %empty_tuple.type = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc14_21.2: ref %empty_tuple.type = struct_access %y.var, element0 // CHECK:STDOUT: %.loc14_21.3: init %empty_tuple.type = tuple_init () to %.loc14_21.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc14_21.4: init %empty_tuple.type = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc14_21.5: init %.1 = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_22: init %.1 = converted %x.ref, %.loc14_21.5 [template = constants.%struct] +// CHECK:STDOUT: %.loc14_21.5: init %struct_type.v = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_22: init %struct_type.v = converted %x.ref, %.loc14_21.5 [template = constants.%struct] // CHECK:STDOUT: assign %y.var, %.loc14_22 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -59,12 +59,12 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.1: %struct_type.v = struct_literal (%.loc11_26.1) // CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_27.4: init %struct_type.v = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %struct_type.v = 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/shadowing.carbon b/toolchain/check/testdata/var/no_prelude/shadowing.carbon index b26899d53e7f2..6137bed2d9b5a 100644 --- a/toolchain/check/testdata/var/no_prelude/shadowing.carbon +++ b/toolchain/check/testdata/var/no_prelude/shadowing.carbon @@ -30,7 +30,7 @@ fn Main() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,8 +65,8 @@ fn Main() { // CHECK:STDOUT: %.loc17_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc17 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc17_17: init %empty_tuple.type = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc17, %.loc17_17 -// CHECK:STDOUT: %.loc18: bool = bool_literal true [template = constants.%.1] -// CHECK:STDOUT: if %.loc18 br !if.then else br !if.else +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %.loc19_13.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 31c39c792fd58..9e4fc1f4f036f 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -166,11 +166,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.1: %J.type.1 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.2: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] +// CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %I.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, @I.%Member [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type.1, %J.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%Second [template] +// CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type.1, %J.type.1 [template] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, @I.%Second [template] // CHECK:STDOUT: %.Self.1: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %I.type.2: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %U: %I.type.2 = bind_symbolic_name U, 0 [symbolic] @@ -178,15 +178,15 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %EqualEqual.type: type = fn_type @EqualEqual [template] // CHECK:STDOUT: %EqualEqual: %EqualEqual.type = struct_value () [template] // CHECK:STDOUT: %.Self.2: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %.Self.2 [symbolic] +// CHECK:STDOUT: %.Self.as_type.1: type = facet_access_type %.Self.2 [symbolic] // CHECK:STDOUT: %J.type.2: type = facet_type <@J where TODO> [template] // CHECK:STDOUT: %V: %J.type.2 = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %J.type.2 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = facet_access_type %.Self.1 [symbolic] -// CHECK:STDOUT: %.7: = facet_access_witness %.Self.1 [symbolic] -// CHECK:STDOUT: %.8: type = interface_witness_access %.7, element0 [symbolic] +// CHECK:STDOUT: %.Self.as_type.2: type = facet_access_type %.Self.1 [symbolic] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.1 [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %W: %I.type.3 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: %I.type.3 = symbolic_binding_pattern W, 0 [symbolic] @@ -235,10 +235,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.Self.ref: %J.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type.1] -// CHECK:STDOUT: %.loc13_22.1: type = facet_access_type %.Self.ref [symbolic = constants.%.5] -// CHECK:STDOUT: %.loc13_22.2: type = converted %.Self.ref, %.loc13_22.1 [symbolic = constants.%.5] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type.1] +// CHECK:STDOUT: %.loc13_22: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type.1] // CHECK:STDOUT: %.loc13_16: type = where_expr %.Self [template = constants.%J.type.2] { -// CHECK:STDOUT: requirement_impls %.loc13_22.2, %I.ref +// CHECK:STDOUT: requirement_impls %.loc13_22, %I.ref // CHECK:STDOUT: } // CHECK:STDOUT: %V.param: %J.type.2 = value_param runtime_param // CHECK:STDOUT: %V.loc13_10.1: %J.type.2 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc13_10.2 (constants.%V)] @@ -251,16 +251,16 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref.loc15_20: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type.1] -// CHECK:STDOUT: %.loc15_20.1: type = facet_access_type %.Self.ref.loc15_20 [symbolic = constants.%.6] -// CHECK:STDOUT: %.loc15_20.2: type = converted %.Self.ref.loc15_20, %.loc15_20.1 [symbolic = constants.%.6] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref.loc15_20 [symbolic = constants.%.Self.as_type.2] +// CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref.loc15_20, %.Self.as_type [symbolic = constants.%.Self.as_type.2] // CHECK:STDOUT: %.Self.ref.loc15_38: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc7 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_38.1: = facet_access_witness %.Self.ref.loc15_38 [symbolic = constants.%.7] -// CHECK:STDOUT: %.loc15_38.2: type = interface_witness_access %.loc15_38.1, element0 [symbolic = constants.%.8] +// CHECK:STDOUT: %Member.ref: %assoc_type.1 = name_ref Member, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref.loc15_38 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [template = constants.%I.type.3] { -// CHECK:STDOUT: requirement_impls %.loc15_20.2, %J.ref -// CHECK:STDOUT: requirement_equivalent %.loc15_38.2, %.loc15_50 +// CHECK:STDOUT: requirement_impls %.loc15_20, %J.ref +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc15_50 // CHECK:STDOUT: } // CHECK:STDOUT: %W.param: %I.type.3 = value_param runtime_param // CHECK:STDOUT: %W.loc15_8.1: %I.type.3 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc15_8.2 (constants.%W)] @@ -278,15 +278,15 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %Member [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %Member [template = constants.%assoc0] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type.1] // CHECK:STDOUT: %Second: %J.type.1 = assoc_const_decl Second [template] -// CHECK:STDOUT: %.loc8: %.3 = assoc_entity element1, %Second [template = constants.%.4] +// CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %Second [template = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Member = %.loc7 -// CHECK:STDOUT: .Second = %.loc8 +// CHECK:STDOUT: .Member = %assoc0 +// CHECK:STDOUT: .Second = %assoc1 // CHECK:STDOUT: witness = (%Member, %Second) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -331,12 +331,12 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %N.type.1: type = facet_type <@N> [template] // CHECK:STDOUT: %Self: %N.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %N.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @N.%P [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %N.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @N.%P [template] // CHECK:STDOUT: %.Self: %N.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self [symbolic] -// CHECK:STDOUT: %.4: type = interface_witness_access %.3, element0 [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %N.type.2: type = facet_type <@N where TODO> [template] // CHECK:STDOUT: %T: %N.type.2 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %N.type.2 = symbolic_binding_pattern T, 0 [symbolic] @@ -366,13 +366,13 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [template = constants.%N.type.1] // CHECK:STDOUT: %.Self: %N.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %N.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %P.ref: %.1 = name_ref P, @N.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_22.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc8_22.2: type = interface_witness_access %.loc8_22.1, element0 [symbolic = constants.%.4] -// CHECK:STDOUT: %.loc8_28.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @N.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc8_28.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %.loc8_16: type = where_expr %.Self [template = constants.%N.type.2] { -// CHECK:STDOUT: requirement_rewrite %.loc8_22.2, %.loc8_28.2 +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: %T.param: %N.type.2 = value_param runtime_param // CHECK:STDOUT: %T.loc8_10.1: %N.type.2 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_10.2 (constants.%T)] @@ -382,11 +382,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: interface @N { // CHECK:STDOUT: %Self: %N.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %P: type = assoc_const_decl P [template] -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %P [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %P [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .P = %.loc5 +// CHECK:STDOUT: .P = %assoc0 // CHECK:STDOUT: witness = (%P) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -411,12 +411,12 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.2: %M.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type.1: type = facet_type <@K> [template] // CHECK:STDOUT: %Self.3: %K.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %K.type.1, %L.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @K.%Associated [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %K.type.1, %L.type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @K.%Associated [template] // CHECK:STDOUT: %.Self: %K.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self [symbolic] -// CHECK:STDOUT: %.4: %L.type = interface_witness_access %.3, element0 [symbolic] -// CHECK:STDOUT: %.5: type = facet_access_type %.4 [symbolic] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] +// CHECK:STDOUT: %impl.elem0: %L.type = interface_witness_access %.Self.as_wit, element0 [symbolic] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic] // CHECK:STDOUT: %K.type.2: type = facet_type <@K where TODO> [template] // CHECK:STDOUT: %W: %K.type.2 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: %K.type.2 = symbolic_binding_pattern W, 0 [symbolic] @@ -450,14 +450,14 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type.1] // CHECK:STDOUT: %.Self: %K.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %K.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Associated.ref: %.1 = name_ref Associated, @K.%.loc8 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_36.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc11_36.2: %L.type = interface_witness_access %.loc11_36.1, element0 [symbolic = constants.%.4] +// CHECK:STDOUT: %Associated.ref: %assoc_type = name_ref Associated, @K.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: %L.type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [template = constants.%M.type] -// CHECK:STDOUT: %.loc11_36.3: type = facet_access_type %.loc11_36.2 [symbolic = constants.%.5] -// CHECK:STDOUT: %.loc11_36.4: type = converted %.loc11_36.2, %.loc11_36.3 [symbolic = constants.%.5] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic = constants.%as_type] +// CHECK:STDOUT: %.loc11_36: type = converted %impl.elem0, %as_type [symbolic = constants.%as_type] // CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [template = constants.%K.type.2] { -// CHECK:STDOUT: requirement_impls %.loc11_36.4, %M.ref +// CHECK:STDOUT: requirement_impls %.loc11_36, %M.ref // CHECK:STDOUT: } // CHECK:STDOUT: %W.param: %K.type.2 = value_param runtime_param // CHECK:STDOUT: %W.loc11_24.1: %K.type.2 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc11_24.2 (constants.%W)] @@ -484,11 +484,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %K.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %Associated: %L.type = assoc_const_decl Associated [template] -// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %Associated [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %Associated [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Associated = %.loc8 +// CHECK:STDOUT: .Associated = %assoc0 // CHECK:STDOUT: witness = (%Associated) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -509,11 +509,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type.1: type = facet_type <@I> [template] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self [symbolic] -// CHECK:STDOUT: %.4: type = interface_witness_access %.3, element0 [symbolic] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type.1, type [template] +// CHECK:STDOUT: %assoc0.1: %assoc_type = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %X: %I.type.2 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %I.type.2 = symbolic_binding_pattern X, 0 [symbolic] @@ -533,7 +533,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref Main//state_constraints, inst+9, unloaded -// CHECK:STDOUT: %import_ref.7: %.1 = import_ref Main//state_constraints, inst+13, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.7: %assoc_type = import_ref Main//state_constraints, inst+13, loaded [template = constants.%assoc0.1] // CHECK:STDOUT: %import_ref.8 = import_ref Main//state_constraints, inst+19, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//state_constraints, inst+11, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//state_constraints, inst+17, unloaded @@ -558,13 +558,13 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%I.type.1] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, imports.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_36.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc14_36.2: type = interface_witness_access %.loc14_36.1, element0 [symbolic = constants.%.4] -// CHECK:STDOUT: %.loc14_46.1: Core.IntLiteral = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.2: type = converted %.loc14_46.1, [template = ] +// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, imports.%import_ref.7 [template = constants.%assoc0.1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc14_46: type = converted %int_2, [template = ] // CHECK:STDOUT: %.loc14_30: type = where_expr %.Self [template = constants.%I.type.2] { -// CHECK:STDOUT: requirement_rewrite %.loc14_36.2, +// CHECK:STDOUT: requirement_rewrite %impl.elem0, // CHECK:STDOUT: } // CHECK:STDOUT: %X.param: %I.type.2 = value_param runtime_param // CHECK:STDOUT: %X.loc14_24.1: %I.type.2 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc14_24.2 (constants.%X)] @@ -595,7 +595,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: %U: %type_where = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %type_where = symbolic_binding_pattern U, 0 [symbolic] @@ -622,8 +622,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %U.param_patt: %type_where = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc11_32.1: Core.IntLiteral = int_value 7 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_32.2: type = converted %.loc11_32.1, [template = ] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc11_32: type = converted %int_7, [template = ] // CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%type_where] { // CHECK:STDOUT: requirement_impls , type // CHECK:STDOUT: } @@ -648,7 +648,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: %U: %type_where = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %type_where = symbolic_binding_pattern U, 0 [symbolic] @@ -676,8 +676,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc11_44.1: Core.IntLiteral = int_value 7 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_44.2: type = converted %.loc11_44.1, [template = ] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc11_44: type = converted %int_7, [template = ] // CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%type_where] { // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } @@ -702,10 +702,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: %U: %type_where = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %type_where = symbolic_binding_pattern U, 0 [symbolic] @@ -733,10 +733,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc8_51.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_51.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_51.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_51.3: type = converted %int.make_type_signed, %.loc8_51.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_51.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_51.2: type = converted %int.make_type_signed, %.loc8_51.1 [template = constants.%i32] // CHECK:STDOUT: %.loc8_33: type = where_expr %.Self [template = constants.%type_where] { // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } @@ -761,10 +761,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %J.type.1: type = facet_type <@J> [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %interface.1: = interface_witness () [template] // CHECK:STDOUT: %DoesNotImplI.type: type = fn_type @DoesNotImplI [template] // CHECK:STDOUT: %DoesNotImplI: %DoesNotImplI.type = struct_value () [template] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] @@ -823,7 +823,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type.1] // CHECK:STDOUT: %.Self: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %J.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc26_38: %.1 = struct_literal () +// CHECK:STDOUT: %.loc26_38: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc26_22: type = where_expr %.Self [template = constants.%J.type.2] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc26_38 // CHECK:STDOUT: } @@ -840,18 +840,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %J.ref { -// CHECK:STDOUT: %.loc8: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc8 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: complete_type_witness = %.loc7 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DoesNotImplI() { @@ -900,9 +900,9 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %A.type: type = facet_type <@A> [template] // CHECK:STDOUT: %Self.1: %A.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %interface.1: = interface_witness () [template] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: } @@ -946,18 +946,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %D.ref as %A.ref { -// CHECK:STDOUT: %.loc6: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc6 +// CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: complete_type_witness = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index 5be359271cf5a..33a9775b7d5af 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -91,8 +91,8 @@ class D { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type.1: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @I.%Member [template] // CHECK:STDOUT: %.Self.1: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I where TODO> [template] @@ -100,8 +100,8 @@ class D { // CHECK:STDOUT: %T.patt: %I.type.2 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %PeriodSelf.type: type = fn_type @PeriodSelf [template] // CHECK:STDOUT: %PeriodSelf: %PeriodSelf.type = struct_value () [template] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self.1 [symbolic] -// CHECK:STDOUT: %.4: type = interface_witness_access %.3, element0 [symbolic] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.1 [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %U: %I.type.3 = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %I.type.3 = symbolic_binding_pattern U, 0 [symbolic] @@ -153,12 +153,12 @@ class D { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type.1] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_29.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc10_29.2: type = interface_witness_access %.loc10_29.1, element0 [symbolic = constants.%.4] +// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_41: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%I.type.3] { -// CHECK:STDOUT: requirement_equivalent %.loc10_29.2, %.loc10_41 +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc10_41 // CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I.type.3 = value_param runtime_param // CHECK:STDOUT: %U.loc10_17.1: %I.type.3 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc10_17.2 (constants.%U)] @@ -181,11 +181,11 @@ class D { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Member [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %Member [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Member = %.loc5 +// CHECK:STDOUT: .Member = %assoc0 // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,10 +230,10 @@ class D { // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type.1: type = facet_type <@J> [template] // CHECK:STDOUT: %Self: %J.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %J.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @J.%Member [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %J.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @J.%Member [template] // CHECK:STDOUT: %.Self: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %J.type.2: type = facet_type <@J where TODO> [template] // CHECK:STDOUT: %W: %J.type.2 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: %J.type.2 = symbolic_binding_pattern W, 0 [symbolic] @@ -264,7 +264,7 @@ class D { // CHECK:STDOUT: %.Self: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %J.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %Mismatch.ref: = name_ref Mismatch, [template = ] -// CHECK:STDOUT: %.loc12_44: %.3 = struct_literal () +// CHECK:STDOUT: %.loc12_44: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = constants.%J.type.2] { // CHECK:STDOUT: requirement_rewrite %Mismatch.ref, // CHECK:STDOUT: } @@ -276,11 +276,11 @@ class D { // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Member [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %Member [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Member = %.loc5 +// CHECK:STDOUT: .Member = %assoc0 // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -384,8 +384,8 @@ class D { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -413,12 +413,12 @@ class D { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: complete_type_witness = %.loc10 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: %C { @@ -433,8 +433,8 @@ class D { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -462,12 +462,12 @@ class D { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: complete_type_witness = %.loc9 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> { diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index b5c8802b43789..3e609637e5f9b 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -40,10 +40,10 @@ var v: e where .x = 3; // CHECK:STDOUT: --- fail_left_where_not_facet.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -72,10 +72,10 @@ var v: e where .x = 3; // CHECK:STDOUT: %T.patt.loc8_6.1: = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: = value_param_pattern %T.patt.loc8_6.1, runtime_param [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_10.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.3: type = converted %int.make_type_signed, %.loc8_10.2 [template = constants.%i32] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] @@ -157,7 +157,7 @@ var v: e where .x = 3; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -177,8 +177,8 @@ var v: e where .x = 3; // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] -// CHECK:STDOUT: %.loc7_21: Core.IntLiteral = int_value 3 [template = constants.%.1] -// CHECK:STDOUT: %.loc7_10: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %.loc7: type = where_expr %.Self [template = ] { // CHECK:STDOUT: requirement_rewrite %x.ref, // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref = var v diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index 421885f053077..28b79ad924d9d 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -18,15 +18,15 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type.1: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.1, type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type.1, type [template] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: = facet_access_witness %.Self [symbolic] -// CHECK:STDOUT: %.4: type = interface_witness_access %.3, element0 [symbolic] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %NotGenericF.type: type = fn_type @NotGenericF [template] // CHECK:STDOUT: %NotGenericF: %NotGenericF.type = struct_value () [template] @@ -55,13 +55,13 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type.1] // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc11 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_27.1: = facet_access_witness %.Self.ref [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc14_27.2: type = interface_witness_access %.loc14_27.1, element0 [symbolic = constants.%.4] -// CHECK:STDOUT: %.loc14_33: Core.IntLiteral = int_value 32 [template = constants.%.5] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_21: type = where_expr %.Self [template = constants.%I.type.2] { -// CHECK:STDOUT: requirement_equivalent %.loc14_27.2, %int.make_type_signed +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%I.type.2] { +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %int.make_type_signed // CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I.type.2 = value_param runtime_param0 // CHECK:STDOUT: %U: %I.type.2 = bind_name U, %U.param @@ -71,11 +71,11 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc11 +// CHECK:STDOUT: .T = %assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index f3bceaca3bdae..c02bcb402fd69 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -23,7 +23,7 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %While.type: type = fn_type @While [template] // CHECK:STDOUT: %While: %While.type = struct_value () [template] -// CHECK:STDOUT: %.2: String = string_literal "Hello" [template] +// CHECK:STDOUT: %str: String = string_literal "Hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,8 +48,8 @@ fn While() { // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %.loc18_10: String = string_literal "Hello" [template = constants.%.2] -// CHECK:STDOUT: %.loc18_17: bool = converted %.loc18_10, [template = ] +// CHECK:STDOUT: %str: String = string_literal "Hello" [template = constants.%str] +// CHECK:STDOUT: %.loc18: bool = converted %str, [template = ] // CHECK:STDOUT: if br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index 503cf998ed3d1..f3968281af8d0 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -22,10 +22,10 @@ fn G() { // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca [2 x { i32, i32, i32 }], align 8, !dbg !7 -// CHECK:STDOUT: %.loc14_42.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, {} zeroinitializer, !dbg !8 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_42.2.array.index), !dbg !9 -// CHECK:STDOUT: %.loc14_42.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, {} zeroinitializer, !dbg !8 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_42.5.array.index), !dbg !10 +// CHECK:STDOUT: %.loc14_42.1.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_42.1.array.index), !dbg !9 +// CHECK:STDOUT: %.loc14_42.3.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_42.3.array.index), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index d45b3101c1e87..5cfb39c902dec 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -21,8 +21,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_38.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc11_38.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc11_39, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } @@ -32,14 +32,14 @@ fn Run() { // CHECK:STDOUT: %t.var = alloca [2 x i32], align 4, !dbg !10 // CHECK:STDOUT: %.loc14_23.1.temp = alloca { i32, i32 }, align 8, !dbg !11 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_23.1.temp), !dbg !11 -// CHECK:STDOUT: %.loc14_23.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc14_23.4 = load i32, ptr %.loc14_23.3.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_23.6.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: store i32 %.loc14_23.4, ptr %.loc14_23.6.array.index, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_23.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 1, !dbg !11 -// CHECK:STDOUT: %.loc14_23.9 = load i32, ptr %.loc14_23.8.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_23.11.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: store i32 %.loc14_23.9, ptr %.loc14_23.11.array.index, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %.loc14_23.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.4.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: store i32 %.loc14_23.3, ptr %.loc14_23.4.array.index, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %.loc14_23.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.7.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: store i32 %.loc14_23.6, ptr %.loc14_23.7.array.index, align 4, !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index 505d88ce31101..753137e8090f3 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -27,37 +27,37 @@ fn Run() { // CHECK:STDOUT: define void @main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca [1 x i32], align 4, !dbg !7 -// CHECK:STDOUT: %.loc12_24.7.array.index = getelementptr inbounds [1 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: %.loc12_24.3.array.index = getelementptr inbounds [1 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @array.1.loc12_25, i64 4, i1 false), !dbg !9 // CHECK:STDOUT: %b.var = alloca [2 x double], align 8, !dbg !10 -// CHECK:STDOUT: %.loc13_32.3.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: %.loc13_32.6.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc13_32.2.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc13_32.4.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, {} zeroinitializer, !dbg !11 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %b.var, ptr align 8 @array.2.loc13_33, i64 16, i1 false), !dbg !12 // CHECK:STDOUT: %c.var = alloca [5 x {}], align 8, !dbg !13 -// CHECK:STDOUT: %.loc14_40.3.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: %.loc14_40.2.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: %.loc14_40.4.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 // CHECK:STDOUT: %.loc14_40.6.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: %.loc14_40.9.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: %.loc14_40.12.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: %.loc14_40.15.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: %.loc14_40.8.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: %.loc14_40.10.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, {} zeroinitializer, !dbg !14 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @array.3.loc14_41, i64 0, i1 false), !dbg !15 // CHECK:STDOUT: %d.var = alloca { i32, i32, i32 }, align 8, !dbg !16 -// CHECK:STDOUT: %.loc15_36.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !17 -// CHECK:STDOUT: %.loc15_36.12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !17 -// CHECK:STDOUT: %.loc15_36.18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !17 +// CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !17 +// CHECK:STDOUT: %tuple.elem1.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !17 +// CHECK:STDOUT: %tuple.elem2.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !17 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.loc15_37, i64 12, i1 false), !dbg !18 // CHECK:STDOUT: %e.var = alloca [3 x i32], align 4, !dbg !19 -// CHECK:STDOUT: %.loc16_21.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !20 -// CHECK:STDOUT: %.loc16_21.2 = load i32, ptr %.loc16_21.1.tuple.elem, align 4, !dbg !20 -// CHECK:STDOUT: %.loc16_21.4.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 -// CHECK:STDOUT: store i32 %.loc16_21.2, ptr %.loc16_21.4.array.index, align 4, !dbg !20 -// CHECK:STDOUT: %.loc16_21.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !20 -// CHECK:STDOUT: %.loc16_21.7 = load i32, ptr %.loc16_21.6.tuple.elem, align 4, !dbg !20 -// CHECK:STDOUT: %.loc16_21.9.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 -// CHECK:STDOUT: store i32 %.loc16_21.7, ptr %.loc16_21.9.array.index, align 4, !dbg !20 -// CHECK:STDOUT: %.loc16_21.11.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !20 -// CHECK:STDOUT: %.loc16_21.12 = load i32, ptr %.loc16_21.11.tuple.elem, align 4, !dbg !20 -// CHECK:STDOUT: %.loc16_21.14.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 -// CHECK:STDOUT: store i32 %.loc16_21.12, ptr %.loc16_21.14.array.index, align 4, !dbg !20 +// CHECK:STDOUT: %tuple.elem0.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !20 +// CHECK:STDOUT: %.loc16_21.1 = load i32, ptr %tuple.elem0.loc16.tuple.elem, align 4, !dbg !20 +// CHECK:STDOUT: %.loc16_21.2.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 +// CHECK:STDOUT: store i32 %.loc16_21.1, ptr %.loc16_21.2.array.index, align 4, !dbg !20 +// CHECK:STDOUT: %tuple.elem1.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !20 +// CHECK:STDOUT: %.loc16_21.4 = load i32, ptr %tuple.elem1.loc16.tuple.elem, align 4, !dbg !20 +// CHECK:STDOUT: %.loc16_21.5.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 +// CHECK:STDOUT: store i32 %.loc16_21.4, ptr %.loc16_21.5.array.index, align 4, !dbg !20 +// CHECK:STDOUT: %tuple.elem2.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !20 +// CHECK:STDOUT: %.loc16_21.7 = load i32, ptr %tuple.elem2.loc16.tuple.elem, align 4, !dbg !20 +// CHECK:STDOUT: %.loc16_21.8.array.index = getelementptr inbounds [3 x i32], ptr %e.var, i32 0, {} zeroinitializer, !dbg !20 +// CHECK:STDOUT: store i32 %.loc16_21.7, ptr %.loc16_21.8.array.index, align 4, !dbg !20 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index 4d2b56523e527..b4e2777b5c2d1 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -19,23 +19,23 @@ fn G() -> i32 { // CHECK:STDOUT: ; ModuleID = 'function_param.carbon' // CHECK:STDOUT: source_filename = "function_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.loc16_20.25 = internal constant [3 x i32] [i32 1, i32 2, i32 3] +// CHECK:STDOUT: @array.loc16_20.13 = internal constant [3 x i32] [i32 1, i32 2, i32 3] // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_15.5.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !7 -// CHECK:STDOUT: %.loc12_15.6 = load i32, ptr %.loc12_15.5.array.index, align 4, !dbg !7 -// CHECK:STDOUT: ret i32 %.loc12_15.6, !dbg !8 +// CHECK:STDOUT: %.loc12_15.4.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !7 +// CHECK:STDOUT: %.loc12_15.5 = load i32, ptr %.loc12_15.4.array.index, align 4, !dbg !7 +// CHECK:STDOUT: ret i32 %.loc12_15.5, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CG.Main() !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_20.6.temp = alloca [3 x i32], align 4, !dbg !10 -// CHECK:STDOUT: %.loc16_20.8.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.6.temp, i32 0, {} zeroinitializer, !dbg !10 -// CHECK:STDOUT: %.loc16_20.15.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.6.temp, i32 0, {} zeroinitializer, !dbg !10 -// CHECK:STDOUT: %.loc16_20.22.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.6.temp, i32 0, {} zeroinitializer, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc16_20.6.temp, ptr align 4 @array.loc16_20.25, i64 12, i1 false), !dbg !10 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %.loc16_20.6.temp, i32 1), !dbg !11 +// CHECK:STDOUT: %.loc16_20.3.temp = alloca [3 x i32], align 4, !dbg !10 +// CHECK:STDOUT: %.loc16_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.3.temp, i32 0, {} zeroinitializer, !dbg !10 +// CHECK:STDOUT: %.loc16_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.3.temp, i32 0, {} zeroinitializer, !dbg !10 +// CHECK:STDOUT: %.loc16_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.3.temp, i32 0, {} zeroinitializer, !dbg !10 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc16_20.3.temp, ptr align 4 @array.loc16_20.13, i64 12, i1 false), !dbg !10 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %.loc16_20.3.temp, i32 1), !dbg !11 // CHECK:STDOUT: ret i32 %F.call, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/basics/numeric_literals.carbon b/toolchain/lower/testdata/basics/numeric_literals.carbon index 0ce38adf3681f..9166948197c72 100644 --- a/toolchain/lower/testdata/basics/numeric_literals.carbon +++ b/toolchain/lower/testdata/basics/numeric_literals.carbon @@ -36,18 +36,18 @@ fn F() { // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %ints.var = alloca [4 x i32], align 4, !dbg !7 -// CHECK:STDOUT: %.loc19_3.7.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 -// CHECK:STDOUT: %.loc19_3.14.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 -// CHECK:STDOUT: %.loc19_3.21.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 -// CHECK:STDOUT: %.loc19_3.28.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: %.loc19_3.3.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: %.loc19_3.6.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: %.loc19_3.9.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 +// CHECK:STDOUT: %.loc19_3.12.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, {} zeroinitializer, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ints.var, ptr align 4 @array.1.loc19_4, i64 16, i1 false), !dbg !9 // CHECK:STDOUT: %floats.var = alloca [6 x double], align 8, !dbg !10 -// CHECK:STDOUT: %.loc27_3.3.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc27_3.2.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc27_3.4.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 // CHECK:STDOUT: %.loc27_3.6.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: %.loc27_3.9.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc27_3.8.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: %.loc27_3.10.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 // CHECK:STDOUT: %.loc27_3.12.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: %.loc27_3.15.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: %.loc27_3.18.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, {} zeroinitializer, !dbg !11 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %floats.var, ptr align 8 @array.2.loc27_4, i64 48, i1 false), !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index bbe30843f8c58..996cfb1a043f4 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -54,13 +54,13 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: ; ModuleID = 'adapt_class.carbon' // CHECK:STDOUT: source_filename = "adapt_class.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @PairOfInts.val.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.PairOfInts.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_27.6.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc9_27.12.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.loc9_28, i64 8, i1 false), !dbg !8 +// CHECK:STDOUT: %.loc9_27.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %.loc9_27.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @PairOfInts.val.loc9_28, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/base.carbon b/toolchain/lower/testdata/class/base.carbon index 74f4f2cd405b6..e38ac377eee19 100644 --- a/toolchain/lower/testdata/class/base.carbon +++ b/toolchain/lower/testdata/class/base.carbon @@ -33,14 +33,14 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: ; ModuleID = 'base.carbon' // CHECK:STDOUT: source_filename = "base.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.2.loc22_36 = internal constant { { i32 }, i32 } { { i32 } { i32 4 }, i32 7 } +// CHECK:STDOUT: @Derived.val.loc22_36 = internal constant { { i32 }, i32 } { { i32 } { i32 4 }, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.Main(ptr sret({ { i32 }, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_35.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc22_26.6.b = getelementptr inbounds nuw { i32 }, ptr %.loc22_35.2.base, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc22_35.8.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.2.loc22_36, i64 8, i1 false), !dbg !9 +// CHECK:STDOUT: %.loc22_26.3.b = getelementptr inbounds nuw { i32 }, ptr %.loc22_35.2.base, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %.loc22_35.5.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @Derived.val.loc22_36, i64 8, i1 false), !dbg !9 // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -51,10 +51,10 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: %.loc26_17.1.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %d, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: %.loc26_22.1.b = getelementptr inbounds nuw { i32 }, ptr %.loc26_17.1.base, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: %.loc26_22.2 = load i32, ptr %.loc26_22.1.b, align 4, !dbg !12 -// CHECK:STDOUT: %.loc26_24.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !13 -// CHECK:STDOUT: store i32 %.loc26_12.2, ptr %.loc26_24.2.tuple.elem, align 4, !dbg !13 -// CHECK:STDOUT: %.loc26_24.4.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !13 -// CHECK:STDOUT: store i32 %.loc26_22.2, ptr %.loc26_24.4.tuple.elem, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !13 +// CHECK:STDOUT: store i32 %.loc26_12.2, ptr %tuple.elem0.tuple.elem, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !13 +// CHECK:STDOUT: store i32 %.loc26_22.2, ptr %tuple.elem1.tuple.elem, align 4, !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/convert.carbon b/toolchain/lower/testdata/class/convert.carbon index 24cb224ffe588..f76d1d609e162 100644 --- a/toolchain/lower/testdata/class/convert.carbon +++ b/toolchain/lower/testdata/class/convert.carbon @@ -26,7 +26,7 @@ fn DoIt() { // CHECK:STDOUT: ; ModuleID = 'convert.carbon' // CHECK:STDOUT: source_filename = "convert.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc22_32 = internal constant { i32 } { i32 42 } +// CHECK:STDOUT: @IntWrapper.val.loc22_32 = internal constant { i32 } { i32 42 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @"_CConvert.IntWrapper.Main:ImplicitAs.Core"(ptr %self) !dbg !4 { // CHECK:STDOUT: entry: @@ -43,8 +43,8 @@ fn DoIt() { // CHECK:STDOUT: define void @_CDoIt.Main() !dbg !11 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %w.var = alloca { i32 }, align 8, !dbg !12 -// CHECK:STDOUT: %.loc22_31.6.n = getelementptr inbounds nuw { i32 }, ptr %w.var, i32 0, i32 0, !dbg !13 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %w.var, ptr align 4 @struct.loc22_32, i64 4, i1 false), !dbg !14 +// CHECK:STDOUT: %.loc22_31.3.n = getelementptr inbounds nuw { i32 }, ptr %w.var, i32 0, i32 0, !dbg !13 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %w.var, ptr align 4 @IntWrapper.val.loc22_32, i64 4, i1 false), !dbg !14 // CHECK:STDOUT: %Convert.call = call i32 @"_CConvert.IntWrapper.Main:ImplicitAs.Core"(ptr %w.var), !dbg !15 // CHECK:STDOUT: call void @_CConsume.Main(i32 %Convert.call), !dbg !16 // CHECK:STDOUT: ret void, !dbg !17 diff --git a/toolchain/lower/testdata/class/field.carbon b/toolchain/lower/testdata/class/field.carbon index 720f401147fa2..1eee8359db20f 100644 --- a/toolchain/lower/testdata/class/field.carbon +++ b/toolchain/lower/testdata/class/field.carbon @@ -41,8 +41,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !11 // CHECK:STDOUT: %.loc22_4.a = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: store i32 1, ptr %.loc22_4.a, align 4, !dbg !12 -// CHECK:STDOUT: %.loc23_4.b = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 1, !dbg !13 -// CHECK:STDOUT: store ptr %c.var, ptr %.loc23_4.b, align 8, !dbg !13 +// CHECK:STDOUT: %.loc23.b = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 1, !dbg !13 +// CHECK:STDOUT: store ptr %c.var, ptr %.loc23.b, align 8, !dbg !13 // CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %c.var), !dbg !14 // CHECK:STDOUT: ret i32 %F.call, !dbg !15 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index 8edd02c4660aa..283bd7a0934c8 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -52,14 +52,14 @@ fn CreateAdapter() -> Classes.Adapter(i32) { // CHECK:STDOUT: ; ModuleID = 'create.carbon' // CHECK:STDOUT: source_filename = "create.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.2.loc7_36 = internal constant { { i32 }, i32 } { { i32 } { i32 1 }, i32 2 } +// CHECK:STDOUT: @Derived.val.loc7_36 = internal constant { { i32 }, i32 } { { i32 } { i32 1 }, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CCreateDerived.Create(ptr sret({ { i32 }, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc7_35.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc7_26.6.b = getelementptr inbounds nuw { i32 }, ptr %.loc7_35.2.base, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc7_35.8.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.2.loc7_36, i64 8, i1 false), !dbg !9 +// CHECK:STDOUT: %.loc7_26.3.b = getelementptr inbounds nuw { i32 }, ptr %.loc7_35.2.base, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %.loc7_35.5.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @Derived.val.loc7_36, i64 8, i1 false), !dbg !9 // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/value_access.carbon b/toolchain/lower/testdata/class/value_access.carbon index 693c865d10f7f..06587d2e4574f 100644 --- a/toolchain/lower/testdata/class/value_access.carbon +++ b/toolchain/lower/testdata/class/value_access.carbon @@ -25,22 +25,22 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: define i32 @_CF.Main(ptr %c) !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc19_11.1.a = getelementptr inbounds nuw { { i32, i32, i32 } }, ptr %c, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc19_11.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc19_11.3 = load i32, ptr %.loc19_11.2.tuple.elem, align 4, !dbg !7 -// CHECK:STDOUT: %.loc19_11.4.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: %.loc19_11.5 = load i32, ptr %.loc19_11.4.tuple.elem, align 4, !dbg !7 -// CHECK:STDOUT: %.loc19_11.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 2, !dbg !7 -// CHECK:STDOUT: %.loc19_11.7 = load i32, ptr %.loc19_11.6.tuple.elem, align 4, !dbg !7 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %.loc19_11.2 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.loc19_11.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: %.loc19_11.3 = load i32, ptr %tuple.elem1.loc19_11.tuple.elem, align 4, !dbg !7 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 2, !dbg !7 +// CHECK:STDOUT: %.loc19_11.4 = load i32, ptr %tuple.elem2.tuple.elem, align 4, !dbg !7 // CHECK:STDOUT: %tuple = alloca { i32, i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %tuple1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: store i32 %.loc19_11.3, ptr %tuple1, align 4, !dbg !7 +// CHECK:STDOUT: store i32 %.loc19_11.2, ptr %tuple1, align 4, !dbg !7 // CHECK:STDOUT: %tuple2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: store i32 %.loc19_11.5, ptr %tuple2, align 4, !dbg !7 +// CHECK:STDOUT: store i32 %.loc19_11.3, ptr %tuple2, align 4, !dbg !7 // CHECK:STDOUT: %tuple3 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple, i32 0, i32 2, !dbg !7 -// CHECK:STDOUT: store i32 %.loc19_11.7, ptr %tuple3, align 4, !dbg !7 -// CHECK:STDOUT: %.loc19_13.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: %.loc19_13.tuple.elem.load = load i32, ptr %.loc19_13.tuple.elem, align 4, !dbg !7 -// CHECK:STDOUT: ret i32 %.loc19_13.tuple.elem.load, !dbg !8 +// CHECK:STDOUT: store i32 %.loc19_11.4, ptr %tuple3, align 4, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.loc19_13.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.loc19_13.tuple.elem.load = load i32, ptr %tuple.elem1.loc19_13.tuple.elem, align 4, !dbg !7 +// CHECK:STDOUT: ret i32 %tuple.elem1.loc19_13.tuple.elem.load, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/function/call/struct_param.carbon b/toolchain/lower/testdata/function/call/struct_param.carbon index 60958663448fc..84798b5bfb9e2 100644 --- a/toolchain/lower/testdata/function/call/struct_param.carbon +++ b/toolchain/lower/testdata/function/call/struct_param.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'struct_param.carbon' // CHECK:STDOUT: source_filename = "struct_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.3.loc14_34.12 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @struct.2.loc14_34.6 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 { // CHECK:STDOUT: entry: @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @struct.3.loc14_34.12), !dbg !9 +// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @struct.2.loc14_34.6), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/tuple_param.carbon b/toolchain/lower/testdata/function/call/tuple_param.carbon index d2e04182f2027..ba7214abbe83f 100644 --- a/toolchain/lower/testdata/function/call/tuple_param.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'tuple_param.carbon' // CHECK:STDOUT: source_filename = "tuple_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.2.loc14_20.12 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @tuple.2.loc14_20.6 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 { // CHECK:STDOUT: entry: @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.2.loc14_20.12), !dbg !9 +// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.2.loc14_20.6), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon index 08c0d7a75e1e8..9e9864c26a2b1 100644 --- a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon @@ -19,28 +19,28 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'tuple_param_with_return_slot.carbon' // CHECK:STDOUT: source_filename = "tuple_param_with_return_slot.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.2.loc16_20.12 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @tuple.2.loc16_20.6 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_12.tuple.elem = extractvalue { i32 } %b, 0, !dbg !7 -// CHECK:STDOUT: %.loc12_17.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_17.tuple.elem.load = load i32, ptr %.loc12_17.tuple.elem, align 4, !dbg !8 -// CHECK:STDOUT: %.loc12_22.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 1, !dbg !9 -// CHECK:STDOUT: %.loc12_22.tuple.elem.load = load i32, ptr %.loc12_22.tuple.elem, align 4, !dbg !9 -// CHECK:STDOUT: %.loc12_24.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: store i32 %.loc12_12.tuple.elem, ptr %.loc12_24.2.tuple.elem, align 4, !dbg !10 -// CHECK:STDOUT: %.loc12_24.4.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: store i32 %.loc12_17.tuple.elem.load, ptr %.loc12_24.4.tuple.elem, align 4, !dbg !10 -// CHECK:STDOUT: %.loc12_24.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !10 -// CHECK:STDOUT: store i32 %.loc12_22.tuple.elem.load, ptr %.loc12_24.6.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %tuple.elem0.loc12_12.tuple.elem = extractvalue { i32 } %b, 0, !dbg !7 +// CHECK:STDOUT: %tuple.elem0.loc12_17.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %tuple.elem0.loc12_17.tuple.elem.load = load i32, ptr %tuple.elem0.loc12_17.tuple.elem, align 4, !dbg !8 +// CHECK:STDOUT: %tuple.elem1.loc12_22.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 1, !dbg !9 +// CHECK:STDOUT: %tuple.elem1.loc12_22.tuple.elem.load = load i32, ptr %tuple.elem1.loc12_22.tuple.elem, align 4, !dbg !9 +// CHECK:STDOUT: %tuple.elem0.loc12_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !10 +// CHECK:STDOUT: store i32 %tuple.elem0.loc12_12.tuple.elem, ptr %tuple.elem0.loc12_24.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %tuple.elem1.loc12_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !10 +// CHECK:STDOUT: store i32 %tuple.elem0.loc12_17.tuple.elem.load, ptr %tuple.elem1.loc12_24.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !10 +// CHECK:STDOUT: store i32 %tuple.elem1.loc12_22.tuple.elem.load, ptr %tuple.elem2.tuple.elem, align 4, !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !12 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc16_21.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_21.1.temp, { i32 } { i32 1 }, ptr @tuple.2.loc16_20.12), !dbg !13 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_21.1.temp, { i32 } { i32 1 }, ptr @tuple.2.loc16_20.6), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index a4f4a12431d85..e8fbe35e42615 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -30,21 +30,21 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: %type = type {} // CHECK:STDOUT: -// CHECK:STDOUT: @struct.1.loc18_16 = internal constant {} zeroinitializer -// CHECK:STDOUT: @struct.2.loc19_16 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc18_16 = internal constant {} zeroinitializer +// CHECK:STDOUT: @D.val.loc19_16 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %c.var = alloca {}, align 8, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @struct.1.loc18_16, i64 0, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc18_16, i64 0, i1 false), !dbg !8 // CHECK:STDOUT: %d.var = alloca {}, align 8, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @struct.2.loc19_16, i64 0, i1 false), !dbg !10 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc19_16, i64 0, i1 false), !dbg !10 // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !11 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !12 // CHECK:STDOUT: call void @_CF.Main.46(ptr %c.var), !dbg !13 // CHECK:STDOUT: call void @_CF.Main.47(ptr %d.var), !dbg !14 -// CHECK:STDOUT: %.loc24_5 = load i32, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @_CF.Main.48(i32 %.loc24_5), !dbg !16 +// CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !15 +// CHECK:STDOUT: call void @_CF.Main.48(i32 %.loc24), !dbg !16 // CHECK:STDOUT: call void @_CF.Main.49(%type zeroinitializer), !dbg !17 // CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index a40ad538a96a3..5bd2c70938ec0 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -23,12 +23,12 @@ fn CallF() -> i32 { // CHECK:STDOUT: ; ModuleID = 'call_method.carbon' // CHECK:STDOUT: source_filename = "call_method.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc18_16 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc18_16 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CCallF.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %c.var = alloca {}, align 8, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @struct.loc18_16, i64 0, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc18_16, i64 0, i1 false), !dbg !8 // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !9 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 // CHECK:STDOUT: %.loc20_14 = load i32, ptr %n.var, align 4, !dbg !11 diff --git a/toolchain/lower/testdata/global/class_obj.carbon b/toolchain/lower/testdata/global/class_obj.carbon index 00d3ed5d6284f..564b1e5645a30 100644 --- a/toolchain/lower/testdata/global/class_obj.carbon +++ b/toolchain/lower/testdata/global/class_obj.carbon @@ -15,12 +15,12 @@ var a: A = {}; // CHECK:STDOUT: source_filename = "class_obj.carbon" // CHECK:STDOUT: // CHECK:STDOUT: @a = internal global {} -// CHECK:STDOUT: @struct.loc12_14 = internal constant {} zeroinitializer +// CHECK:STDOUT: @A.val.loc12_14 = internal constant {} zeroinitializer // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @struct.loc12_14, i64 0, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @A.val.loc12_14, i64 0, i1 false), !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/global/class_with_fun.carbon b/toolchain/lower/testdata/global/class_with_fun.carbon index c0570446d2f31..6262869d2b5c2 100644 --- a/toolchain/lower/testdata/global/class_with_fun.carbon +++ b/toolchain/lower/testdata/global/class_with_fun.carbon @@ -19,19 +19,19 @@ var a: A = {}; // CHECK:STDOUT: source_filename = "class_with_fun.carbon" // CHECK:STDOUT: // CHECK:STDOUT: @a = internal global {} -// CHECK:STDOUT: @struct.loc13_12 = internal constant {} zeroinitializer -// CHECK:STDOUT: @struct.loc16_14 = internal constant {} zeroinitializer +// CHECK:STDOUT: @A.val.loc13_12 = internal constant {} zeroinitializer +// CHECK:STDOUT: @A.val.loc16_14 = internal constant {} zeroinitializer // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define void @_Cret_a.Main(ptr sret({}) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @struct.loc13_12, i64 0, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc13_12, i64 0, i1 false), !dbg !7 // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @struct.loc16_14, i64 0, i1 false), !dbg !9 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @A.val.loc16_14, i64 0, i1 false), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index bdd7c9380ef28..12b01c85495d6 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -26,16 +26,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_36.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc10_36.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc10_37, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_34.7.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, {} zeroinitializer, !dbg !10 -// CHECK:STDOUT: %.loc12_34.14.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, {} zeroinitializer, !dbg !10 +// CHECK:STDOUT: %.loc12_34.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, {} zeroinitializer, !dbg !10 +// CHECK:STDOUT: %.loc12_34.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, {} zeroinitializer, !dbg !10 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc12_35, i64 8, i1 false), !dbg !11 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } @@ -45,27 +45,27 @@ fn Run() { // CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !13 // CHECK:STDOUT: %.loc15_23.1.temp = alloca { i32, i32 }, align 8, !dbg !14 // CHECK:STDOUT: call void @_CA.Main(ptr %.loc15_23.1.temp), !dbg !14 -// CHECK:STDOUT: %.loc15_23.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: %.loc15_23.4 = load i32, ptr %.loc15_23.3.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_23.6.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: store i32 %.loc15_23.4, ptr %.loc15_23.6.array.index, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_23.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 1, !dbg !14 -// CHECK:STDOUT: %.loc15_23.9 = load i32, ptr %.loc15_23.8.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_23.11.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: store i32 %.loc15_23.9, ptr %.loc15_23.11.array.index, align 4, !dbg !14 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 0, !dbg !14 +// CHECK:STDOUT: %.loc15_23.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: store i32 %.loc15_23.3, ptr %.loc15_23.4.array.index, align 4, !dbg !14 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 1, !dbg !14 +// CHECK:STDOUT: %.loc15_23.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: store i32 %.loc15_23.6, ptr %.loc15_23.7.array.index, align 4, !dbg !14 // CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !15 // CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !16 // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !17 // CHECK:STDOUT: %.loc17_18 = load i32, ptr %b.var, align 4, !dbg !18 -// CHECK:STDOUT: %.loc17_19.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc17_18, !dbg !19 -// CHECK:STDOUT: %.loc17_19.5 = load i32, ptr %.loc17_19.4.array.index, align 4, !dbg !19 -// CHECK:STDOUT: store i32 %.loc17_19.5, ptr %c.var, align 4, !dbg !20 +// CHECK:STDOUT: %.loc17_19.3.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc17_18, !dbg !19 +// CHECK:STDOUT: %.loc17_19.4 = load i32, ptr %.loc17_19.3.array.index, align 4, !dbg !19 +// CHECK:STDOUT: store i32 %.loc17_19.4, ptr %c.var, align 4, !dbg !20 // CHECK:STDOUT: %d.var = alloca i32, align 4, !dbg !21 // CHECK:STDOUT: %.loc18_18.1.temp = alloca [2 x i32], align 4, !dbg !22 // CHECK:STDOUT: call void @_CB.Main(ptr %.loc18_18.1.temp), !dbg !22 -// CHECK:STDOUT: %.loc18_21.4.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !22 -// CHECK:STDOUT: %.loc18_21.5 = load i32, ptr %.loc18_21.4.array.index, align 4, !dbg !22 -// CHECK:STDOUT: store i32 %.loc18_21.5, ptr %d.var, align 4, !dbg !23 +// CHECK:STDOUT: %.loc18_21.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !22 +// CHECK:STDOUT: %.loc18_21.4 = load i32, ptr %.loc18_21.3.array.index, align 4, !dbg !22 +// CHECK:STDOUT: store i32 %.loc18_21.4, ptr %d.var, align 4, !dbg !23 // CHECK:STDOUT: ret void, !dbg !24 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index 627c01f62d759..d3bc14c2814f2 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -24,46 +24,46 @@ fn F() -> i32 { // CHECK:STDOUT: define i32 @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc12_36.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_36.12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 -// CHECK:STDOUT: %.loc12_36.18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !8 +// CHECK:STDOUT: %tuple.elem0.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %tuple.elem1.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %tuple.elem2.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.1.loc12_37, i64 12, i1 false), !dbg !9 // CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 8, !dbg !10 -// CHECK:STDOUT: %.loc13_28.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc13_28.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.loc13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %tuple.elem1.loc13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !11 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.2.loc13_29, i64 8, i1 false), !dbg !12 -// CHECK:STDOUT: %.loc14_43.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !13 -// CHECK:STDOUT: %.loc14_43.2 = load i32, ptr %.loc14_43.1.tuple.elem, align 4, !dbg !13 -// CHECK:STDOUT: %.loc14_43.3.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !13 -// CHECK:STDOUT: %.loc14_43.4 = load i32, ptr %.loc14_43.3.tuple.elem, align 4, !dbg !13 -// CHECK:STDOUT: %.loc14_43.5.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !13 -// CHECK:STDOUT: %.loc14_43.6 = load i32, ptr %.loc14_43.5.tuple.elem, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem0.loc14_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !13 +// CHECK:STDOUT: %.loc14_43.1 = load i32, ptr %tuple.elem0.loc14_43.tuple.elem, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem1.loc14_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !13 +// CHECK:STDOUT: %.loc14_43.2 = load i32, ptr %tuple.elem1.loc14_43.tuple.elem, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !13 +// CHECK:STDOUT: %.loc14_43.3 = load i32, ptr %tuple.elem2.loc14.tuple.elem, align 4, !dbg !13 // CHECK:STDOUT: %tuple.loc14_43 = alloca { i32, i32, i32 }, align 8, !dbg !13 // CHECK:STDOUT: %tuple.loc14_431 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc14_43, i32 0, i32 0, !dbg !13 -// CHECK:STDOUT: store i32 %.loc14_43.2, ptr %tuple.loc14_431, align 4, !dbg !13 +// CHECK:STDOUT: store i32 %.loc14_43.1, ptr %tuple.loc14_431, align 4, !dbg !13 // CHECK:STDOUT: %tuple.loc14_432 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc14_43, i32 0, i32 1, !dbg !13 -// CHECK:STDOUT: store i32 %.loc14_43.4, ptr %tuple.loc14_432, align 4, !dbg !13 +// CHECK:STDOUT: store i32 %.loc14_43.2, ptr %tuple.loc14_432, align 4, !dbg !13 // CHECK:STDOUT: %tuple.loc14_433 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc14_43, i32 0, i32 2, !dbg !13 -// CHECK:STDOUT: store i32 %.loc14_43.6, ptr %tuple.loc14_433, align 4, !dbg !13 -// CHECK:STDOUT: %.loc14_46.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: %.loc14_46.2 = load i32, ptr %.loc14_46.1.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: %.loc14_46.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !14 -// CHECK:STDOUT: %.loc14_46.4 = load i32, ptr %.loc14_46.3.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14_43.3, ptr %tuple.loc14_433, align 4, !dbg !13 +// CHECK:STDOUT: %tuple.elem0.loc14_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !14 +// CHECK:STDOUT: %.loc14_46.1 = load i32, ptr %tuple.elem0.loc14_46.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: %tuple.elem1.loc14_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !14 +// CHECK:STDOUT: %.loc14_46.2 = load i32, ptr %tuple.elem1.loc14_46.tuple.elem, align 4, !dbg !14 // CHECK:STDOUT: %tuple.loc14_46 = alloca { i32, i32 }, align 8, !dbg !14 // CHECK:STDOUT: %tuple.loc14_464 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc14_46, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: store i32 %.loc14_46.2, ptr %tuple.loc14_464, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14_46.1, ptr %tuple.loc14_464, align 4, !dbg !14 // CHECK:STDOUT: %tuple.loc14_465 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc14_46, i32 0, i32 1, !dbg !14 -// CHECK:STDOUT: store i32 %.loc14_46.4, ptr %tuple.loc14_465, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14_46.2, ptr %tuple.loc14_465, align 4, !dbg !14 // CHECK:STDOUT: %tuple.loc14_47 = alloca { ptr, ptr }, align 8, !dbg !15 // CHECK:STDOUT: %tuple.loc14_476 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc14_47, i32 0, i32 0, !dbg !15 // CHECK:STDOUT: store ptr %tuple.loc14_43, ptr %tuple.loc14_476, align 8, !dbg !15 // CHECK:STDOUT: %tuple.loc14_477 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc14_47, i32 0, i32 1, !dbg !15 // CHECK:STDOUT: store ptr %tuple.loc14_46, ptr %tuple.loc14_477, align 8, !dbg !15 -// CHECK:STDOUT: %.loc15_11.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc14_47, i32 0, i32 1, !dbg !16 -// CHECK:STDOUT: %.loc15_11.tuple.elem.load = load ptr, ptr %.loc15_11.tuple.elem, align 8, !dbg !16 -// CHECK:STDOUT: %.loc15_13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_11.tuple.elem.load, i32 0, i32 1, !dbg !16 -// CHECK:STDOUT: %.loc15_13.tuple.elem.load = load i32, ptr %.loc15_13.tuple.elem, align 4, !dbg !16 -// CHECK:STDOUT: ret i32 %.loc15_13.tuple.elem.load, !dbg !17 +// CHECK:STDOUT: %tuple.elem1.loc15_11.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc14_47, i32 0, i32 1, !dbg !16 +// CHECK:STDOUT: %tuple.elem1.loc15_11.tuple.elem.load = load ptr, ptr %tuple.elem1.loc15_11.tuple.elem, align 8, !dbg !16 +// CHECK:STDOUT: %tuple.elem1.loc15_13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.elem1.loc15_11.tuple.elem.load, i32 0, i32 1, !dbg !16 +// CHECK:STDOUT: %tuple.elem1.loc15_13.tuple.elem.load = load i32, ptr %tuple.elem1.loc15_13.tuple.elem, align 4, !dbg !16 +// CHECK:STDOUT: ret i32 %tuple.elem1.loc15_13.tuple.elem.load, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/toolchain/lower/testdata/operators/assignment.carbon b/toolchain/lower/testdata/operators/assignment.carbon index b47c2a29d7287..9bf90cd976df2 100644 --- a/toolchain/lower/testdata/operators/assignment.carbon +++ b/toolchain/lower/testdata/operators/assignment.carbon @@ -26,8 +26,8 @@ fn Main() { // CHECK:STDOUT: store i32 12, ptr %a.var, align 4, !dbg !8 // CHECK:STDOUT: store i32 9, ptr %a.var, align 4, !dbg !9 // CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 8, !dbg !10 -// CHECK:STDOUT: %.loc15_12.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc15_12.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !11 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.loc15_5, i64 8, i1 false), !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index 51a3f7826634b..00881352d1809 100644 --- a/toolchain/lower/testdata/operators/overloaded.carbon +++ b/toolchain/lower/testdata/operators/overloaded.carbon @@ -82,9 +82,9 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CCalculate.Main(ptr sret({ i1 }) %return, ptr %a, ptr %b) !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc28_10.3.temp = alloca { i1 }, align 8, !dbg !22 -// CHECK:STDOUT: call void @"_COp.Number.Main:Negate.Core"(ptr %.loc28_10.3.temp, ptr %a), !dbg !22 -// CHECK:STDOUT: call void @"_COp.Number.Main:Mul.Core"(ptr %return, ptr %.loc28_10.3.temp, ptr %b), !dbg !22 +// CHECK:STDOUT: %.loc28_10.1.temp = alloca { i1 }, align 8, !dbg !22 +// CHECK:STDOUT: call void @"_COp.Number.Main:Negate.Core"(ptr %.loc28_10.1.temp, ptr %a), !dbg !22 +// CHECK:STDOUT: call void @"_COp.Number.Main:Mul.Core"(ptr %return, ptr %.loc28_10.1.temp, ptr %b), !dbg !22 // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 4f69d3940f31f..9603bb98412e9 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -25,11 +25,11 @@ fn F() { // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc14_46.6.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc14_46.12.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %.loc14_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %.loc14_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.loc14_47, i64 8, i1 false), !dbg !9 -// CHECK:STDOUT: %.loc15_7.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc15_7.b), !dbg !11 +// CHECK:STDOUT: %.loc15.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !10 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc15.b), !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/return_var.carbon b/toolchain/lower/testdata/return/return_var.carbon index 4a1ecba8f963b..2ad21521abbd0 100644 --- a/toolchain/lower/testdata/return/return_var.carbon +++ b/toolchain/lower/testdata/return/return_var.carbon @@ -24,9 +24,9 @@ fn Make() -> C { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.Main(ptr sret({ i32, ptr }) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_30.6.data = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc18_30.8.next = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: store ptr %return, ptr %.loc18_30.8.next, align 8, !dbg !7 +// CHECK:STDOUT: %.loc18_30.3.data = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %.loc18_30.5.next = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: store ptr %return, ptr %.loc18_30.5.next, align 8, !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index 3968ad26944a6..3c8d395253279 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -24,7 +24,7 @@ fn Run() -> i32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { double, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_48.2.a = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_48.8.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %.loc12_48.5.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.loc12_49, i64 16, i1 false), !dbg !9 // CHECK:STDOUT: %y.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: %.loc13_17.1.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !11 diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 22397299ef2aa..7a0e4b48aa85f 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -22,8 +22,8 @@ fn Run() -> i32 { // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc12_46.6.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_46.12.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %.loc12_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %.loc12_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.loc12_47, i64 8, i1 false), !dbg !9 // CHECK:STDOUT: %y.var = alloca { i32, i32 }, align 8, !dbg !10 // CHECK:STDOUT: %.loc13_31.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !11 diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index 40eb1ebb43671..14d1f05226578 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -23,18 +23,18 @@ fn Run() -> i32 { // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc12_36.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_36.12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 -// CHECK:STDOUT: %.loc12_36.18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !8 +// CHECK:STDOUT: %tuple.elem0.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %tuple.elem2.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.loc12_37, i64 12, i1 false), !dbg !9 // CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !10 -// CHECK:STDOUT: %.loc13_17.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc13_17.2 = load i32, ptr %.loc13_17.1.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: store i32 %.loc13_17.2, ptr %b.var, align 4, !dbg !12 +// CHECK:STDOUT: %tuple.elem0.loc13.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %.loc13_17 = load i32, ptr %tuple.elem0.loc13.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: store i32 %.loc13_17, ptr %b.var, align 4, !dbg !12 // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !13 -// CHECK:STDOUT: %.loc14_17.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !14 -// CHECK:STDOUT: %.loc14_17.2 = load i32, ptr %.loc14_17.1.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: store i32 %.loc14_17.2, ptr %c.var, align 4, !dbg !15 +// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !14 +// CHECK:STDOUT: %.loc14_17 = load i32, ptr %tuple.elem2.loc14.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14_17, ptr %c.var, align 4, !dbg !15 // CHECK:STDOUT: ret i32 0, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/access/return_value_access.carbon b/toolchain/lower/testdata/tuple/access/return_value_access.carbon index 9c227864a3415..a3fece7f8240f 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -21,8 +21,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_38.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 -// CHECK:STDOUT: %.loc11_38.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc11_39, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } @@ -32,9 +32,9 @@ fn Run() { // CHECK:STDOUT: %t.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: %.loc14_18.1.temp = alloca { i32, i32 }, align 8, !dbg !11 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_18.1.temp), !dbg !11 -// CHECK:STDOUT: %.loc14_19.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_18.1.temp, i32 0, i32 1, !dbg !11 -// CHECK:STDOUT: %.loc14_19.2 = load i32, ptr %.loc14_19.1.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: store i32 %.loc14_19.2, ptr %t.var, align 4, !dbg !12 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_18.1.temp, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %.loc14_19 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: store i32 %.loc14_19, ptr %t.var, align 4, !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon index f832080472fc6..2f51438d5571c 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon @@ -22,10 +22,10 @@ fn G() { // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc14_56.1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_56.1.tuple.elem), !dbg !9 -// CHECK:STDOUT: %.loc14_56.2.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 1, !dbg !8 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_56.2.tuple.elem), !dbg !10 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem0.tuple.elem), !dbg !9 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem1.tuple.elem), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/one_entry.carbon b/toolchain/lower/testdata/tuple/one_entry.carbon index d75dc9da852ef..48bfa2b06b995 100644 --- a/toolchain/lower/testdata/tuple/one_entry.carbon +++ b/toolchain/lower/testdata/tuple/one_entry.carbon @@ -22,10 +22,10 @@ fn Run() -> i32 { // CHECK:STDOUT: %x.var = alloca { i32 }, align 8, !dbg !7 // CHECK:STDOUT: store { i32 } { i32 1 }, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %y.var = alloca { i32 }, align 8, !dbg !9 -// CHECK:STDOUT: %.loc13_20.1.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: %.loc13_20.2 = load i32, ptr %.loc13_20.1.tuple.elem, align 4, !dbg !10 -// CHECK:STDOUT: %.loc13_20.3.tuple.init = insertvalue { i32 } poison, i32 %.loc13_20.2, 0, !dbg !10 -// CHECK:STDOUT: store { i32 } %.loc13_20.3.tuple.init, ptr %y.var, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 +// CHECK:STDOUT: %.loc13_20.1 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %.loc13_20.2.tuple.init = insertvalue { i32 } poison, i32 %.loc13_20.1, 0, !dbg !10 +// CHECK:STDOUT: store { i32 } %.loc13_20.2.tuple.init, ptr %y.var, align 4, !dbg !11 // CHECK:STDOUT: ret i32 0, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index 813cd6786dbd8..bd6597f81b377 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -22,18 +22,18 @@ fn Run() -> i32 { // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 8, !dbg !7 -// CHECK:STDOUT: %.loc12_29.6.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: %.loc12_29.12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 +// CHECK:STDOUT: %tuple.elem0.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: %tuple.elem1.loc12.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @tuple.loc12_30, i64 8, i1 false), !dbg !9 // CHECK:STDOUT: %y.var = alloca { i32, i32 }, align 8, !dbg !10 -// CHECK:STDOUT: %.loc13_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc13_23.2 = load i32, ptr %.loc13_23.1.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc13_23.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %y.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: store i32 %.loc13_23.2, ptr %.loc13_23.3.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc13_23.5.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !11 -// CHECK:STDOUT: %.loc13_23.6 = load i32, ptr %.loc13_23.5.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc13_23.7.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %y.var, i32 0, i32 1, !dbg !11 -// CHECK:STDOUT: store i32 %.loc13_23.6, ptr %.loc13_23.7.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.loc13_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %.loc13_23.1 = load i32, ptr %tuple.elem0.loc13_23.1.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem0.loc13_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %y.var, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: store i32 %.loc13_23.1, ptr %tuple.elem0.loc13_23.2.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem1.loc13_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %.loc13_23.3 = load i32, ptr %tuple.elem1.loc13_23.1.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %tuple.elem1.loc13_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %y.var, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: store i32 %.loc13_23.3, ptr %tuple.elem1.loc13_23.2.tuple.elem, align 4, !dbg !11 // CHECK:STDOUT: ret i32 0, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/value_formation.carbon b/toolchain/lower/testdata/tuple/value_formation.carbon index 228a6f1082297..bf6cc885e54c6 100644 --- a/toolchain/lower/testdata/tuple/value_formation.carbon +++ b/toolchain/lower/testdata/tuple/value_formation.carbon @@ -25,32 +25,32 @@ fn F() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %b.var = alloca { i32, i32, i32 }, align 8, !dbg !8 -// CHECK:STDOUT: %.loc16_6.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !9 -// CHECK:STDOUT: %.loc16_6.2 = load i32, ptr %.loc16_6.1.tuple.elem, align 4, !dbg !9 -// CHECK:STDOUT: %.loc16_6.3.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !9 -// CHECK:STDOUT: %.loc16_6.4 = load i32, ptr %.loc16_6.3.tuple.elem, align 4, !dbg !9 -// CHECK:STDOUT: %.loc16_6.5.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !9 -// CHECK:STDOUT: %.loc16_6.6 = load i32, ptr %.loc16_6.5.tuple.elem, align 4, !dbg !9 +// CHECK:STDOUT: %tuple.elem0.loc16_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !9 +// CHECK:STDOUT: %.loc16_6.1 = load i32, ptr %tuple.elem0.loc16_6.tuple.elem, align 4, !dbg !9 +// CHECK:STDOUT: %tuple.elem1.loc16_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !9 +// CHECK:STDOUT: %.loc16_6.2 = load i32, ptr %tuple.elem1.loc16_6.tuple.elem, align 4, !dbg !9 +// CHECK:STDOUT: %tuple.elem2.loc16_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !9 +// CHECK:STDOUT: %.loc16_6.3 = load i32, ptr %tuple.elem2.loc16_6.tuple.elem, align 4, !dbg !9 // CHECK:STDOUT: %tuple.loc16_6 = alloca { i32, i32, i32 }, align 8, !dbg !9 // CHECK:STDOUT: %tuple.loc16_61 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_6, i32 0, i32 0, !dbg !9 -// CHECK:STDOUT: store i32 %.loc16_6.2, ptr %tuple.loc16_61, align 4, !dbg !9 +// CHECK:STDOUT: store i32 %.loc16_6.1, ptr %tuple.loc16_61, align 4, !dbg !9 // CHECK:STDOUT: %tuple.loc16_62 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_6, i32 0, i32 1, !dbg !9 -// CHECK:STDOUT: store i32 %.loc16_6.4, ptr %tuple.loc16_62, align 4, !dbg !9 +// CHECK:STDOUT: store i32 %.loc16_6.2, ptr %tuple.loc16_62, align 4, !dbg !9 // CHECK:STDOUT: %tuple.loc16_63 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_6, i32 0, i32 2, !dbg !9 -// CHECK:STDOUT: store i32 %.loc16_6.6, ptr %tuple.loc16_63, align 4, !dbg !9 -// CHECK:STDOUT: %.loc16_9.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: %.loc16_9.2 = load i32, ptr %.loc16_9.1.tuple.elem, align 4, !dbg !10 -// CHECK:STDOUT: %.loc16_9.3.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: %.loc16_9.4 = load i32, ptr %.loc16_9.3.tuple.elem, align 4, !dbg !10 -// CHECK:STDOUT: %.loc16_9.5.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 2, !dbg !10 -// CHECK:STDOUT: %.loc16_9.6 = load i32, ptr %.loc16_9.5.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: store i32 %.loc16_6.3, ptr %tuple.loc16_63, align 4, !dbg !9 +// CHECK:STDOUT: %tuple.elem0.loc16_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !10 +// CHECK:STDOUT: %.loc16_9.1 = load i32, ptr %tuple.elem0.loc16_9.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %tuple.elem1.loc16_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !10 +// CHECK:STDOUT: %.loc16_9.2 = load i32, ptr %tuple.elem1.loc16_9.tuple.elem, align 4, !dbg !10 +// CHECK:STDOUT: %tuple.elem2.loc16_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 2, !dbg !10 +// CHECK:STDOUT: %.loc16_9.3 = load i32, ptr %tuple.elem2.loc16_9.tuple.elem, align 4, !dbg !10 // CHECK:STDOUT: %tuple.loc16_9 = alloca { i32, i32, i32 }, align 8, !dbg !10 // CHECK:STDOUT: %tuple.loc16_94 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_9, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: store i32 %.loc16_9.2, ptr %tuple.loc16_94, align 4, !dbg !10 +// CHECK:STDOUT: store i32 %.loc16_9.1, ptr %tuple.loc16_94, align 4, !dbg !10 // CHECK:STDOUT: %tuple.loc16_95 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_9, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: store i32 %.loc16_9.4, ptr %tuple.loc16_95, align 4, !dbg !10 +// CHECK:STDOUT: store i32 %.loc16_9.2, ptr %tuple.loc16_95, align 4, !dbg !10 // CHECK:STDOUT: %tuple.loc16_96 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_9, i32 0, i32 2, !dbg !10 -// CHECK:STDOUT: store i32 %.loc16_9.6, ptr %tuple.loc16_96, align 4, !dbg !10 +// CHECK:STDOUT: store i32 %.loc16_9.3, ptr %tuple.loc16_96, align 4, !dbg !10 // CHECK:STDOUT: %tuple.loc16_10 = alloca { ptr, ptr }, align 8, !dbg !11 // CHECK:STDOUT: %tuple.loc16_107 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_10, i32 0, i32 0, !dbg !11 // CHECK:STDOUT: store ptr %tuple.loc16_6, ptr %tuple.loc16_107, align 8, !dbg !11 diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index cccf4686ef658..66607bc0eec1a 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -407,16 +407,54 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } add_inst_name(std::move(name)); }; + auto facet_access_name_id = [&](InstId facet_value_inst_id) -> NameId { + if (auto name = sem_ir_.insts().TryGetAs(facet_value_inst_id)) { + return name->name_id; + } else if (auto symbolic = sem_ir_.insts().TryGetAs( + facet_value_inst_id)) { + return sem_ir_.entity_names().Get(symbolic->entity_name_id).name_id; + } + return NameId::Invalid; + }; if (auto branch = untyped_inst.TryAs()) { AddBlockLabel(scope_id, sem_ir_.insts().GetLocId(inst_id), *branch); } CARBON_KIND_SWITCH(untyped_inst) { + case AddrOf::Kind: { + add_inst_name("addr"); + continue; + } + case ArrayType::Kind: { + // TODO: Can we figure out the name of the type this is an array of? + add_inst_name("array_type"); + continue; + } case CARBON_KIND(AssociatedConstantDecl inst): { add_inst_name_id(inst.name_id); continue; } + case CARBON_KIND(AssociatedEntity inst): { + std::string name; + llvm::raw_string_ostream out(name); + out << "assoc" << inst.index.index; + add_inst_name(std::move(name)); + continue; + } + case CARBON_KIND(AssociatedEntityType inst): { + // TODO: Try to get the name of the interface associated with + // `inst.interface_type_id`. + if (auto fn_ty = + sem_ir_.types().TryGetAs(inst.entity_type_id)) { + add_inst_name_id(sem_ir_.functions().Get(fn_ty->function_id).name_id, + ".assoc_type"); + } else { + // TODO: Handle other cases. + add_inst_name("assoc_type"); + } + continue; + } case BindAlias::Kind: case BindName::Kind: case BindSymbolicName::Kind: @@ -433,6 +471,24 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, sem_ir_.entity_names().Get(inst.entity_name_id).name_id, ".patt"); continue; } + case CARBON_KIND(BoolLiteral inst): { + if (inst.value.ToBool()) { + add_inst_name("true"); + } else { + add_inst_name("false"); + } + continue; + } + case CARBON_KIND(BoundMethod inst): { + auto type_id = sem_ir_.insts().Get(inst.function_id).type_id(); + if (auto fn_ty = sem_ir_.types().TryGetAs(type_id)) { + add_inst_name_id(sem_ir_.functions().Get(fn_ty->function_id).name_id, + ".bound"); + } else { + add_inst_name("bound_method"); + } + continue; + } case CARBON_KIND(Call inst): { auto callee_function = SemIR::GetCalleeFunction(sem_ir_, inst.callee_id); @@ -465,6 +521,34 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, add_inst_name_id(sem_ir_.classes().Get(inst.class_id).name_id); continue; } + case CompleteTypeWitness::Kind: { + // TODO: Can we figure out the name of the type this is a witness for? + add_inst_name("complete_type"); + continue; + } + case ConstType::Kind: { + // TODO: Can we figure out the name of the type argument? + add_inst_name("const"); + continue; + } + case CARBON_KIND(FacetAccessType inst): { + auto name_id = facet_access_name_id(inst.facet_value_inst_id); + if (name_id.is_valid()) { + add_inst_name_id(name_id, ".as_type"); + } else { + add_inst_name("as_type"); + } + continue; + } + case CARBON_KIND(FacetAccessWitness inst): { + auto name_id = facet_access_name_id(inst.facet_value_inst_id); + if (name_id.is_valid()) { + add_inst_name_id(name_id, ".as_wit"); + } else { + add_inst_name("as_wit"); + } + continue; + } case CARBON_KIND(FacetType inst): { const auto& facet_type_info = sem_ir_.facet_types().Get(inst.facet_type_id); @@ -483,6 +567,25 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } continue; } + case CARBON_KIND(FacetValue inst): { + if (auto facet_type = + sem_ir_.types().TryGetAs(inst.type_id)) { + const auto& facet_type_info = + sem_ir_.facet_types().Get(facet_type->facet_type_id); + if (auto interface = facet_type_info.TryAsSingleInterface()) { + const auto& interface_info = + sem_ir_.interfaces().Get(interface->interface_id); + add_inst_name_id(interface_info.name_id, ".facet"); + continue; + } + } + add_inst_name("facet_value"); + continue; + } + case FloatLiteral::Kind: { + add_inst_name("float"); + continue; + } case CARBON_KIND(FloatType inst): { add_int_or_float_type_name('f', inst.bit_width_id); continue; @@ -522,7 +625,7 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } else { add_inst_name("default.import"); } - break; + continue; } case ImportRefUnloaded::Kind: case ImportRefLoaded::Kind: { @@ -549,11 +652,30 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, CollectNamesInBlock(interface_scope_id, inst.decl_block_id); continue; } + case InterfaceWitness::Kind: { + // TODO: Include name of interface. + add_inst_name("interface"); + continue; + } + case CARBON_KIND(InterfaceWitnessAccess inst): { + std::string name; + llvm::raw_string_ostream out(name); + out << "impl.elem" << inst.index.index; + add_inst_name(std::move(name)); + continue; + } case CARBON_KIND(IntType inst): { add_int_or_float_type_name(inst.int_kind == IntKind::Signed ? 'i' : 'u', inst.bit_width_id); continue; } + case CARBON_KIND(IntValue inst): { + std::string name; + llvm::raw_string_ostream out(name); + out << "int_" << sem_ir_.ints().Get(inst.int_id); + add_inst_name(std::move(name)); + continue; + } case CARBON_KIND(NameRef inst): { add_inst_name_id(inst.name_id, ".ref"); continue; @@ -573,35 +695,88 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, add_inst_name_id( SemIR::Function::GetNameFromPatternId(sem_ir_, inst_id), ".param_patt"); - break; + continue; + } + case PointerType::Kind: { + add_inst_name("ptr"); + continue; } case InstKind::ReturnSlotPattern: { add_inst_name_id(NameId::ReturnSlot, ".patt"); - break; + continue; + } + case CARBON_KIND(SpecificFunction inst): { + InstId callee_id = inst.callee_id; + if (auto method = sem_ir_.insts().TryGetAs(callee_id)) { + callee_id = method->function_id; + } + auto type_id = sem_ir_.insts().Get(callee_id).type_id(); + if (auto fn_ty = sem_ir_.types().TryGetAs(type_id)) { + add_inst_name_id(sem_ir_.functions().Get(fn_ty->function_id).name_id, + ".specific_fn"); + } else { + add_inst_name("specific_fn"); + } + continue; } case CARBON_KIND(SpliceBlock inst): { CollectNamesInBlock(scope_id, inst.block_id); break; } + case StringLiteral::Kind: { + add_inst_name("str"); + continue; + } case CARBON_KIND(StructValue inst): { if (auto fn_ty = sem_ir_.types().TryGetAs(inst.type_id)) { add_inst_name_id(sem_ir_.functions().Get(fn_ty->function_id).name_id); + } else if (auto class_ty = + sem_ir_.types().TryGetAs(inst.type_id)) { + add_inst_name_id(sem_ir_.classes().Get(class_ty->class_id).name_id, + ".val"); } else if (auto generic_class_ty = sem_ir_.types().TryGetAs( inst.type_id)) { add_inst_name_id( - sem_ir_.classes().Get(generic_class_ty->class_id).name_id); + sem_ir_.classes().Get(generic_class_ty->class_id).name_id, + ".generic"); } else if (auto generic_interface_ty = sem_ir_.types().TryGetAs( inst.type_id)) { add_inst_name_id(sem_ir_.interfaces() .Get(generic_interface_ty->interface_id) - .name_id); + .name_id, + ".generic"); } else { - add_inst_name("struct"); + if (sem_ir_.inst_blocks().Get(inst.elements_id).empty()) { + add_inst_name("empty_struct"); + } else { + add_inst_name("struct"); + } } continue; } + case CARBON_KIND(StructType inst): { + const auto& fields = sem_ir_.struct_type_fields().Get(inst.fields_id); + if (fields.empty()) { + add_inst_name("empty_struct_type"); + continue; + } + std::string name = "struct_type"; + for (auto field : fields) { + name += "."; + name += sem_ir_.names().GetIRBaseName(field.name_id).str(); + } + add_inst_name(std::move(name)); + continue; + } + case CARBON_KIND(TupleAccess inst): { + std::string name; + llvm::raw_string_ostream out(name); + out << "tuple.elem" << inst.index.index; + add_inst_name(std::move(name)); + continue; + } case CARBON_KIND(TupleType inst): { if (inst.elements_id == TypeBlockId::Empty) { add_inst_name("empty_tuple.type"); @@ -620,6 +795,16 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } continue; } + case CARBON_KIND(UnboundElementType inst): { + if (auto class_ty = + sem_ir_.types().TryGetAs(inst.class_type_id)) { + add_inst_name_id(sem_ir_.classes().Get(class_ty->class_id).name_id, + ".elem"); + } else { + add_inst_name("elem_type"); + } + continue; + } case CARBON_KIND(VarStorage inst): { add_inst_name_id(inst.name_id, ".var"); continue;